EgtCAM5 :
- Introdotta modalità solo disegno.
This commit is contained in:
@@ -126,7 +126,7 @@ Namespace EgtCAM5
|
||||
Public ReadOnly Property CloseApplicationCommand() As ICommand
|
||||
Get
|
||||
If m_cmdCloseApplication Is Nothing Then
|
||||
m_cmdCloseApplication = New RelayCommand(AddressOf CloseApplication, AddressOf CanCloseApplication)
|
||||
m_cmdCloseApplication = New RelayCommand(AddressOf CloseApplication)
|
||||
End If
|
||||
Return m_cmdCloseApplication
|
||||
End Get
|
||||
@@ -136,6 +136,12 @@ Namespace EgtCAM5
|
||||
''' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
''' </summary>
|
||||
Public Sub CloseApplication(ByVal param As Object)
|
||||
If m_bScriptRunning Then
|
||||
If Not IniFile.m_bFailedRun Then
|
||||
'MessageBox.Show("Can't exit now. Wait until the end of the script execution", "", MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
'' Gestisco eventuale file corrente modificato
|
||||
Application.Msn.NotifyColleagues(Application.MANAGEMODIFIED)
|
||||
If m_allowWindowToClose Then
|
||||
@@ -162,19 +168,6 @@ Namespace EgtCAM5
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Returns true if the application can be closed
|
||||
''' </summary>
|
||||
Private Function CanCloseApplication(ByVal param As Object) As Boolean
|
||||
'' Impedisco uscita se script in esecuzione
|
||||
'If m_bScriptRunning Then
|
||||
' m_bStopScript = True
|
||||
' E.Cancel = True
|
||||
' Return
|
||||
'End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' CloseApplicationCommand
|
||||
|
||||
#Region "cmdMainWindow_ContentRendered"
|
||||
@@ -197,6 +190,10 @@ Namespace EgtCAM5
|
||||
Public Sub MainWindow_ContentRendered(ByVal param As Object)
|
||||
' Notify the ContentRendered event
|
||||
Application.Msn.NotifyColleagues(Application.MAINWINDOW_CONTENTRENDERED)
|
||||
' se sono in modalità solo cad
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then
|
||||
Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, "Impossible finding Machines dir. EgtCAM5 will run in CAD-ONLY mode.")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ContentRendered Command
|
||||
@@ -369,6 +366,8 @@ Namespace EgtCAM5
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
' imposto IniFile a EgtInterface
|
||||
EgtSetIniFile(m_sIniFile)
|
||||
' verifico se avviare programma in modalità CAD-ONLY
|
||||
IniFile.m_ProjectMode = If(GetPrivateProfileInt(S_GENERAL, K_ONLYDRAW, 0) = 0, ProjectModeOpt.DRAW, ProjectModeOpt.ONLYDRAW)
|
||||
' Impostazioni MruLists
|
||||
m_MruFiles.Init(S_MRUFILES, 8)
|
||||
m_MruScripts.Init(S_MRUSCRIPTS, 8)
|
||||
|
||||
Reference in New Issue
Block a user