EgtCAm5 :
- aggiunta gestione processing file btl da linea di comando.
This commit is contained in:
+21
-1
@@ -313,12 +313,29 @@ Public Class ProjectVM
|
||||
End Sub
|
||||
|
||||
Private Sub ProcessCommandLine()
|
||||
' Se non ci sono parametri su linea di comando, esco
|
||||
' Se non ci sono veri parametri su linea di comando, esco (il primo è sempre il nome del programma)
|
||||
If Environment.GetCommandLineArgs.Count() <= 1 Then Return
|
||||
' Recupero il primo vero parametro che dovrebbe essere il nome con estensione di un file
|
||||
Dim sFile As String = Environment.GetCommandLineArgs(1)
|
||||
Dim sExt As String = Path.GetExtension(sFile).ToLower()
|
||||
If String.IsNullOrWhiteSpace(sFile) OrElse String.IsNullOrWhiteSpace(sExt) Then Return
|
||||
' Se file btl con opzioni, gestione lavorazione travi
|
||||
If sExt = ".btl" And Environment.GetCommandLineArgs.Count() > 2 Then
|
||||
' Nome macchina
|
||||
Dim sMachine As String = ""
|
||||
If Environment.GetCommandLineArgs.Count() > 2 Then sMachine = Environment.GetCommandLineArgs(2)
|
||||
' Flag
|
||||
Dim nFlag As Integer = 1
|
||||
If Environment.GetCommandLineArgs.Count() > 3 Then Integer.TryParse(Environment.GetCommandLineArgs(3), nFlag)
|
||||
' File CN
|
||||
Dim sNcFile As String = ""
|
||||
If Environment.GetCommandLineArgs.Count() > 4 Then sNcFile = Environment.GetCommandLineArgs(4)
|
||||
' Esecuzione
|
||||
ExecBeam(sFile, sMachine, nFlag, sNcFile)
|
||||
' Se richiesta uscita immediata
|
||||
If nFlag = 0 Or nFlag = 3 Then Application.Msn.NotifyColleagues(Application.CLOSEAPPLICATIONCOMMAND)
|
||||
Return
|
||||
End If
|
||||
' Se file ddf, gestione creazione porta con Doors
|
||||
If sExt = ".ddf" Then
|
||||
' Se manca direttorio uso quello di default
|
||||
@@ -701,6 +718,9 @@ Public Class ProjectVM
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateProjectUI(bReloadUI As Boolean)
|
||||
OnUpdateUI(Nothing, bReloadUI)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Reference in New Issue
Block a user