-aggiunto finestre personalizzate messagebox e colorpicker
This commit is contained in:
@@ -54,7 +54,8 @@ Public Class EstimationsExpanderVM
|
||||
' Verifico che il file esista
|
||||
If Not File.Exists(sEstFile) Then
|
||||
' File delle stime non trovato
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
' Visualizzazione
|
||||
@@ -114,7 +115,8 @@ Public Class EstimationsExpanderVM
|
||||
If bAskSave Then
|
||||
If String.IsNullOrEmpty(sCurrFilePath) OrElse EgtGetModified() Then
|
||||
' Il progetto deve essere salvato prima di poter essere generato. Vuoi farlo ?
|
||||
If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
|
||||
'If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
|
||||
' Abbandono
|
||||
bOk = False
|
||||
Else
|
||||
@@ -129,7 +131,8 @@ Public Class EstimationsExpanderVM
|
||||
Else
|
||||
If String.IsNullOrEmpty(sCurrFilePath) Then
|
||||
' File delle stime non trovato
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
bOk = False
|
||||
End If
|
||||
End If
|
||||
@@ -179,9 +182,11 @@ Public Class EstimationsExpanderVM
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
sErr = sErr.Replace("Cnc", "Est")
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
bOk = False
|
||||
End If
|
||||
|
||||
+2
-1
@@ -85,7 +85,8 @@ Public Class MachiningTreeExpanderVM
|
||||
' Se l'operazione non è andata a buon fine
|
||||
If MachiningId = GDB_ID.NULL Then
|
||||
' Inserimento lavorazione non riuscito ERRORE
|
||||
MessageBox.Show(EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Map.refOperationsListExpanderVM.CancelOperationCmd()
|
||||
Return
|
||||
End If
|
||||
|
||||
+2
-1
@@ -136,7 +136,8 @@ Public Class FixtureParametersVM
|
||||
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
|
||||
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo
|
||||
EgtRemoveFixture(nAddedFixtureId)
|
||||
MessageBox.Show("No free hook point!", "ERROR")
|
||||
'MessageBox.Show("No free hook point!", "ERROR")
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "No free hook point!", "ERROR")
|
||||
Return
|
||||
End If
|
||||
Else
|
||||
|
||||
+6
-3
@@ -352,7 +352,8 @@ Public Class MachiningParameterExpanderVM
|
||||
sErrorList += Environment.NewLine + " - " + m_CurrOperation.GetErrorString([property])
|
||||
End If
|
||||
Next [property]
|
||||
MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
'MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -431,10 +432,12 @@ Public Class MachiningParameterExpanderVM
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
If Not String.IsNullOrEmpty(sInfo) Then sErr &= " " & sInfo
|
||||
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
'MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
' Errore nel calcolo della lavorazione!
|
||||
MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Else
|
||||
If EgtGetMachMgrWarningId(0) <> 0 Then
|
||||
|
||||
+4
-2
@@ -199,7 +199,8 @@ Public Class MachiningOpListBoxItem
|
||||
' verifico che il nome non inizi con disp
|
||||
If m_ModifiedName.StartsWith("disp", StringComparison.InvariantCultureIgnoreCase) Then
|
||||
m_CloseModifyLostFocus = False
|
||||
MessageBox.Show(EgtMsg(MSG_OPERATION + 21), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
'MessageBox.Show(EgtMsg(MSG_OPERATION + 21), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_OPERATION + 21), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
' Imposto il nuovo nome
|
||||
@@ -207,7 +208,8 @@ Public Class MachiningOpListBoxItem
|
||||
If Not EgtSetOperationName(Id, m_ModifiedName) Then
|
||||
m_Spy = False
|
||||
m_CloseModifyLostFocus = False
|
||||
MessageBox.Show(EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
'MessageBox.Show(EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
m_IsActive_ModifyName = True
|
||||
NotifyPropertyChanged(NameOf(ModifyName_Visibility))
|
||||
m_Spy = True
|
||||
|
||||
+4
-5
@@ -31,7 +31,7 @@
|
||||
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
|
||||
CommandParameter="{Binding Id}"/>
|
||||
</Border.InputBindings>
|
||||
<Grid Style="{StaticResource LayoutRoot}">
|
||||
<Grid Style="{StaticResource LayoutRoot}" FocusManager.FocusedElement="{Binding ElementName=Box}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -44,10 +44,9 @@
|
||||
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="150"
|
||||
x:Name="Box" x:Uid="Box"
|
||||
IsTabStop="False"
|
||||
x:Name="Box" IsEnabled="True" Focusable="True"
|
||||
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
|
||||
<TextBox.Style>
|
||||
<!--<TextBox.Style>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsSelected}" Value="True">
|
||||
@@ -55,7 +54,7 @@
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Style>
|
||||
</TextBox.Style>-->
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
|
||||
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
|
||||
|
||||
+22
-11
@@ -618,9 +618,11 @@ Public Class OperationsListExpanderVM
|
||||
' In caso di errori, li segnalo
|
||||
If Not bOk Then
|
||||
If Not String.IsNullOrEmpty(sErr) Then
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Else
|
||||
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_OPERATION + 11))
|
||||
@@ -651,7 +653,8 @@ Public Class OperationsListExpanderVM
|
||||
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
|
||||
If Not File.Exists(IniFile.m_sCurrMachScriptsDirPath & "\" & SETUP_LUA) Then
|
||||
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
|
||||
MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato,
|
||||
@@ -670,7 +673,8 @@ Public Class OperationsListExpanderVM
|
||||
EgtLuaGetGlobIntVar("STU.ERR", nErr)
|
||||
If nErr = 0 Then
|
||||
If EgtGetHeadExitCount(sHead) = 0 Then
|
||||
MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
@@ -867,18 +871,25 @@ Public Class OperationsListExpanderVM
|
||||
' verifico che il nome non sia già utilizzato
|
||||
Private Function NameVerifyer(Name As String) As Boolean
|
||||
If String.IsNullOrWhiteSpace(Name) Then
|
||||
MessageBox.Show(EgtMsg(MSG_EGTSAVEFILEDIALOG + 8),
|
||||
EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
|
||||
MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(MSG_EGTSAVEFILEDIALOG + 8),
|
||||
' EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
|
||||
' MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_EGTSAVEFILEDIALOG + 8),
|
||||
EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
|
||||
MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return False
|
||||
End If
|
||||
Dim TempName As String = Name
|
||||
EgtMdbGetMachiningNewName(TempName)
|
||||
If String.Compare(TempName, Name, True) = 0 Then Return True
|
||||
MessageBox.Show(Name & " " &
|
||||
EgtMsg(MSG_EGTSAVEFILEDIALOG + 3),
|
||||
EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
|
||||
MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(Name & " " &
|
||||
' EgtMsg(MSG_EGTSAVEFILEDIALOG + 3),
|
||||
' EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
|
||||
' MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, Name & " " &
|
||||
EgtMsg(MSG_EGTSAVEFILEDIALOG + 3),
|
||||
EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
|
||||
MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Public Class SimulationExpanderVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bOnlySimulation = value
|
||||
NotifyPropertyChanged("bOnlySimulation")
|
||||
NotifyPropertyChanged(NameOf(bOnlySimulation))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -102,12 +102,15 @@ Public Class SimulationExpanderVM
|
||||
If Not EgtGenerate(sCncFile, sInfo) Then
|
||||
Dim nErr = EgtGetLastMachMgrErrorId()
|
||||
If nErr = 1000 Then
|
||||
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
'MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
ElseIf nErr <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
'MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(5306), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(5306), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5306), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
bNcView = False
|
||||
Else
|
||||
@@ -165,9 +168,9 @@ Public Class SimulationExpanderVM
|
||||
Map.refTopCommandBarVM.DrawIsEnabled = False
|
||||
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
|
||||
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
|
||||
Map.refEstimationsExpanderVM.Estimation_IsEnabled =False
|
||||
Map.refEstimationsExpanderVM.Estimation_IsEnabled = False
|
||||
Map.refMachGroupPanelVM.SetMachGroupState(False)
|
||||
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
|
||||
Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -196,7 +199,7 @@ Public Class SimulationExpanderVM
|
||||
|
||||
Friend Function UpdateAllMachinings() As Boolean
|
||||
' Se disabilitato, esco
|
||||
If GetPrivateProfileInt( S_MACH, K_AUTOUPDATEALLMACHININGS, 1) = 0 Then Return True
|
||||
If GetPrivateProfileInt(S_MACH, K_AUTOUPDATEALLMACHININGS, 1) = 0 Then Return True
|
||||
' Eseguo ricalcolo
|
||||
Dim bModified As Boolean = EgtGetModified()
|
||||
Dim sErr As String = String.Empty
|
||||
@@ -204,9 +207,11 @@ Public Class SimulationExpanderVM
|
||||
' In caso di errori, li segnalo
|
||||
If Not bOk Then
|
||||
If Not String.IsNullOrEmpty(sErr) Then
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End If
|
||||
If Not bModified Then EgtResetModified()
|
||||
@@ -226,9 +231,11 @@ Public Class SimulationExpanderVM
|
||||
If Not bOk Then
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||
'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||
End If
|
||||
End If
|
||||
' Imposto stato corrente
|
||||
@@ -268,9 +275,11 @@ Public Class SimulationExpanderVM
|
||||
If Not EgtSimStart(False) Then
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||
'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||
End If
|
||||
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||
End If
|
||||
@@ -291,7 +300,7 @@ Public Class SimulationExpanderVM
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged(NameOf(PlayPauseImage))
|
||||
End If
|
||||
' Se movimento con collisione
|
||||
' Se movimento con collisione
|
||||
ElseIf nMove = MCH_SIM.COLLISION Then
|
||||
If m_bStopOnNextCollision Then
|
||||
' Imposto stato Pausa
|
||||
@@ -301,11 +310,12 @@ Public Class SimulationExpanderVM
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged(NameOf(PlayPauseImage))
|
||||
' Messaggio
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 19), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 19), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Else
|
||||
m_bStopOnNextCollision = True
|
||||
End If
|
||||
' Altrimenti movimento non riuscito
|
||||
' Altrimenti movimento non riuscito
|
||||
Else
|
||||
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||
' Aggiornamenti per bottone Play/Pause
|
||||
@@ -321,15 +331,19 @@ Public Class SimulationExpanderVM
|
||||
Case MCH_SIM.OUTSTROKE
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 2) & " " & sInfo, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 2) & " " & sInfo, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 2) & " " & sInfo, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
|
||||
Case MCH_SIM.DIR_ERR
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 3), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 3), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 3), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
|
||||
Case Else
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 4), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore - ERRORE
|
||||
'MessageBox.Show(EgtMsg(MSG_SIMULATION + 4), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 4), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore - ERRORE
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
@@ -366,7 +380,7 @@ Public Class SimulationExpanderVM
|
||||
End If
|
||||
Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
|
||||
If IniFile.m_bSimulEndExitApp Then
|
||||
refMainWindowVM.CloseApplication( Nothing)
|
||||
refMainWindowVM.CloseApplication(Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -399,7 +413,8 @@ Public Class SimulationExpanderVM
|
||||
If bAskSave Then
|
||||
If String.IsNullOrEmpty(sCurrFilePath) OrElse EgtGetModified() Then
|
||||
' Il progetto deve essere salvato prima di poter essere generato. Vuoi farlo ?
|
||||
If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
|
||||
'If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
|
||||
' Abbandono
|
||||
Return False
|
||||
Else
|
||||
@@ -413,11 +428,11 @@ Public Class SimulationExpanderVM
|
||||
End If
|
||||
End If
|
||||
sCncFile = ""
|
||||
#If PLATFORM = "x64" Then
|
||||
#If PLATFORM = "x64" Then
|
||||
sInfo = "EgtCAM5 64bit ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||
#Else
|
||||
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||
#End If
|
||||
#Else
|
||||
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||
#End If
|
||||
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
|
||||
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & sCncFile
|
||||
Else
|
||||
@@ -435,7 +450,7 @@ Public Class SimulationExpanderVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
|
||||
Friend Sub SimulationExpander_Update_CncData(nFlag As Integer)
|
||||
If Simulation_IsExpanded Then
|
||||
ShowCncData()
|
||||
' Se fermo per Collisione rilevata da script Lua
|
||||
|
||||
Reference in New Issue
Block a user