OmagCUT :
- aggiunta gestione SpecialSend con copia file per Effector.
This commit is contained in:
@@ -129,9 +129,17 @@
|
||||
|
||||
<GroupBox Name="SpecialSendGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.Column="2" Grid.ColumnSpan="1" Margin="5,0,5,0">
|
||||
<CheckBox Name="SpecialSendChBx"
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Name="SpecialSendChBx" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,0"/>
|
||||
Margin="0,0,0,0"/>
|
||||
<Button Name="SpecialSendBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
|
||||
@@ -41,8 +41,11 @@ Public Class MachineCNPageUC
|
||||
Dim nSpecialSend As Integer = GetPrivateProfileInt(S_NUMERICALCONTROL, K_SPECIALSEND, -1, m_MainWindow.GetMachIniFile())
|
||||
If nSpecialSend <> -1 Then
|
||||
SpecialSendChBx.IsChecked() = (nSpecialSend = 1)
|
||||
SpecialSendBtn.Content = "Run"
|
||||
SpecialSendGpBx.Header = "Special Send"
|
||||
SpecialSendGpBx.Visibility = Visibility.Visible
|
||||
Dim nSpecialAreas As Integer = GetPrivateProfileInt(S_NUMERICALCONTROL, K_SPECIALAREAS, 4, m_MainWindow.GetMachIniFile())
|
||||
If nSpecialAreas <> 0 Then SpecialSendBtn.Visibility = Visibility.Collapsed
|
||||
else
|
||||
SpecialSendGpBx.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
@@ -333,8 +336,27 @@ Public Class MachineCNPageUC
|
||||
MDITxBx.Background = Brushes.LightGray
|
||||
End Sub
|
||||
|
||||
Private Sub SpecialSend_Click(sender As Object, e As RoutedEventArgs) Handles SpecialSendChBx.Click
|
||||
m_MainWindow.m_CNCommunication.SpecialSend() = If( SpecialSendChBx.IsChecked(), 1, 0)
|
||||
Private Sub SpecialSendChBx_Click(sender As Object, e As RoutedEventArgs) Handles SpecialSendChBx.Click
|
||||
m_MainWindow.m_CNCommunication.SpecialSend = If( SpecialSendChBx.IsChecked(), 1, 0)
|
||||
End Sub
|
||||
|
||||
Private Sub SpecialSendBtn_Click(sender As Object, e As RoutedEventArgs) Handles SpecialSendBtn.Click
|
||||
' Recupero path dell'eseguibile
|
||||
Dim sSpecialExec As String = ""
|
||||
GetPrivateProfileString(S_NUMERICALCONTROL, K_SPECIALEXEC, "", sSpecialExec, m_MainWindow.m_CurrentMachine.sMachIniFile)
|
||||
' Verifico validità
|
||||
If String.IsNullOrWhiteSpace( sSpecialExec) Then
|
||||
EgtOutLog( "Warning : SpecialExec with empty name")
|
||||
End If
|
||||
' Recupero il nome
|
||||
Dim sSpecialName As String = IO.Path.GetFileNameWithoutExtension(sSpecialExec)
|
||||
' Mando in esecuzione
|
||||
Dim ProcsSpecial As Process() = Process.GetProcessesByName(sSpecialName)
|
||||
If ProcsSpecial.Length() > 0 Then
|
||||
ShowWindow(ProcsSpecial(0).MainWindowHandle, 3)
|
||||
Else
|
||||
Process.Start(sSpecialExec)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PowerON_Click(sender As Object, e As RoutedEventArgs) Handles PowerONBtn.Click
|
||||
|
||||
Reference in New Issue
Block a user