EgtCAM5 :
- aggiunta gestione drop dei file - aggiunto aggiornamento disegno utensile all'aggiornamento in batch dei dati utensili.
This commit is contained in:
@@ -318,20 +318,18 @@ Namespace EgtCAM5
|
||||
' Se file ddf, gestione creazione porta con Doors
|
||||
If sExt = ".ddf" Then
|
||||
' Se manca direttorio uso quello di default
|
||||
If String.IsNullOrWhiteSpace(IO.Path.GetDirectoryName(sFile)) Then
|
||||
If String.IsNullOrWhiteSpace(Path.GetDirectoryName(sFile)) Then
|
||||
Dim sDefDir As String = String.Empty
|
||||
GetPrivateProfileString(S_DOORS, K_DDFDEFAULTDIR, "", sDefDir)
|
||||
sFile = sDefDir & "\" & sFile
|
||||
End If
|
||||
' Ricoscimento flag
|
||||
Dim nFlag As Integer = 0
|
||||
If Environment.GetCommandLineArgs.Count() > 2 Then Int32.TryParse(Environment.GetCommandLineArgs(2), nFlag)
|
||||
If Environment.GetCommandLineArgs.Count() > 2 Then Integer.TryParse(Environment.GetCommandLineArgs(2), nFlag)
|
||||
Dim bNcGen As Boolean = (nFlag >= 1)
|
||||
Dim bExit As Boolean = (nFlag >= 2)
|
||||
' Esecuzione
|
||||
CreateDoors(sFile, bNcGen, bExit)
|
||||
EgtZoom(ZM.ALL)
|
||||
Application.Msn.NotifyColleagues(Application.EMITTITLE)
|
||||
OpenDoorFile(sFile, bNcGen, bExit)
|
||||
' Se richiesta uscita immediata
|
||||
If bExit Then Application.Msn.NotifyColleagues(Application.CLOSEAPPLICATIONCOMMAND)
|
||||
Return
|
||||
@@ -343,7 +341,7 @@ Namespace EgtCAM5
|
||||
If Environment.GetCommandLineArgs.Count() > 2 Then sMachine = Environment.GetCommandLineArgs(2)
|
||||
' Recupero flag
|
||||
Dim nFlag As Integer = 0
|
||||
If Environment.GetCommandLineArgs.Count() > 3 Then Int32.TryParse(Environment.GetCommandLineArgs(3), nFlag)
|
||||
If Environment.GetCommandLineArgs.Count() > 3 Then Integer.TryParse(Environment.GetCommandLineArgs(3), nFlag)
|
||||
Dim bTest As Boolean = (nFlag = 0)
|
||||
' Esecuzione
|
||||
UpdateTools(sFile, sMachine, bTest)
|
||||
@@ -352,16 +350,32 @@ Namespace EgtCAM5
|
||||
Return
|
||||
End If
|
||||
' Altrimenti gestione file standard
|
||||
OpenStdFile(sFile)
|
||||
End Sub
|
||||
|
||||
Friend Function OpenStdFile(sFile As String) As Boolean
|
||||
Dim nFileType As Integer = EgtGetFileType(sFile)
|
||||
Select Case nFileType
|
||||
Case FT.NGE, FT.NFE
|
||||
m_Controller.OpenProject(sFile, False)
|
||||
Return m_Controller.OpenProject(sFile, False)
|
||||
Case FT.DXF, FT.STL, FT.CNC, FT.CSF, FT.BTL
|
||||
m_Controller.ImportProject(sFile, False)
|
||||
Return m_Controller.ImportProject(sFile, False)
|
||||
Case FT.TSC, FT.LUA
|
||||
m_Controller.Exec(sFile, False)
|
||||
Return m_Controller.Exec(sFile, False)
|
||||
End Select
|
||||
End Sub
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function OpenDoorFile(sFile As String, Optional bNcGen As Boolean = False, Optional bBatch As Boolean = False) As Boolean
|
||||
' Formato descrizione porte
|
||||
If Path.GetExtension(sFile).ToLower() = ".ddf" Then
|
||||
CreateDoors(sFile, bNcGen, bBatch)
|
||||
EgtZoom(ZM.ALL)
|
||||
Application.Msn.NotifyColleagues(Application.EMITTITLE)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub EmitTitle()
|
||||
' nome file
|
||||
@@ -1249,7 +1263,7 @@ Namespace EgtCAM5
|
||||
Private Sub OnNewProject(ByVal sender As Object, ByVal bOk As Boolean) Handles m_Controller.OnNewProject
|
||||
EgtZoom(ZM.ALL)
|
||||
If Not bOk Then
|
||||
MessageBox.Show(EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1265,7 +1279,7 @@ Namespace EgtCAM5
|
||||
Else
|
||||
IniFile.m_MruFiles.Remove(sFile)
|
||||
Dim sMsg As String = EgtMsg(10003) & " '" & sFile & "'" 'Error opening file
|
||||
MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1283,7 +1297,7 @@ Namespace EgtCAM5
|
||||
Else
|
||||
IniFile.m_MruFiles.Remove(sFile)
|
||||
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
|
||||
MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1297,7 +1311,7 @@ Namespace EgtCAM5
|
||||
Else
|
||||
IniFile.m_MruFiles.Remove(sFile)
|
||||
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
|
||||
MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1312,7 +1326,7 @@ Namespace EgtCAM5
|
||||
nFlag = 0
|
||||
End If
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1321,7 +1335,7 @@ Namespace EgtCAM5
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile))
|
||||
If Not bOk Then
|
||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
||||
MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1332,7 +1346,7 @@ Namespace EgtCAM5
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTEXPDIR, Path.GetDirectoryName(sFile))
|
||||
If Not bOk Then
|
||||
Dim sMsg As String = EgtMsg(10007) & " '" & sFile & "'" 'Error exporting file
|
||||
MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1352,7 +1366,7 @@ Namespace EgtCAM5
|
||||
If m_bScriptInMru Then IniFile.m_MruScripts.Add(sFile)
|
||||
Else
|
||||
If m_bScriptInMru Then IniFile.m_MruScripts.Remove(sFile)
|
||||
MessageBox.Show(sError, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
MessageBox.Show(Application.Current.MainWindow, sError, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
' Disabilito progress e bottone stop
|
||||
Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSPROGRESS, 0)
|
||||
|
||||
Reference in New Issue
Block a user