Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4ef388603 | |||
| aebfb05b94 | |||
| 04a7c05e99 | |||
| 8cc0d88600 |
@@ -1,9 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports System.Reflection
|
||||
Imports System.Globalization
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class CadCutPageUC
|
||||
|
||||
|
||||
@@ -563,9 +563,6 @@ Module VacuumCups
|
||||
|
||||
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
' Se macchina con ventosa dietro (VacType=1) non eseguo nessun controllo
|
||||
If GetVacuumType() = 1 Then Return 0
|
||||
' Verifico se usare l'asse W per la gestione delle ventose
|
||||
Dim sAxisName As String = "C"
|
||||
' verifico che il nome dell'asse impostato sia corretto
|
||||
If EgtGetAxisId(sAxisName) = GDB_ID.NULL Then
|
||||
|
||||
@@ -127,7 +127,6 @@
|
||||
Public Const K_VACUUMOFF As String = "VacuumOff"
|
||||
Public Const K_BYPASSTATE As String = "BypassState"
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
Public Const K_SPOTLIGHT As String = "SpotLight"
|
||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||
Public Const K_NAXES As String = "nAxes"
|
||||
@@ -179,15 +178,10 @@
|
||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||
|
||||
Public Const S_PHOTO As String = "Photo"
|
||||
Public Const K_PHOTO_CAMERACOUNTER As String = "CameraCounter"
|
||||
Public Const K_PHOTO_OFFSETX As String = "OffsetX"
|
||||
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
||||
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
||||
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
||||
Public Const K_PHOTO_TAB3_OFFSETX As String = "Tab3OffsetX"
|
||||
Public Const K_PHOTO_TAB3_OFFSETY As String = "Tab3OffsetY"
|
||||
Public Const K_PHOTO_TAB4_OFFSETX As String = "Tab4OffsetX"
|
||||
Public Const K_PHOTO_TAB4_OFFSETY As String = "Tab4OffsetY"
|
||||
Public Const K_PHOTO_HQ_OFFSETX As String = "HQOffsetX"
|
||||
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
|
||||
Public Const K_CAMERA_DIRECT_CMD As String = "CameraDirectCmd"
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2"
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2"
|
||||
ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
|
||||
+171
-10
@@ -16,7 +16,7 @@
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -27,7 +27,9 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="FinalSawCutGpBx" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.RowSpan="4" Margin="5,0,5,0">
|
||||
<!--definizione della grigli ainterna-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -36,23 +38,182 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="EnableFinalSawCutTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="EnableFinalSawCutChBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
<TextBlock Name="FinalDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="FinalDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri fori: 4 Parametri-->
|
||||
<GroupBox Name="HolesGpBx" Grid.Column="1" Grid.RowSpan="3" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri rettifica tagli sottosquadra: 1 Parametro -->
|
||||
<GroupBox Name="RectificationWJParamGpBx" Grid.Column="1" Grid.Row="4" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" >
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="EnableRectificationTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="EnableRectificationChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri WaterJet: 5 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
|
||||
<GroupBox Name="WjsParamGpBx" Grid.Column="1" Grid.RowSpan="4" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="WjIntCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="WjIntCutsChBx" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
<TextBlock Name="HolesDiameterWJTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesDiameterWJTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOffsetWJTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetWJTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="MinRadiusWJTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MinRadiusWJTxBx" Grid.Column="2" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerWJTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerWJChBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri Fresatura: 3 Parametri-->
|
||||
<GroupBox Name="MillingsParamGpBx" Grid.Column="2" Grid.RowSpan="3" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
|
||||
+262
-14
@@ -1,30 +1,278 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class Alarms2PageUC
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_CurrentMachine As CurrentMachine
|
||||
|
||||
' Properties
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
Private Sub Alarms2Page_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
FinalSawCutGpBx.Header = EgtMsg(91254) ' Taglio Finale
|
||||
EnableFinalSawCutTxBl.Text = EgtMsg(91255) ' Abilita
|
||||
FinalDepthTxBl.Text = EgtMsg(91256) ' Ultimo Spessore
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
SawGpBx.Header = EgtMsg(90925) ' Parametri lama
|
||||
HolesGpBx.Header = EgtMsg(90917) ' Parametri fori
|
||||
MillingsParamGpBx.Header = EgtMsg(90929) ' Parametri fresature
|
||||
WjsParamGpBx.Header = EgtMsg(91058) ' Parametri waterjet
|
||||
WjsParamGpBx.Header = EgtMsg(91058) ' Parametri waterjet
|
||||
RectificationWJParamGpBx.Header = EgtMsg(91047) ' Rettifica
|
||||
|
||||
HolesOffsetTxBl.Text = EgtMsg(90909) ' Offset fori
|
||||
HolesOverlapTxBl.Text = EgtMsg(90910) ' Sovrapp. fori
|
||||
HolesToleranceTxBl.Text = EgtMsg(90911) ' Tolleranza fori
|
||||
OneHoleInCornerTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
CutExtraLenTxBl.Text = EgtMsg(90906) ' Sicurezza tagli
|
||||
AngleCutExtraLenTxBl.Text = EgtMsg(90907) ' Sicur. angoli
|
||||
ExtArcMinRadTxBl.Text = EgtMsg(90918) ' Rmin archi est.
|
||||
IntArcMaxSideAngTxBl.Text = EgtMsg(90924) ' Amax archi int.
|
||||
PreCutExitTxBl.Text = EgtMsg(91065) ' PreTaglio uscite
|
||||
CornerCutsTxBl.Text = EgtMsg(90944) ' Sempre sugli angoli
|
||||
InternalCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
ShortTxBl.Text = EgtMsg(90949) ' Accorciamento
|
||||
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
EnableRectificationTxBl.Text = EgtMsg(91048) ' Abilita (sottosquadra)
|
||||
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
HolesDiameterWJTxBl.Text = EgtMsg(91044) ' Diametro
|
||||
HolesOffsetWJTxBl.Text = EgtMsg(91045) ' Offset
|
||||
MinRadiusWJTxBl.Text = EgtMsg(91046) ' Raggio Minimo
|
||||
OneHoleInCornerWJTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Allarm2Page_Loaded() Handles Me.Loaded
|
||||
EnableFinalSawCutChBx.IsChecked = m_MainWindow.m_CurrentMachine.bEnableFinalSawCut
|
||||
FinalDepthTxBx.Text = m_MainWindow.m_CurrentMachine.dFinalDepth
|
||||
If m_bFirst Then
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
SawGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
' Disattivo il gruppo dei parametri fori
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
'Da implementare
|
||||
End Select
|
||||
|
||||
' Se non previste forature, disabilito relativo box
|
||||
If Not m_CurrentMachine.bDrilling Then
|
||||
HolesGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se non previste fresature, disabilito relativo box e uso fresa con incisione
|
||||
If Not m_CurrentMachine.bMilling Then
|
||||
MillingsParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
m_bFirst = False
|
||||
End If
|
||||
|
||||
Dim dVal As Double
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OFFSET, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
HolesOffsetTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sovrapposizione fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OVERLAP, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOverlapTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo tolleranza diametro fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
HolesToleranceTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo un solo foro in corner
|
||||
OneHoleInCornerChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo sicurezza su tagli
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
CutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sicurezza su tagli in angoli interni
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 0, m_MainWindow.GetMachIniFile())
|
||||
AngleCutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo raggio minimo arco esterno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_EXTARCMINRAD, 200, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo angolo di fianco massimo arco interno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
IntArcMaxSideAngTxBx.Text = DoubleToString(dVal, 2)
|
||||
' Leggo se PreCutExit attivo (per taglio ceramico)
|
||||
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
||||
If nPreCutExit = -1 Then
|
||||
PreCutExitTxBl.Visibility = Visibility.Hidden
|
||||
PreCutExitChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
PreCutExitChBx.IsChecked = (nPreCutExit <> 0)
|
||||
End If
|
||||
' Salvo DB lavorazioni con aggiornamenti parametri generali
|
||||
EgtMdbSave()
|
||||
' Leggo lavorazione angoli con fresa
|
||||
CornerCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo lavorazione interni con fresa
|
||||
InternalCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo accorciamento angoli con fresa
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
ShortTxBx.Text = LenToString(dVal, 2)
|
||||
' leggo se attiva la rettifica degli angoli per WaterJet
|
||||
EnableRectificationChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
WjIntCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Lavorazione preforo lavello con WaterJet
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_DIAMITERWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesDiameterWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_OFFSETWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOffsetWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MIN_RADIUSWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
MinRadiusWJTxBx.Text = LenToString(dVal, 2)
|
||||
OneHoleInCornerWJChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
End Sub
|
||||
|
||||
Private Sub EnableFinalSawCutChBx_IsChecked() Handles EnableFinalSawCutChBx.Click
|
||||
m_MainWindow.m_CurrentMachine.bEnableFinalSawCut = EnableFinalSawCutChBx.IsChecked
|
||||
WritePrivateProfileString(S_MACH, K_ENABLEFINALSAWCUT, If(m_MainWindow.m_CurrentMachine.bEnableFinalSawCut, "1", "0"), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub FinalDepthTxBx_EgtClosed() Handles FinalDepthTxBx.EgtClosed
|
||||
Private Sub CutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles CutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(FinalDepthTxBx.Text, dVal)
|
||||
m_MainWindow.m_CurrentMachine.dFinalDepth = dVal
|
||||
WritePrivateProfileString(S_MACH, K_FINALDEPTH, DoubleToString(m_MainWindow.m_CurrentMachine.dFinalDepth, 3), m_MainWindow.GetMachIniFile())
|
||||
StringToLen(CutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub AngleCutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles AngleCutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(AngleCutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub ExtArcMinRadTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ExtArcMinRadTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ExtArcMinRadTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_EXTARCMINRAD, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub IntArcMaxSideAngTxBx_EgtClosed(sender As Object, e As EventArgs) Handles IntArcMaxSideAngTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToDouble(IntArcMaxSideAngTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub PreCutExitChBx_Click(sender As Object, e As RoutedEventArgs) Handles PreCutExitChBx.Click
|
||||
If PreCutExitChBx.IsChecked Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOffsetTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OFFSET, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOverlapTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOverlapTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OVERLAP, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesToleranceTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesToleranceTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesToleranceTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerChBx_Click(sender As Object, e As RoutedEventArgs) Handles OneHoleInCornerChBx.Click
|
||||
If OneHoleInCornerChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CornerCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CornerCutsChBx.Click
|
||||
If CornerCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ShortTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ShortTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ShortTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_SHORTENING, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub InternalCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles InternalCutsChBx.Click
|
||||
If InternalCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
||||
If EnableRectificationChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "1", m_MainWindow.GetMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "0", m_MainWindow.GetMachIniFile)
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
|
||||
Private Sub WjIntCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles WjIntCutsChBx.Click
|
||||
If WjIntCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per prefori WaterJet
|
||||
Private Sub HolesDiameterWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesDiameterWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesDiameterWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_DIAMITERWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesOffsetWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_OFFSETWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MinRadiusWJTxBx_Click(sender As Object, e As EventArgs) Handles MinRadiusWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(MinRadiusWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MIN_RADIUSWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerWJChBx_Click(sender As Object, e As EventArgs) Handles OneHoleInCornerWJChBx.Click
|
||||
If OneHoleInCornerWJChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per prefori WaterJet
|
||||
|
||||
End Class
|
||||
|
||||
+72
-280
@@ -20,7 +20,6 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -30,254 +29,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Costruisco le riche per la colonna 3-->
|
||||
<Grid Grid.Column="2" Grid.RowSpan="9">
|
||||
<Grid.RowDefinitions>
|
||||
<!--GruopBox: taglio lama-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--GruopBoxs: Fresatura/>Foratura/WaterJet-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<!--GroupBox: vai ad Home-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.375*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||
<!--definizione della grigli ainterna-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="2" Grid.Row="4" Grid.RowSpan="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Parametri fori: 4 Parametri-->
|
||||
<GroupBox Name="HolesGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri Fresatura: 3 Parametri-->
|
||||
<GroupBox Name="MillingsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri rettifica tagli sottosquadra: 1 Parametro -->
|
||||
<GroupBox Name="RectificationWJParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" >
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="EnableRectificationTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="EnableRectificationChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--<TextBlock Name="OffsetRectificationTxBl" Grid.Row="1" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetRectificationTxBx" Grid.Row="1" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri WaterJet: 5 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
|
||||
<GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="4"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="WjIntCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="WjIntCutsChBx" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
<TextBlock Name="HolesDiameterWJTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesDiameterWJTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOffsetWJTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetWJTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="MinRadiusWJTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MinRadiusWJTxBx" Grid.Column="2" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerWJTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerWJChBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Parametri Taglio diretto: 1 Parametro-->
|
||||
<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="12" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FinalHomeChBx"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid Grid.RowSpan="3" Margin="6,0,6,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -492,7 +244,7 @@
|
||||
|
||||
</Grid>-->
|
||||
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Margin="5,0,5,0"
|
||||
Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
||||
|
||||
<Grid>
|
||||
@@ -524,7 +276,7 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Margin="0,0,5,0"
|
||||
Grid.Row="0" Grid.ColumnSpan="1" Grid.RowSpan="3">
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible" Visibility="Visible"
|
||||
@@ -639,7 +391,7 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,5,0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
@@ -651,36 +403,29 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="4">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||
@@ -693,7 +438,8 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<GroupBox Name="NestingParamGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -736,7 +482,8 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -773,8 +520,9 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="2" Grid.RowSpan="1">
|
||||
<GroupBox Name="CutFredGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2"
|
||||
Grid.Row="0" Grid.RowSpan="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -798,8 +546,8 @@
|
||||
</GroupBox>
|
||||
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="3" Grid.RowSpan="3">
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Margin="0,0,5,0"
|
||||
Grid.Row="1" Grid.RowSpan="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -831,8 +579,36 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FinalSawCutGpBx" Grid.Column="2" Grid.Row="4" Grid.RowSpan="2" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||
<TextBlock Name="EnableFinalSawCutTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="EnableFinalSawCutChBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
<TextBlock Name="FinalDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="FinalDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="SideAngCutProbeGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -846,9 +622,11 @@
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</GroupBox>
|
||||
|
||||
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
||||
<GroupBox Name="WashingGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}"
|
||||
Grid.Column="3" Grid.Row="3" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -862,10 +640,11 @@
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</GroupBox>
|
||||
|
||||
<!--Cornici-->
|
||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||
<GroupBox Name="FrameGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="5" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -881,7 +660,20 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="8">
|
||||
<!--Parametri Taglio diretto: 1 Parametro-->
|
||||
<GroupBox Name="DirectCutsParamGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="7">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FinalHomeChBx"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="8" Margin="0,0,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
|
||||
+22
-240
@@ -62,45 +62,19 @@ Public Class AlarmsPageUC
|
||||
CurrCupWheelTxBl.Text = EgtMsg(91070) ' Scasso corrente
|
||||
CurrMillTxBl.Text = EgtMsg(90904) ' Fresa corrente
|
||||
CurrWJetTxBl.Text = EgtMsg(90900) ' Waterjet corrente
|
||||
HolesOffsetTxBl.Text = EgtMsg(90909) ' Offset fori
|
||||
HolesOverlapTxBl.Text = EgtMsg(90910) ' Sovrapp. fori
|
||||
HolesToleranceTxBl.Text = EgtMsg(90911) ' Tolleranza fori
|
||||
OneHoleInCornerTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
CutExtraLenTxBl.Text = EgtMsg(90906) ' Sicurezza tagli
|
||||
AngleCutExtraLenTxBl.Text = EgtMsg(90907) ' Sicur. angoli
|
||||
CompleteCutsTxBl.Text = EgtMsg(90908) ' Rispetta i tagli completi
|
||||
SafeZTxBl.Text = EgtMsg(90905) ' Z Sicura
|
||||
MaterialsGpBx.Header = EgtMsg(90913) ' Materiali
|
||||
NewMatBtn.Content = EgtMsg(90914) ' Aggiungi
|
||||
RemoveMatBtn.Content = EgtMsg(90915) ' Rimuovi
|
||||
SetUpGpBx.Header = EgtMsg(90916) ' Utensili correnti
|
||||
HolesGpBx.Header = EgtMsg(90917) ' Parametri fori
|
||||
ExtArcMinRadTxBl.Text = EgtMsg(90918) ' Rmin archi est.
|
||||
IntArcMaxSideAngTxBl.Text = EgtMsg(90924) ' Amax archi int.
|
||||
PreCutExitTxBl.Text = EgtMsg(91065) ' PreTaglio uscite
|
||||
MachineParamGpBx.Header = EgtMsg(90919) ' Parametri macchina
|
||||
SawGpBx.Header = EgtMsg(90925) ' Parametri lama
|
||||
DirectCutsParamGpBx.Header = EgtMsg(90927) ' Tagli diretti
|
||||
FinalHomeTxBl.Text = EgtMsg(90928) ' Home finale
|
||||
MillingsParamGpBx.Header = EgtMsg(90929) ' Parametri fresature
|
||||
CornerCutsTxBl.Text = EgtMsg(90944) ' Sempre sugli angoli
|
||||
InternalCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
ShortTxBl.Text = EgtMsg(90949) ' Accorciamento
|
||||
TopMillGpBx.Header = EgtMsg( 91061) ' Parametri incisioni
|
||||
TopMillGpBx.Header = EgtMsg(91061) ' Parametri incisioni
|
||||
TmEnableTxBl.Text = EgtMsg( 91062) ' Con fresa
|
||||
TmDepthTxBl.Text = EgtMsg( 91063) ' Profondità
|
||||
TmWidthTxBl.Text = EgtMsg( 91064) ' Larghezza
|
||||
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
||||
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||
HolesDiameterWJTxBl.Text = EgtMsg(91044) ' Diametro
|
||||
HolesOffsetWJTxBl.Text = EgtMsg(91045) ' Offset
|
||||
MinRadiusWJTxBl.Text = EgtMsg(91046) ' Raggio Minimo
|
||||
OneHoleInCornerWJTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
RectificationWJParamGpBx.Header = EgtMsg(91047) ' Rettifica
|
||||
EnableRectificationTxBl.Text = EgtMsg(91048) ' Abilita (sottosquadra)
|
||||
'-- FINE -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
NestingParamGpBx.Header = EgtMsg(90931) ' Nesting
|
||||
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
||||
GhigliottinaTxBl.Text = EgtMsg(91066) ' Ghigliottina
|
||||
@@ -113,8 +87,6 @@ Public Class AlarmsPageUC
|
||||
BackImageBtn.Content = EgtMsg(90938) ' Sfondo
|
||||
ThresholdTxBl.Text = EgtMsg(90939) ' Soglia
|
||||
ToleranceTxBl.Text = EgtMsg(90940) ' Tolleranza
|
||||
WashingTxBl.Text = EgtMsg(90941) ' Lavaggio
|
||||
SideAngCutProbeTxBl.Text = EgtMsg(90950) ' Tastatura tagli inclinati
|
||||
CutFredGpBx.Header = EgtMsg(90946) ' Tagli Feed inizio/fine
|
||||
CfrLenTxBl.Text = EgtMsg(90947) ' Lunghezza
|
||||
CfrPercTxBl.Text = EgtMsg(90948) ' Riduzione %
|
||||
@@ -130,16 +102,20 @@ Public Class AlarmsPageUC
|
||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||
UseLaserOriginTxBl.Text = EgtMsg(91129) ' Usa laser per origine
|
||||
SideAngCutProbeGpBx.Header = EgtMsg(90950) ' Tastatura
|
||||
SideAngCutProbeTxBl.Text = EgtMsg(90950) ' Tastatura tagli inclinati
|
||||
WashingGpBx.Header = EgtMsg(90941) ' Lavaggio
|
||||
WashingTxBl.Text = EgtMsg(90941) ' Lavaggio
|
||||
FinalSawCutGpBx.Header = EgtMsg(91254) ' Taglio Finale
|
||||
EnableFinalSawCutTxBl.Text = EgtMsg(91255) ' Abilita
|
||||
FinalDepthTxBl.Text = EgtMsg(91256) ' Ultimo Spessore
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
If m_bFirst Then
|
||||
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
SawGpBx.Visibility = Visibility.Hidden
|
||||
TopMillGpBx.Visibility = Visibility.Hidden
|
||||
CurrSawTxBl.Visibility = Visibility.Hidden
|
||||
CurrSawCmBx.Visibility = Visibility.Hidden
|
||||
@@ -157,31 +133,18 @@ Public Class AlarmsPageUC
|
||||
CurrToolsGrid.RowDefinitions.Add(EndRow)
|
||||
SetUpGpBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
' Disattivo il gruppo dei parametri fori
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
'Da implementare
|
||||
End Select
|
||||
|
||||
' Se non previste forature, disabilito relativo box
|
||||
If Not m_CurrentMachine.bDrilling Then
|
||||
HolesGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se non previste fresature, disabilito relativo box e uso fresa con incisione
|
||||
If Not m_CurrentMachine.bMilling Then
|
||||
MillingsParamGpBx.Visibility = Visibility.Hidden
|
||||
TmEnableChBx.IsEnabled = False
|
||||
TmEnableChBx.IsChecked = False
|
||||
End If
|
||||
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Abilitazione box per contorni grezzo da foto
|
||||
If m_MainWindow.m_Camera.GetCalcContour() Then
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -353,71 +316,12 @@ Public Class AlarmsPageUC
|
||||
|
||||
' Leggo offset fori
|
||||
Dim dVal As Double
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OFFSET, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
HolesOffsetTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sovrapposizione fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OVERLAP, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOverlapTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo tolleranza diametro fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
HolesToleranceTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo un solo foro in corner
|
||||
OneHoleInCornerChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo sicurezza su tagli
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
CutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sicurezza su tagli in angoli interni
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 0, m_MainWindow.GetMachIniFile())
|
||||
AngleCutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo distanza di sicurezza
|
||||
dVal = 0
|
||||
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, dVal)
|
||||
SafeZTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo raggio minimo arco esterno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_EXTARCMINRAD, 200, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo se PreCutExit attivo (per taglio ceramico)
|
||||
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
||||
If nPreCutExit = -1 Then
|
||||
PreCutExitTxBl.Visibility = Visibility.Hidden
|
||||
PreCutExitChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
PreCutExitChBx.IsChecked = ( nPreCutExit <> 0)
|
||||
End If
|
||||
' Leggo angolo di fianco massimo arco interno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
IntArcMaxSideAngTxBx.Text = DoubleToString(dVal, 2)
|
||||
' Salvo DB lavorazioni con aggiornamenti parametri generali
|
||||
EgtMdbSave()
|
||||
' Leggo lavorazione angoli con fresa
|
||||
CornerCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo lavorazione interni con fresa
|
||||
InternalCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
WjIntCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Lavorazione preforo lavello con WaterJet
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_DIAMITERWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesDiameterWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_OFFSETWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOffsetWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MIN_RADIUSWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
MinRadiusWJTxBx.Text = LenToString(dVal, 2)
|
||||
OneHoleInCornerWJChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' leggo se attiva la rettifica degli angoli per WaterJet
|
||||
EnableRectificationChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo accorciamento angoli con fresa
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
ShortTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo flag abilitazione incisioni con fresa
|
||||
TmEnableChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
@@ -483,6 +387,8 @@ Public Class AlarmsPageUC
|
||||
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
||||
End If
|
||||
|
||||
EnableFinalSawCutChBx.IsChecked = m_MainWindow.m_CurrentMachine.bEnableFinalSawCut
|
||||
FinalDepthTxBx.Text = m_MainWindow.m_CurrentMachine.dFinalDepth
|
||||
End Sub
|
||||
|
||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||
@@ -925,50 +831,6 @@ Public Class AlarmsPageUC
|
||||
m_MainWindow.m_MachinePageUC.MachinePageGrid.Children.Add(m_SetUpPage)
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOffsetTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OFFSET, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOverlapTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOverlapTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OVERLAP, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesToleranceTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesToleranceTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesToleranceTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerChBx_Click(sender As Object, e As RoutedEventArgs) Handles OneHoleInCornerChBx.Click
|
||||
If OneHoleInCornerChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles CutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(CutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub AngleCutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles AngleCutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(AngleCutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub SafeZTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SafeZTxBx.EgtClosed
|
||||
Dim dSafeZ As Double = 0
|
||||
StringToLen(SafeZTxBx.Text, dSafeZ)
|
||||
@@ -976,30 +838,6 @@ Public Class AlarmsPageUC
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub ExtArcMinRadTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ExtArcMinRadTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ExtArcMinRadTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_EXTARCMINRAD, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub IntArcMaxSideAngTxBx_EgtClosed(sender As Object, e As EventArgs) Handles IntArcMaxSideAngTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToDouble(IntArcMaxSideAngTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub PreCutExitChBx_Click(sender As Object, e As RoutedEventArgs) Handles PreCutExitChBx.Click
|
||||
If PreCutExitChBx.IsChecked Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CompleteCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CompleteCutsChBx.Click
|
||||
Dim NestPage As NestPageUC = m_MainWindow.m_CadCutPageUC.m_NestPage
|
||||
If CompleteCutsChBx.IsChecked() Then
|
||||
@@ -1025,74 +863,6 @@ Public Class AlarmsPageUC
|
||||
AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
||||
End Sub
|
||||
|
||||
Private Sub CornerCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CornerCutsChBx.Click
|
||||
If CornerCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ShortTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ShortTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ShortTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_SHORTENING, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub InternalCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles InternalCutsChBx.Click
|
||||
If InternalCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub WjIntCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles WjIntCutsChBx.Click
|
||||
If WjIntCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per prefori WaterJet
|
||||
Private Sub HolesDiameterWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesDiameterWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesDiameterWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_DIAMITERWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesOffsetWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_OFFSETWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MinRadiusWJTxBx_Click(sender As Object, e As EventArgs) Handles MinRadiusWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(MinRadiusWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MIN_RADIUSWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerWJChBx_Click(sender As Object, e As EventArgs) Handles OneHoleInCornerWJChBx.Click
|
||||
If OneHoleInCornerWJChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per prefori WaterJet
|
||||
|
||||
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
||||
If EnableRectificationChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "1", m_MainWindow.GetMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "0", m_MainWindow.GetMachIniFile)
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
|
||||
Private Sub TmEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles TmEnableChBx.Click
|
||||
If TmEnableChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "1", m_MainWindow.GetMachIniFile())
|
||||
@@ -1557,4 +1327,16 @@ Public Class AlarmsPageUC
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
Private Sub EnableFinalSawCutChBx_IsChecked() Handles EnableFinalSawCutChBx.Click
|
||||
m_MainWindow.m_CurrentMachine.bEnableFinalSawCut = EnableFinalSawCutChBx.IsChecked
|
||||
WritePrivateProfileString(S_MACH, K_ENABLEFINALSAWCUT, If(m_MainWindow.m_CurrentMachine.bEnableFinalSawCut, "1", "0"), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub FinalDepthTxBx_EgtClosed() Handles FinalDepthTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(FinalDepthTxBx.Text, dVal)
|
||||
m_MainWindow.m_CurrentMachine.dFinalDepth = dVal
|
||||
WritePrivateProfileString(S_MACH, K_FINALDEPTH, DoubleToString(m_MainWindow.m_CurrentMachine.dFinalDepth, 3), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -142,14 +142,8 @@ Public Class CurrentMachine
|
||||
Private m_dPhotoOffsetY As Double = 0
|
||||
Private m_dTab2PhotoOffsetX As Double = 0
|
||||
Private m_dTab2PhotoOffsetY As Double = 0
|
||||
Private m_dTab3PhotoOffsetX As Double = 0
|
||||
Private m_dTab3PhotoOffsetY As Double = 0
|
||||
Private m_dTab4PhotoOffsetX As Double = 0
|
||||
Private m_dTab4PhotoOffsetY As Double = 0
|
||||
Private m_dHQPhotoOffsetX As Double = 0
|
||||
Private m_dHQPhotoOffsetY As Double = 0
|
||||
' Numero di camere attive in macchina
|
||||
Private m_nCamCounter As Integer = 0
|
||||
|
||||
' Abilitazione scelta restart
|
||||
Private m_bEnableRestart As Boolean = False
|
||||
@@ -923,30 +917,18 @@ Public Class CurrentMachine
|
||||
Friend ReadOnly Property PhotoOffset As Vector3d
|
||||
Get
|
||||
Select Case GetCurrentTable()
|
||||
Case 4
|
||||
Return New Vector3d(m_dTab4PhotoOffsetX, m_dTab4PhotoOffsetY, 0)
|
||||
Case 3
|
||||
Return New Vector3d(m_dTab3PhotoOffsetX, m_dTab3PhotoOffsetY, 0)
|
||||
Case 2
|
||||
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
||||
Case 1
|
||||
Case Else
|
||||
' verifico quale delle due fotocamere è attualmente attiva
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
Return New Vector3d(m_dHQPhotoOffsetX, m_dHQPhotoOffsetY, 0)
|
||||
End If
|
||||
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
||||
Case Else
|
||||
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property CameraCounter As Integer
|
||||
Get
|
||||
Return m_nCamCounter
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bEnableRestart As Boolean
|
||||
Get
|
||||
Return m_bEnableRestart
|
||||
@@ -1446,21 +1428,11 @@ Public Class CurrentMachine
|
||||
' Leggo centratura del pezzo in X sulla tavola (per macchine con nastro)
|
||||
m_bCenterRawOnX = (GetPrivateProfileInt(S_TABLE, K_CENTER_RAW_ONX, 0, sMachIniFile) <> 0)
|
||||
|
||||
' Leggo il numero di camere installate a bordo macchina
|
||||
m_nCamCounter = GetPrivateProfileInt(S_PHOTO, K_PHOTO_CAMERACOUNTER, -1, sMachIniFile)
|
||||
' Leggo offset aggiuntivo a fotografia (Tab1 oppure Tab di carico)
|
||||
' Leggo offset aggiuntivo a fotografia
|
||||
m_dPhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_OFFSETX, 0, sMachIniFile)
|
||||
m_dPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_OFFSETY, 0, sMachIniFile)
|
||||
' Tab2
|
||||
m_dTab2PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETX, 0, sMachIniFile)
|
||||
m_dTab2PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETY, 0, sMachIniFile)
|
||||
' Tab3
|
||||
m_dTab3PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB3_OFFSETX, 0, sMachIniFile)
|
||||
m_dTab3PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB3_OFFSETY, 0, sMachIniFile)
|
||||
' Tab4
|
||||
m_dTab4PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB4_OFFSETX, 0, sMachIniFile)
|
||||
m_dTab4PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB4_OFFSETY, 0, sMachIniFile)
|
||||
' Tab1 Hq
|
||||
m_dHQPhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETX, 0, sMachIniFile)
|
||||
m_dHQPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETY, 0, sMachIniFile)
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource DatiMacchinaImg1}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Alarms2Btn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource DatiMacchinaImg2}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ToolsDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
|
||||
+1
-5
@@ -274,10 +274,6 @@ Class MainWindow
|
||||
Return m_bIsSiemensPc
|
||||
End Function
|
||||
|
||||
Public Function GetDebug() As Integer
|
||||
Return m_nDebug
|
||||
End Function
|
||||
|
||||
Private Sub MainWindow_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Verifico sia l'unica istanza
|
||||
ManageSingleIstance()
|
||||
@@ -708,7 +704,7 @@ Class MainWindow
|
||||
MyLicWn.Show()
|
||||
End If
|
||||
|
||||
' inizializzo
|
||||
' inizilizzo
|
||||
End Sub
|
||||
|
||||
#Region "Selezione dei bottoni IN LAVORO, TAGLII DIRETTI, TAGLI CAD, CORNICI, MACCHINA, OPZIONI"
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.7.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.7.2")>
|
||||
<Assembly: AssemblyVersion("2.7.7.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.7.1")>
|
||||
|
||||
@@ -1447,6 +1447,12 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoBottom-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DatiMacchina1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DatiMacchina2.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -484,7 +484,7 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CurrProjSummeryTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Setter Property="Margin" Value="6,0,0,0"/>
|
||||
</Style>
|
||||
@@ -639,10 +639,10 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
</Style>
|
||||
|
||||
<DataTemplate x:Key="GroupBoxHeaderTemplate">
|
||||
@@ -748,8 +748,80 @@
|
||||
|
||||
<!--TextBlock per elementi delle ListBox-->
|
||||
|
||||
<Style x:Key="OmagCut_ListBoxTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Style x:Key="OmagCut_ListBoxTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!--DataTemplate testo ed immagine-->
|
||||
<DataTemplate x:Key="DataTemplateItem">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />-->
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Style="{DynamicResource OmagCut_ListBoxIcon}" />
|
||||
<!--<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" VerticalAlignment="Center" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" Style="{DynamicResource OmagCut_ListBoxTextBlock}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- ListBoxItem -->
|
||||
|
||||
<Style x:Key="ItemList" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="Margin" Value="1,0,1,0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border x:Name="Bd"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="LightGray"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="White"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="false"/>
|
||||
<Condition Property="IsMouseOver" Value="true"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="Background" TargetName="Bd" Value="LightGray"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="LightGray"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="LightGray"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="White"/>
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -194,7 +194,8 @@
|
||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DatiMacchinaImg1" UriSource="Resources/NewIcons/DatiMacchina1.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DatiMacchinaImg2" UriSource="Resources/NewIcons/DatiMacchina2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
@@ -1039,6 +1040,7 @@
|
||||
|
||||
<!--TextBlock per elementi delle ListBox-->
|
||||
<Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Black}"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
@@ -1046,6 +1048,8 @@
|
||||
|
||||
<Style x:Key="OmagCut_ListBoxTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CurrProjSummeryTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
@@ -1115,9 +1119,10 @@
|
||||
|
||||
<!-- ListBoxItem -->
|
||||
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Style x:Key="ItemList" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="Margin" Value="1,0,1,0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
|
||||
@@ -8,96 +8,86 @@
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280"
|
||||
Initialized="CurrentProjectPage_Initialized" Loaded="CurrentProjectPage_Loaded">
|
||||
|
||||
<!-- Definizione della CurrentProjectPage -->
|
||||
<Grid Name="CurrentProjectPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<!-- Definizione della CurrentProjectPage -->
|
||||
<Grid Name="CurrentProjectPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Image Name="MaterialTxBl"
|
||||
Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Margin="0,0,10,0"
|
||||
TextAlignment="Right" Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
||||
<Image Name="HeightTxBl" Grid.Row="1"
|
||||
Source="{DynamicResource RawHeightImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<Image Name="ToolTxBl" Grid.Row="2"
|
||||
Source="{DynamicResource DB-utensiliImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<Image Name="MachiningTxBl" Grid.Row="3"
|
||||
Source="{DynamicResource DB-lavorazioniImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Vertical" Name="PhotoProgressStackPanel">
|
||||
<ProgressBar Name="PhotoProgress" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
||||
<Label Name="PhotoProgressText" Foreground="WhiteSmoke" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Border Name="OutMessageBrd" Grid.Row="2" >
|
||||
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
<Image Name="MaterialTxBl"
|
||||
Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Margin="0,0,10,0"
|
||||
TextAlignment="Right" Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
||||
<Image Name="HeightTxBl" Grid.Row="1"
|
||||
Source="{DynamicResource RawHeightImg}" Style="{DynamicResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<Image Name="ToolTxBl" Grid.Row="2"
|
||||
Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<Image Name="MachiningTxBl" Grid.Row="3"
|
||||
Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Grid Name="SceneHostGrid" Grid.Row="1" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ProgressBar Name="PhotoProgress" Grid.Row="2" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
||||
|
||||
<Border Name="OutMessageBrd" Grid.Row="2" >
|
||||
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="SceneHostGrid" Grid.Row="1" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -202,8 +202,8 @@ Public Class CurrentProjectPageUC
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
'NewProject()
|
||||
|
||||
' Nascondo progress e testo per fotografia
|
||||
PhotoProgressStackPanel.Visibility = Windows.Visibility.Hidden
|
||||
' Nascondo progress per fotografia
|
||||
PhotoProgress.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
Else
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White"
|
||||
<TextBlock Name="FilePathTxBl" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<Grid Grid.Row="1" Grid.RowSpan="2">
|
||||
@@ -46,7 +46,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Name="FileListBox"
|
||||
ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
ItemsSource="{Binding ItemList}"
|
||||
ItemContainerStyle="{DynamicResource ItemList}"/>
|
||||
|
||||
<Grid Grid.Row="1" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
+270
-562
@@ -14,7 +14,6 @@
|
||||
Imports System.Threading
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class Camera
|
||||
|
||||
@@ -26,67 +25,40 @@ Public Class Camera
|
||||
Private m_bCalcContour As Boolean = False
|
||||
Private m_nCameraCount As Integer = 0
|
||||
Private m_sCameraPath As String = String.Empty
|
||||
'Private m_sCameraPath2 As String = String.Empty
|
||||
Private m_sCameraPath2 As String = String.Empty
|
||||
Private m_sCameraProcName As String = String.Empty
|
||||
'Private m_sCameraProcName2 As String = String.Empty
|
||||
Private m_sCameraProcName2 As String = String.Empty
|
||||
Private m_sImage As String = String.Empty
|
||||
'Private m_sImage2 As String = String.Empty
|
||||
Private m_sImage2 As String = String.Empty
|
||||
Private m_sInfo As String = String.Empty
|
||||
'Private m_sInfo2 As String = String.Empty
|
||||
Private m_sInfo2 As String = String.Empty
|
||||
Private m_sResult As String = String.Empty
|
||||
'Private m_sResult2 As String = String.Empty
|
||||
Private m_sResult2 As String = String.Empty
|
||||
Private m_sContour As String = String.Empty
|
||||
'Private m_sContour2 As String = String.Empty
|
||||
Private m_sContour2 As String = String.Empty
|
||||
Private m_nThreshold As Integer = 60
|
||||
Private m_dTolerance As Double = 5
|
||||
Private m_nTimeout As Integer = 30
|
||||
Private m_sImageDir As String = String.Empty
|
||||
|
||||
Private Const CAMERAMNG As String = "CameraMng"
|
||||
Private Const N_LOOP As Integer = 20
|
||||
|
||||
'Public m_ProcessCmg As New Process()
|
||||
|
||||
' Lista dei processi Cmg associati ad igni tavola
|
||||
Public m_ProcessCmgList As New List(Of Process)
|
||||
' restituisce lo stato che il processo associato alla tavola corrente (PrepareCamera)
|
||||
Private m_bIsRunnigProc As Boolean = False
|
||||
' restituisce l'esito dello scatto di una foto
|
||||
Private m_bClickOk As Boolean = False
|
||||
Private m_dClickOk As Double = 10
|
||||
' restituisce l'esito dello scatto di una foto
|
||||
Private m_bCorrectedImgOk As Boolean = False
|
||||
Private m_dCorrectedImgOk As Double = 10
|
||||
' restituisce l'esito di salvataggio BackImage
|
||||
Private m_bSavedBackImage As Boolean = False
|
||||
Private m_dSavedBackImage As Double = 90
|
||||
'
|
||||
Private m_bDowloadedPicFromCamera As Boolean = False
|
||||
Private m_dDowloadedPicFromCamera As Double = 10
|
||||
'
|
||||
Private m_bReadOCV As Boolean = False
|
||||
Private m_dReadOCV As Double = 10
|
||||
'
|
||||
Private m_bStartDistCorrect As Boolean = False
|
||||
Private m_dStartDistCorrect As Double = 30
|
||||
'
|
||||
Private m_bStartProspCorrect As Boolean = False
|
||||
Private m_dStartProspCorrect As Double = 20
|
||||
|
||||
Private DeltaCameraTab As Integer = 0
|
||||
|
||||
' Flag per foto in esecuzione
|
||||
Friend m_bBusy As Boolean = False
|
||||
|
||||
Public Function Init() As Boolean
|
||||
' Lettura dati di configurazione da file Ini
|
||||
m_bCameraLink = (GetPrivateProfileInt(S_GENERAL, K_CAMERALINK, 0, m_MainWindow.GetIniFile()) <> 0) And
|
||||
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE)
|
||||
Not m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE)
|
||||
m_nCameraCount = GetPrivateProfileInt(S_CAMERA, K_CAM_COUNT, 1, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_EXEPATH, "", m_sCameraPath, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_IMAGE, "", m_sImage, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_INFO, "", m_sInfo, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_RESULT, "", m_sResult, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_CONTOUR, "", m_sContour, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_EXEPATH2, "", m_sCameraPath2, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_IMAGE2, "", m_sImage2, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_INFO2, "", m_sInfo2, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_RESULT2, "", m_sResult2, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_CONTOUR2, "", m_sContour2, m_MainWindow.GetIniFile())
|
||||
m_nThreshold = GetPrivateProfileInt(S_CAMERA, K_CAM_THRESHOLD, 60, m_MainWindow.GetIniFile())
|
||||
m_dTolerance = GetPrivateProfileDouble(S_CAMERA, K_CAM_TOLERANCE, 5, m_MainWindow.GetIniFile())
|
||||
m_nTimeout = GetPrivateProfileInt(S_CAMERA, K_CAM_TIMEOUT, 30, m_MainWindow.GetIniFile())
|
||||
@@ -96,15 +68,42 @@ Public Class Camera
|
||||
(GetPrivateProfileInt(S_GENERAL, K_CONTOURFROMCAMERA, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Ricavo il nome del processo associato
|
||||
m_sCameraProcName = Path.GetFileNameWithoutExtension(m_sCameraPath)
|
||||
' Avvio processi del camera manager per ogni tavola
|
||||
CamerasHide()
|
||||
Return True
|
||||
m_sCameraProcName2 = Path.GetFileNameWithoutExtension(m_sCameraPath2)
|
||||
' Se camera abilitata, lancio l'esecuzione in cieco
|
||||
If m_bCameraLink Then
|
||||
If m_nCameraCount <> 2 Then
|
||||
Dim bOk As Boolean = True
|
||||
If Not CameraHide(1) Then
|
||||
bOk = False
|
||||
EgtOutLog("CameraMng not starting")
|
||||
End If
|
||||
Return bOk
|
||||
Else
|
||||
Dim bOk As Boolean = True
|
||||
If Not CameraHide(1) Then
|
||||
bOk = False
|
||||
EgtOutLog("CameraMng 1 not starting")
|
||||
End If
|
||||
If Not CameraHide(2) Then
|
||||
bOk = False
|
||||
EgtOutLog("CameraMng 2 not starting")
|
||||
End If
|
||||
Return bOk
|
||||
End If
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function Close() As Boolean
|
||||
If m_bBusy Then Return False
|
||||
If m_bCameraLink Then
|
||||
KillProcess()
|
||||
If m_nCameraCount <> 2 Then
|
||||
KillProcess(1)
|
||||
Else
|
||||
KillProcess(1)
|
||||
KillProcess(2)
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -155,194 +154,191 @@ Public Class Camera
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' OK: Restituisce la tavola a cui è associato il processo
|
||||
Private Function GetCurrentTableFromCameraProcess(nIndProc As Integer) As Integer
|
||||
Dim nIndTab As Integer = 1
|
||||
Select Case DeltaCameraTab
|
||||
Case 0
|
||||
nIndTab = nIndProc
|
||||
Case 1
|
||||
' La cameraHq è sempre associata all'ultimo processo e sempre alla prima tavola
|
||||
nIndTab = 1
|
||||
Case -1
|
||||
nIndTab = GetCurrentTable()
|
||||
End Select
|
||||
|
||||
Return nIndTab
|
||||
End Function
|
||||
|
||||
' OK: Restituisce il processo a cui è associata la tavola
|
||||
Private Function GetProcessFromCurrentTable(nIndTab As Integer) As Integer
|
||||
Dim nIndProc As Integer = 1
|
||||
Select Case DeltaCameraTab
|
||||
Case 0
|
||||
' Indice di processo uguale all'indice della tavola
|
||||
nIndProc = nIndTab
|
||||
Case 1
|
||||
' Alla tavola 1 possono essre associati 2 processi (solo se camera Hq abilitata e attiva)
|
||||
If nIndTab = 1 And
|
||||
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso
|
||||
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) <> 0) Then
|
||||
' forzo l'utilizzo della seconda Hq (sopra alla tavola 1 di lavoro)
|
||||
nIndProc = nIndTab + 1
|
||||
Else
|
||||
nIndProc = 1
|
||||
End If
|
||||
Case -1
|
||||
nIndProc = 1
|
||||
End Select
|
||||
|
||||
Return nIndProc
|
||||
End Function
|
||||
|
||||
' OK: Avvio un processo per ogni tavola presente in macchina
|
||||
Public Function CamerasHide() As Boolean
|
||||
Public Function CameraHide(nInd As Integer) As Boolean
|
||||
' Lancio il programma in cieco, se già attivo lo nascondo
|
||||
m_nCameraCount = GetTableCount()
|
||||
|
||||
' Se esiste una configurazione, ne verifico la sua valità
|
||||
If m_MainWindow.m_CurrentMachine.CameraCounter > -1 Then
|
||||
DeltaCameraTab = m_MainWindow.m_CurrentMachine.CameraCounter - GetTableCount()
|
||||
Select Case DeltaCameraTab
|
||||
Case 0
|
||||
' ad ogni tavola associo una camera/configurazione
|
||||
Case 1
|
||||
' Gestisco correttamente solo il caso: 1 tavola e 2 camere
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
m_nCameraCount = m_nCameraCount + 1
|
||||
End If
|
||||
Case -1
|
||||
' Gestisco correttamente solo il caso: 2 tavole e 1 camera
|
||||
m_nCameraCount = m_nCameraCount - 1
|
||||
Case Else
|
||||
EgtOutLog(" 🚨 CAUTION : Differenza tra numero di camere e numero di tavole: " & DeltaCameraTab.ToString &
|
||||
", sarà attivata solo la prima camera.")
|
||||
DeltaCameraTab = 0
|
||||
End Select
|
||||
Else
|
||||
EgtOutLog(" 🚨 CAUTION : In file *.ini machine '[Photo]' there is not param 'CameraCounter'.")
|
||||
' Aggiungo un altro processo se camera Hq abilitata (non esite una vera tavola associata)
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
m_nCameraCount = m_nCameraCount + 1
|
||||
DeltaCameraTab = 1
|
||||
End If
|
||||
End If
|
||||
|
||||
Try
|
||||
For Index As Integer = 1 To m_nCameraCount
|
||||
Dim m_ProcessCmg As New Process()
|
||||
m_ProcessCmg.StartInfo.FileName = m_sCameraPath
|
||||
m_ProcessCmg.StartInfo.RedirectStandardInput = True
|
||||
m_ProcessCmg.StartInfo.RedirectStandardOutput = True
|
||||
' Assegno argomento 0 per avvio in cieco, index per specificare il numero di processo
|
||||
m_ProcessCmg.StartInfo.Arguments = "0" & " " & Index.ToString()
|
||||
m_ProcessCmg.StartInfo.UseShellExecute = False
|
||||
m_ProcessCmg.StartInfo.CreateNoWindow = True
|
||||
AddHandler m_ProcessCmg.OutputDataReceived, AddressOf Thread_OutputDataReceived
|
||||
If m_ProcessCmg.Start() Then
|
||||
m_ProcessCmg.BeginOutputReadLine()
|
||||
' Richiesta lettura configurazione corrente
|
||||
m_ProcessCmg.StandardInput.WriteLine("0")
|
||||
m_ProcessCmgList.Add(m_ProcessCmg)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Process.Start(If(nInd <> 2, m_sCameraPath, m_sCameraPath2), "0")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
' OK: Creo un nuovo processo associato alla tavola indicata
|
||||
Public Function ReloadCameraHide(nInd As Integer) As Boolean
|
||||
Dim m_ProcessCmg As New Process()
|
||||
m_ProcessCmg.StartInfo.FileName = m_sCameraPath
|
||||
m_ProcessCmg.StartInfo.RedirectStandardInput = True
|
||||
m_ProcessCmg.StartInfo.RedirectStandardOutput = True
|
||||
' Assegno argomento 0 per avvio in cieco, index per specificare il numero di processo
|
||||
m_ProcessCmg.StartInfo.Arguments = "0" & " " & nInd.ToString()
|
||||
m_ProcessCmg.StartInfo.UseShellExecute = False
|
||||
m_ProcessCmg.StartInfo.CreateNoWindow = True
|
||||
AddHandler m_ProcessCmg.OutputDataReceived, AddressOf Thread_OutputDataReceived
|
||||
If m_ProcessCmg.Start() Then
|
||||
m_ProcessCmg.BeginOutputReadLine()
|
||||
m_ProcessCmgList(nInd) = m_ProcessCmg
|
||||
Public Function CameraShow(nInd As Integer) As Boolean
|
||||
' Lancio il programma in modo visibile, se già attivo lo rendo visibile
|
||||
Try
|
||||
Process.Start(If(nInd <> 2, m_sCameraPath, m_sCameraPath2), "1")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function CameraTest(nInd As Integer) As Boolean
|
||||
' Cancello il risultato
|
||||
If My.Computer.FileSystem.FileExists(If(nInd <> 2, m_sResult, m_sResult2)) Then
|
||||
My.Computer.FileSystem.DeleteFile(If(nInd <> 2, m_sResult, m_sResult2))
|
||||
End If
|
||||
' Lancio il programma per sapere se macchina fotografica collegata
|
||||
Try
|
||||
' Interrogo
|
||||
Process.Start(If(nInd <> 2, m_sCameraPath, m_sCameraPath2), "3")
|
||||
' Ciclo di attesa risultato
|
||||
Dim nMaxThick = 10 * 4
|
||||
For nThick As Integer = 0 To nMaxThick
|
||||
' Se esiste il file di risultato
|
||||
Dim nErr = 999
|
||||
If VerifyResult(nInd, nErr) Then
|
||||
Return (nErr = 0)
|
||||
End If
|
||||
' Aspetto 100 ms
|
||||
Thread.Sleep(100)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
'
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' OK: Ogni processo cameramanager che restituisce un messaggio passa di qua
|
||||
Private Sub Thread_OutputDataReceived(sender As Object, e As DataReceivedEventArgs)
|
||||
' Il formato del messaggio è 'esempio messaggio: #IndProc'
|
||||
If Not IsNothing(e.Data) Then
|
||||
Dim sMsg As String() = e.Data.Split(":"c)
|
||||
' reinserisco eventuali ":" che sono stati rimossi
|
||||
If sMsg.Length > 2 Then
|
||||
For Index As Integer = 2 To sMsg.Length - 1
|
||||
sMsg(1) &= ":" & sMsg(Index)
|
||||
Next
|
||||
End If
|
||||
If sMsg.Length > 1 Then
|
||||
Select Case sMsg(0)
|
||||
' Metodo WaitingForInstruction
|
||||
' Se richiesto comando 7 stampo questo messaggio
|
||||
Case "PROCESSO ATTIVO"
|
||||
m_bIsRunnigProc = True
|
||||
' Metodo TakeFoto
|
||||
Case "SCATTO FOTO AVVENUTO"
|
||||
m_bClickOk = True
|
||||
' Metodo Camera_DownloadedCompleted
|
||||
Case "DOWNLOAD DA CAMERA COMPLETATO"
|
||||
m_bDowloadedPicFromCamera = True
|
||||
' Metodo LeggiFileCalibrazioneLenteOCV
|
||||
Case "LETTURA OCV"
|
||||
m_bReadOCV = True
|
||||
' Metodo CorrezioneCompleta
|
||||
Case "RICHIESTA CORREZIONE DISTORSIONE"
|
||||
m_bStartDistCorrect = True
|
||||
Case "RICHIESTA CORREZIONE PROSPETTICA"
|
||||
m_bStartProspCorrect = True
|
||||
' Metodo CorreggiProspettivaDaMatriceOCV
|
||||
Case "FINE CREAZIONE IMMAGINE CON CORREZIONE OCV"
|
||||
m_bCorrectedImgOk = True
|
||||
' Metodo SalvaNuovoBackGround
|
||||
Case "BACKIMAGE PRONTA"
|
||||
m_bSavedBackImage = True
|
||||
End Select
|
||||
If m_MainWindow.GetDebug > 3 Then
|
||||
EgtOutLog(" § " & sMsg(0) & " Process_" & sMsg(1))
|
||||
End If
|
||||
Private Function PrepareCamera() As Integer
|
||||
' Determino la camera da utilizzare, se più di una (max 2)
|
||||
Dim nInd As Integer = 1
|
||||
If m_nCameraCount = 2 Then
|
||||
nInd = GetCurrentTable()
|
||||
' verifico se la macchina è configurata per fotocamera sulla tavola di lavoro
|
||||
If (GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso
|
||||
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) <> 0) Then
|
||||
' forzo l'utilizzo della seconda camera (sopra alla tavola di lavoro)
|
||||
nInd = 2
|
||||
End If
|
||||
If nInd <> 1 And nInd <> 2 Then Return 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' OK : Accendo fari e vado in Home
|
||||
Private Sub PrepareMachine(nInd As Integer)
|
||||
' ------------------------------------ accensione riflettori ------------------------------------
|
||||
Dim sPLCVarSpotLightList As New List(Of String)
|
||||
For IndexSpot As Integer = 1 To GetTableCount()
|
||||
Dim sPLCVarSpotLight As String = String.Empty
|
||||
GetPrivateProfileString(S_NCDATA, K_SPOTLIGHT & IndexSpot.ToString(), "", sPLCVarSpotLight, m_MainWindow.GetMachIniFile())
|
||||
' eventualmente rimuovo inizio stringa: "PLC, ___"
|
||||
Dim sItemString() As String = Split(sPLCVarSpotLight, ","c)
|
||||
If sItemString.Count > 1 Then
|
||||
sPLCVarSpotLight = sItemString(1).Trim
|
||||
' Se gestore macchina non attivo, lo lancio in modo cieco
|
||||
If Not ProcessIsRunning(nInd) Then
|
||||
If Not CameraHide(nInd) Then
|
||||
Return 0
|
||||
End If
|
||||
' Aspetto 5000 ms
|
||||
Thread.Sleep(5000)
|
||||
' Altrimenti richiedo verifica di camera connessa
|
||||
Else
|
||||
If Not CameraTest(nInd) Then
|
||||
Return 0
|
||||
End If
|
||||
' Aspetto 100 ms
|
||||
Thread.Sleep(100)
|
||||
End If
|
||||
Return nInd
|
||||
End Function
|
||||
|
||||
Public Function CameraBackImage() As Boolean
|
||||
' Verifiche preliminari
|
||||
Dim nInd As Integer = PrepareCamera()
|
||||
If nInd = 0 Then Return False
|
||||
' Visualizzo progressbar
|
||||
m_bBusy = True
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Visibility = Visibility.Visible
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = 1
|
||||
' Cancellazione eventuali vecchi file rimasti
|
||||
Try
|
||||
If My.Computer.FileSystem.FileExists(If(nInd <> 2, m_sResult, m_sResult2)) Then
|
||||
My.Computer.FileSystem.DeleteFile(If(nInd <> 2, m_sResult, m_sResult2))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
' Scatto una foto come sfondo (il programma deve essere già attivo)
|
||||
Dim bOk As Boolean = False
|
||||
Try
|
||||
Process.Start(If(nInd <> 2, m_sCameraPath, m_sCameraPath2), "4")
|
||||
bOk = WaitBackImage(nInd)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
End Try
|
||||
' Nascondo progressbar
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Visibility = Visibility.Hidden
|
||||
m_bBusy = False
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function WaitBackImage(nInd As Integer) As Boolean
|
||||
' Ciclo di ricerca foto scattata
|
||||
Dim nMaxThick = 10 * m_nTimeout
|
||||
For nThick As Integer = 0 To nMaxThick
|
||||
' Se esiste il file di risultato
|
||||
Dim nErr = 999
|
||||
If VerifyResult(nInd, nErr) Then
|
||||
If nErr = 0 Then
|
||||
Return True
|
||||
Else
|
||||
EgtOutLog("Camera err=" & nErr.ToString())
|
||||
Return False
|
||||
End If
|
||||
' Altrimenti aspetto
|
||||
Else
|
||||
' Imposto ProgressBar
|
||||
Dim nProgress As Integer = CInt(nThick * 100 / nMaxThick)
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = nProgress
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Aspetto 100 ms
|
||||
Thread.Sleep(100)
|
||||
End If
|
||||
sPLCVarSpotLightList.Add(sPLCVarSpotLight)
|
||||
Next
|
||||
EgtOutLog("Camera generic error")
|
||||
' Chiudo il gestore della macchina per resettarlo
|
||||
KillProcess(nInd)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function CameraClick() As Boolean
|
||||
' Verifiche preliminari
|
||||
Dim nInd As Integer = PrepareCamera()
|
||||
' Visualizzo progressbar
|
||||
m_bBusy = True
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Visibility = Visibility.Visible
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = 1
|
||||
' Cancellazione eventuali vecchi file rimasti
|
||||
Try
|
||||
If My.Computer.FileSystem.FileExists(If(nInd <> 2, m_sResult, m_sResult2)) Then
|
||||
My.Computer.FileSystem.DeleteFile(If(nInd <> 2, m_sResult, m_sResult2))
|
||||
End If
|
||||
If My.Computer.FileSystem.FileExists(If(nInd <> 2, m_sImage, m_sImage2)) Then
|
||||
My.Computer.FileSystem.DeleteFile(If(nInd <> 2, m_sImage, m_sImage2))
|
||||
End If
|
||||
If My.Computer.FileSystem.FileExists(If(nInd <> 2, m_sContour, m_sContour2)) Then
|
||||
My.Computer.FileSystem.DeleteFile(If(nInd <> 2, m_sContour, m_sContour2))
|
||||
End If
|
||||
If My.Computer.FileSystem.FileExists(If(nInd <> 2, m_sInfo, m_sInfo2)) Then
|
||||
My.Computer.FileSystem.DeleteFile(If(nInd <> 2, m_sInfo, m_sInfo2))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
' ------------------------------------ accensione riflettori ------------------------------------
|
||||
Dim sPLCVarSpotLight1 As String = String.Empty
|
||||
GetPrivateProfileString(S_NCDATA, K_SPOTLIGHT1, "", sPLCVarSpotLight1, m_MainWindow.GetMachIniFile())
|
||||
Dim sPLCVarSpotLight2 As String = String.Empty
|
||||
GetPrivateProfileString(S_NCDATA, K_SPOTLIGHT2, "", sPLCVarSpotLight2, m_MainWindow.GetMachIniFile())
|
||||
Dim nPhotoDeley As Integer = GetPrivateProfileInt(S_NCNUM, K_PHOTODELEY, "100", m_MainWindow.GetMachIniFile())
|
||||
|
||||
' eventualmente rimuovo inizio stringa: "PLC, ___"
|
||||
Dim sItemString1() As String = Split(sPLCVarSpotLight1, ","c)
|
||||
If sItemString1.Count > 1 Then
|
||||
sPLCVarSpotLight1 = sItemString1(1).Trim
|
||||
End If
|
||||
Dim sItemString2() As String = Split(sPLCVarSpotLight2, ","c)
|
||||
If sItemString2.Count > 1 Then
|
||||
sPLCVarSpotLight2 = sItemString2(1).Trim
|
||||
End If
|
||||
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
Case 1, 2
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
||||
' solo per Flexium
|
||||
m_MainWindow.m_CNCommunication.m_CN.DPlcVariables_WriteVariables(sPLCVarSpotLightList(nInd - 1), "1")
|
||||
m_MainWindow.m_CNCommunication.m_CN.DPlcVariables_WriteVariables(If(nInd <> 2, sPLCVarSpotLight1, sPLCVarSpotLight2), "1")
|
||||
' altrimenti scrittura delle variabili E
|
||||
Else
|
||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(sPLCVarSpotLightList(nInd - 1), "1")
|
||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(If(nInd <> 2, sPLCVarSpotLight1, sPLCVarSpotLight2), "1")
|
||||
End If
|
||||
System.Threading.Thread.Sleep(nPhotoDeley)
|
||||
Case 3
|
||||
@@ -355,8 +351,25 @@ Public Class Camera
|
||||
If Not GoHomeForPhoto() Then
|
||||
EgtOutLog("Error in positioning")
|
||||
End If
|
||||
|
||||
' ------------------------------------ mando la testa in home ------------------------------------
|
||||
End Sub
|
||||
|
||||
' Scatto una foto con eventuale riconoscimento del contorno (il programma deve essere già attivo)
|
||||
Dim bOk As Boolean = False
|
||||
Dim sArgs As String = "2 0"
|
||||
If m_bCalcContour Then sArgs = " 5 0 " & m_nThreshold.ToString() & " 0"
|
||||
Try
|
||||
Process.Start(If(nInd <> 2, m_sCameraPath, m_sCameraPath2), sArgs)
|
||||
bOk = WaitPhoto(nInd)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message())
|
||||
bOk = False
|
||||
End Try
|
||||
' Nascondo progressbar
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Visibility = Visibility.Hidden
|
||||
m_bBusy = False
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function GoHomeForPhoto() As Boolean
|
||||
Dim bGoHome As Boolean = GetPrivateProfileInt(S_PHOTO, K_ENABELE_GOHOME_FOR_PHOTO, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||
@@ -418,359 +431,55 @@ Public Class Camera
|
||||
Return bPositionOk
|
||||
End Function
|
||||
|
||||
' OK: Ottengo l'indice del processo associato alla tavola e la configurazione del processo
|
||||
Private Function PrepareCamera() As Integer
|
||||
' Stati del processo
|
||||
m_bIsRunnigProc = False
|
||||
m_bClickOk = False
|
||||
m_bCorrectedImgOk = False
|
||||
m_bSavedBackImage = False
|
||||
' Argomento utilizzato per verificare lo stato della comunicazione
|
||||
Dim sArgs As String = "7"
|
||||
Dim nIndTab As Integer = GetCurrentTable()
|
||||
Dim nIndProc As Integer = GetProcessFromCurrentTable(nIndTab)
|
||||
' Invio richiesta al processo per vedere se la comunicazione è aperta
|
||||
Try
|
||||
If Not m_ProcessCmgList(nIndProc - 1).HasExited Then
|
||||
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine(sArgs)
|
||||
Else
|
||||
Return -2
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message())
|
||||
End Try
|
||||
' Attendo massimo N_LOOP secondi per avere una risposta dal programma (la risposta arriva al metodo Thread_OutputDataReceived)
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bIsRunnigProc Then Exit For
|
||||
Next
|
||||
' Se processo non attivo allora provo a rilanciarlo
|
||||
If Not m_bIsRunnigProc Then
|
||||
EgtOutLog(" ~ PROCESSO NON RISPONDE: Process_" & (nIndProc).ToString())
|
||||
ReloadCameraHide(nIndProc - 1)
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
' Invio richiesta al processo per vedere se la comunicazione è aperta
|
||||
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine(sArgs)
|
||||
If m_bIsRunnigProc Then Exit For
|
||||
Next
|
||||
End If
|
||||
|
||||
' -----------------------------------------------------------------
|
||||
' ----- PREPARAZIONE PERCORSO FILE -----
|
||||
' -----------------------------------------------------------------
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_IMAGE, "", m_sImage, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_INFO, "", m_sInfo, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_RESULT, "", m_sResult, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_CONTOUR, "", m_sContour, m_MainWindow.GetIniFile())
|
||||
|
||||
m_sImage = m_sImage.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
m_sInfo = m_sInfo.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
m_sResult = m_sResult.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
m_sContour = m_sContour.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
|
||||
Return If(m_bIsRunnigProc, nIndProc, -1)
|
||||
End Function
|
||||
|
||||
' OK: Scatto foto e aspetto WaitBackImage
|
||||
Public Function CameraBackImage() As Boolean
|
||||
' Verifiche preliminari
|
||||
Dim nIndProc As Integer = PrepareCamera()
|
||||
' Se non è stato trovato il processo associato alla tavola allora esco
|
||||
Select Case nIndProc
|
||||
Case -2
|
||||
EgtOutLog("Direttorio di configurazione 'CamerMng" & GetCurrentTable().ToString() & "' non è stato trovato")
|
||||
Case -1
|
||||
EgtOutLog("Camera " & GetCurrentTable().ToString() & " spenta")
|
||||
End Select
|
||||
If nIndProc < 0 Then Return False
|
||||
' Visualizzo progressbar
|
||||
m_bBusy = True
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressStackPanel.Visibility = Visibility.Visible
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = 0
|
||||
' Cancellazione eventuali vecchi file rimasti
|
||||
Try
|
||||
If My.Computer.FileSystem.FileExists(m_sResult) Then
|
||||
My.Computer.FileSystem.DeleteFile(m_sResult)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
' Se richiesto: accendo fari ed eventualmente mando la testa in Home
|
||||
Dim nIndTab As Integer = GetCurrentTableFromCameraProcess(nIndProc)
|
||||
PrepareMachine(nIndTab)
|
||||
|
||||
' Scatto una foto come sfondo (il programma deve essere già attivo)
|
||||
Dim bOk As Boolean = False
|
||||
|
||||
Dim sArgs As String = "4"
|
||||
Try
|
||||
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine(sArgs)
|
||||
bOk = WaitBackImage(nIndProc)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
End Try
|
||||
' Nascondo progressbar
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressStackPanel.Visibility = Visibility.Hidden
|
||||
m_bBusy = False
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' OK: cerco l'immagine nella confidurazione di indica nInd
|
||||
Private Function WaitBackImage(nInd As Integer) As Boolean
|
||||
Dim dProgVal As Double = 0
|
||||
' verifico che abbia scattato la foto (dalla lettura degli eventi restituiti dal processo)
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "CLICK"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bClickOk Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = m_dClickOk
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = m_dClickOk / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = m_dClickOk
|
||||
If Not m_bClickOk Then Return False
|
||||
' verifico che sia stata scaricata l'immagine
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "DOWNLOAD PIC"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bDowloadedPicFromCamera Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dDowloadedPicFromCamera
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dDowloadedPicFromCamera / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = dProgVal + m_dDowloadedPicFromCamera
|
||||
If Not m_bDowloadedPicFromCamera Then Return False
|
||||
|
||||
' verifico che sia stata scaricata l'immagine
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "SAVE BACKIMG"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bSavedBackImage Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dSavedBackImage
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dSavedBackImage / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = dProgVal + m_dSavedBackImage
|
||||
If Not m_bSavedBackImage Then Return False
|
||||
|
||||
' Se esiste il file di risultato (NON ho modo di vedere se il risultato è andato a buon fine)
|
||||
Dim nErr = 999
|
||||
If VerifyResult(nInd, nErr) Then
|
||||
If nErr = 0 Then
|
||||
Return True
|
||||
Else
|
||||
EgtOutLog("Camera err=" & nErr.ToString())
|
||||
Return False
|
||||
End If
|
||||
Private Function WaitPhoto(nInd As Integer) As Boolean
|
||||
' Ciclo di ricerca foto scattata
|
||||
Dim nMaxThick = 10 * m_nTimeout
|
||||
For nThick As Integer = 0 To nMaxThick
|
||||
' Se esiste il file di risultato
|
||||
Dim nErr = 999
|
||||
If VerifyResult(nInd, nErr) Then
|
||||
If nErr = 0 Then
|
||||
' Copio i file
|
||||
Dim sImageDest As String = m_sImageDir & "\" & Path.GetFileName(If(nInd <> 2, m_sImage, m_sImage2))
|
||||
Dim sInfoDest As String = Path.ChangeExtension(sImageDest, "txt")
|
||||
File.Copy(If(nInd <> 2, m_sImage, m_sImage2), sImageDest, True)
|
||||
File.Copy(If(nInd <> 2, m_sInfo, m_sInfo2), sInfoDest, True)
|
||||
' Se richiesto il riconoscimento del contorno
|
||||
Dim sContourDest As String = String.Empty
|
||||
If m_bCalcContour Then
|
||||
sContourDest = Path.ChangeExtension(sImageDest, "dxf")
|
||||
File.Copy(If(nInd <> 2, m_sContour, m_sContour2), sContourDest, True)
|
||||
' altrimenti cancello eventuale contorno presente
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.RemoveContour()
|
||||
End If
|
||||
' Lancio caricamento della foto e del contorno
|
||||
m_MainWindow.m_CadCutPageUC.PostPhoto(sImageDest, sContourDest)
|
||||
Return True
|
||||
Else
|
||||
EgtOutLog("Camera err=" & nErr.ToString())
|
||||
Return False
|
||||
End If
|
||||
' Altrimenti aspetto
|
||||
End If
|
||||
|
||||
Else
|
||||
' Imposto ProgressBar
|
||||
Dim nProgress As Integer = CInt(nThick * 100 / nMaxThick)
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = nProgress
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Aspetto 100 ms
|
||||
Thread.Sleep(100)
|
||||
End If
|
||||
Next
|
||||
EgtOutLog("Camera generic error")
|
||||
' Chiudo il gestore della macchina per resettarlo
|
||||
KillProcess(nInd)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' OK: Scatto foto e aspetto WaitPhoto
|
||||
Public Function CameraClick() As Boolean
|
||||
' Verifiche preliminari
|
||||
Dim nIndProc As Integer = PrepareCamera()
|
||||
' Se non è stato trovato il processo associato alla tavola allora esco
|
||||
Select Case nIndProc
|
||||
Case -2
|
||||
EgtOutLog("Direttorio di configurazione 'CamerMng" & GetCurrentTable().ToString() & "' non è stato trovato")
|
||||
Case -1
|
||||
EgtOutLog("Camera " & GetCurrentTable().ToString() & " spenta")
|
||||
End Select
|
||||
If nIndProc < 0 Then Return False
|
||||
' Visualizzo progressbar
|
||||
m_bBusy = True
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressStackPanel.Visibility = Visibility.Visible
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = 0
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Cancellazione eventuali vecchi file rimasti
|
||||
Try
|
||||
If My.Computer.FileSystem.FileExists(m_sResult) Then
|
||||
My.Computer.FileSystem.DeleteFile(m_sResult)
|
||||
End If
|
||||
If My.Computer.FileSystem.FileExists(m_sImage) Then
|
||||
My.Computer.FileSystem.DeleteFile(m_sImage)
|
||||
End If
|
||||
If My.Computer.FileSystem.FileExists(m_sContour) Then
|
||||
My.Computer.FileSystem.DeleteFile(m_sContour)
|
||||
End If
|
||||
If My.Computer.FileSystem.FileExists(m_sInfo) Then
|
||||
My.Computer.FileSystem.DeleteFile(m_sInfo)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
' Se richiesto: accendo fari ed eventualmente mando la testa in Home
|
||||
Dim nIndTab As Integer = GetCurrentTableFromCameraProcess(nIndProc)
|
||||
PrepareMachine(nIndTab)
|
||||
|
||||
' Scatto una foto con eventuale riconoscimento del contorno (il programma deve essere già attivo)
|
||||
Dim bOk As Boolean = False
|
||||
Dim sArgs As String = "2"
|
||||
' Per ricavare il contorno bisogna passare i segunti valori: 5,Valore_Soglia
|
||||
If m_bCalcContour Then sArgs = "5" & "," & m_nThreshold.ToString()
|
||||
Try
|
||||
' invio la richiesta di scattare una foto
|
||||
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine(sArgs)
|
||||
bOk = WaitPhoto()
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message())
|
||||
bOk = False
|
||||
End Try
|
||||
' Nascondo progressbar
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressStackPanel.Visibility = Visibility.Hidden
|
||||
m_bBusy = False
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' OK: attendo che sia pronta l'immagine
|
||||
Private Function WaitPhoto() As Boolean
|
||||
Dim dProgVal As Double = 0
|
||||
' verifico che abbia scattato la foto (dalla lettura degli eventi restituiti dal processo)
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "CLICK"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bClickOk Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = m_dClickOk
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = m_dClickOk / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = m_dClickOk
|
||||
If Not m_bClickOk Then Return False
|
||||
'
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "DOWNLOAD PIC"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bDowloadedPicFromCamera Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dDowloadedPicFromCamera
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dDowloadedPicFromCamera / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = dProgVal + m_dDowloadedPicFromCamera
|
||||
If Not m_bDowloadedPicFromCamera Then Return False
|
||||
'
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "READ OCV"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bReadOCV Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dReadOCV
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dReadOCV / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = dProgVal + m_dReadOCV
|
||||
If Not m_bReadOCV Then Return False
|
||||
'
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "START DIST"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bStartDistCorrect Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dStartDistCorrect
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dStartDistCorrect / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = dProgVal + m_dStartDistCorrect
|
||||
If Not m_bStartDistCorrect Then Return False
|
||||
'
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "START PROSP"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bStartProspCorrect Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dStartProspCorrect
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dStartProspCorrect / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = dProgVal + m_dStartProspCorrect
|
||||
If Not m_bStartProspCorrect Then Return False
|
||||
' verifico che il processo di correzione della foto sia terminato correttamente
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "CORRECT IMG"
|
||||
For i As Integer = 0 To N_LOOP
|
||||
Thread.Sleep(1000)
|
||||
If m_bCorrectedImgOk Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dCorrectedImgOk
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Exit For
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = dProgVal + m_dCorrectedImgOk / N_LOOP * (i + 1)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
Next
|
||||
dProgVal = dProgVal + m_dCorrectedImgOk
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgressText.Content = "IMPORT IMG"
|
||||
' Copio i file
|
||||
Dim sImageDest As String = m_sImageDir & "\" & Path.GetFileName(m_sImage)
|
||||
Dim sInfoDest As String = Path.ChangeExtension(sImageDest, "txt")
|
||||
File.Copy(m_sImage, sImageDest, True)
|
||||
File.Copy(m_sInfo, sInfoDest, True)
|
||||
' Se richiesto il riconoscimento del contorno
|
||||
Dim sContourDest As String = String.Empty
|
||||
If m_bCalcContour Then
|
||||
sContourDest = Path.ChangeExtension(sImageDest, "dxf")
|
||||
File.Copy(m_sContour, sContourDest, True)
|
||||
' altrimenti cancello eventuale contorno presente
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.RemoveContour()
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Value = 95
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Lancio caricamento della foto e del contorno
|
||||
m_MainWindow.m_CadCutPageUC.PostPhoto(sImageDest, sContourDest)
|
||||
Return True
|
||||
|
||||
End Function
|
||||
|
||||
' OK: verifica che la backimage sia stata scaricata correttamente nel direttorio CameraMng#n
|
||||
Private Function VerifyResult(nInd As Integer, ByRef nErr As Integer) As Boolean
|
||||
' Se non esiste il file con il risultato
|
||||
If Not My.Computer.FileSystem.FileExists(m_sResult) Then
|
||||
If Not My.Computer.FileSystem.FileExists(If(nInd <> 2, m_sResult, m_sResult2)) Then
|
||||
Return False
|
||||
End If
|
||||
' Leggo il file
|
||||
@@ -778,7 +487,7 @@ Public Class Camera
|
||||
Try
|
||||
' Controllo errori nel file di info
|
||||
Dim sLine As String = String.Empty
|
||||
Dim sr As StreamReader = New StreamReader(m_sResult)
|
||||
Dim sr As StreamReader = New StreamReader(If(nInd <> 2, m_sResult, m_sResult2))
|
||||
Do While sr.Peek() > -1
|
||||
sLine = sr.ReadLine()
|
||||
sLine = sLine.Replace(" ", "")
|
||||
@@ -796,20 +505,19 @@ Public Class Camera
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function ProcessIsRunning() As Boolean
|
||||
Private Function ProcessIsRunning(nInd As Integer) As Boolean
|
||||
Dim Procs() As Process
|
||||
Procs = Process.GetProcessesByName(m_sCameraProcName)
|
||||
Procs = Process.GetProcessesByName(If(nInd <> 2, m_sCameraProcName, m_sCameraProcName2))
|
||||
Return (Procs.Length() > 0)
|
||||
End Function
|
||||
|
||||
' OK: chiudo tutti i processi che hanno il nome CameraMng.exe
|
||||
Private Sub KillProcess()
|
||||
Private Sub KillProcess(nInd As Integer)
|
||||
Dim Procs() As Process
|
||||
Procs = Process.GetProcessesByName(m_sCameraProcName)
|
||||
Procs = Process.GetProcessesByName(If(nInd <> 2, m_sCameraProcName, m_sCameraProcName2))
|
||||
For i As Integer = 0 To Procs.Length() - 1
|
||||
Procs(i).Kill()
|
||||
Procs(i).WaitForExit(2000)
|
||||
Next i
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
Reference in New Issue
Block a user