diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb index 9d9b681..d55f47a 100644 --- a/DoorParameters/Part.vb +++ b/DoorParameters/Part.vb @@ -2172,6 +2172,10 @@ Public Class Part MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_SWING_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error) Else ' carico il valore nella porta corrente + If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT AndAlso Not String.IsNullOrEmpty(OptionModule.ForcesSideSwing) Then + Swing = Swing.Remove(0, 1) + Swing = OptionModule.ForcesSideSwing & Swing + End If m_Swing = Swing OptionModule.SetCurrSwing(m_SwingAlias, m_Swing) If IsNothing(m_SwingAlias) Then Return -1 diff --git a/MainWindow/MainWindowModel.vb b/MainWindow/MainWindowModel.vb index 13b1df2..0dec354 100644 --- a/MainWindow/MainWindowModel.vb +++ b/MainWindow/MainWindowModel.vb @@ -76,8 +76,8 @@ Friend Class MainWindowModel m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey) ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(3279, 2611, 1, IniFile.m_nKeyLevel) And - EgtGetKeyOptions(3279, 2611, 1, IniFile.m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(3279, 2612, 1, IniFile.m_nKeyLevel) And + EgtGetKeyOptions(3279, 2612, 1, IniFile.m_nKeyOptions) 'Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/MainWindow/MainWindowV.xaml.vb b/MainWindow/MainWindowV.xaml.vb index 4de87cd..2d5b1cd 100644 --- a/MainWindow/MainWindowV.xaml.vb +++ b/MainWindow/MainWindowV.xaml.vb @@ -27,33 +27,7 @@ Class MainWindowV Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered ' se è assente la chiave di protezione non mostro la finestra Launcher - If Map.refSceneManagerVM.bProtectKey Then - If Not IsNothing(m_args) Then - ' leggo gli argomenti: Il programma si chiude appena termina la scrittura del file DDF - Dim Items() As String = m_args(0).Split(";"c) - If Items.Length = 5 Then - ' Avvio progetto - LauncherOpt.Open_last_project (1) - OptionModule.m_bLauncherOpenOnce = True - ' Indico il percorso del file - OptionModule.FileNameFromArgs = Items(0) - ' Assegno i valore Width, Height, Thickness - OptionModule.m_Width = Items(1) - OptionModule.m_Height = Items(2) - OptionModule.m_Thickness = Items(3) - ' Indico il percoso di salvataggio file DDF - OptionModule.SaveFileNameFromArgs = Items(4) - ' abilito lettura dati - OptionModule.AdjustDDT = True - Else - ' blocco lettura dati - OptionModule.AdjustDDT = False - ' TERMINO TUTTO SUBITO! - End - End If - End If - Map.refMainWindowVM.SetLauncher() - Map.refMainWindowVM.ShowErrorCompoLoad() - End If + RunBlindCode() End Sub Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing @@ -67,38 +41,48 @@ Class MainWindowV Private Sub RunBlindCode() If Map.refSceneManagerVM.bProtectKey Then - If Not IsNothing(m_args) Then - StartBlinProgdLog(IniFile.m_sTempDir & "\BlindProgLog.txt") - ' leggo gli argomenti: Il programma si chiude appena termina la scrittura del file DDF - Dim Items() As String = m_args(0).Split(";"c) - If Items.Length = 5 Then - ' Avvio progetto - LauncherOpt.Open_last_project (1) - OptionModule.m_bLauncherOpenOnce = True - ' Indico il percorso del file - OptionModule.FileNameFromArgs = Items(0) - BlindProgLog(" File '.ddt' input : " & OptionModule.FileNameFromArgs) - ' Assegno i valore Width, Height, Thickness - OptionModule.m_Width = Items(1) - BlindProgLog(" width : " & OptionModule.m_Width) - OptionModule.m_Height = Items(2) - BlindProgLog(" height : " & OptionModule.m_Height) - OptionModule.m_Thickness = Items(3) - BlindProgLog(" thickness : " & OptionModule.m_Thickness) - ' Indico il percoso di salvataggio file DDF - OptionModule.SaveFileNameFromArgs = Items(4) - BlindProgLog(" File '.ddf' output : " & OptionModule.SaveFileNameFromArgs) - ' abilito lettura dati - OptionModule.AdjustDDT = True - Else - ' blocco lettura dati - OptionModule.AdjustDDT = False - ' TERMINO TUTTO SUBITO! - End - End If - End If + ReadArgs() Map.refMainWindowVM.SetLauncher() Map.refMainWindowVM.ShowErrorCompoLoad() End If End Sub + ' Lettura degli argomenti e scrittura di un file di Log con i parametri caricati + Private Sub ReadArgs() + If Not IsNothing(m_args) Then + StartBlinProgdLog(IniFile.m_sTempDir & "\BlindProgLog.txt") + ' leggo gli argomenti: Il programma si chiude appena termina la scrittura del file DDF + Dim Items() As String = m_args(0).Split(";"c) + If Items.Length >= 5 Then + ' Avvio progetto - LauncherOpt.Open_last_project (1) + OptionModule.m_bLauncherOpenOnce = True + ' Indico il percorso del file + OptionModule.FileNameFromArgs = Items(0) + BlindProgLog(" File '.ddt' input : " & OptionModule.FileNameFromArgs) + ' Assegno i valore Width, Height, Thickness + OptionModule.m_Width = Items(1) + BlindProgLog(" width : " & OptionModule.m_Width) + OptionModule.m_Height = Items(2) + BlindProgLog(" height : " & OptionModule.m_Height) + OptionModule.m_Thickness = Items(3) + BlindProgLog(" thickness : " & OptionModule.m_Thickness) + ' Indico il percoso di salvataggio file DDF + OptionModule.SaveFileNameFromArgs = Items(4) + BlindProgLog(" File '.ddf' output : " & OptionModule.SaveFileNameFromArgs) + ' Nuovo parametro da laggere per gestione Swing + If Items.Length = 6 Then + OptionModule.ForcesSideSwing = Items(5) + BlindProgLog(" swing : " & OptionModule.ForcesSideSwing) + End If + ' abilito lettura dati + OptionModule.AdjustDDT = True + Else + ' blocco lettura dati + OptionModule.AdjustDDT = False + ' TERMINO TUTTO SUBITO! + End + End If + End If + End Sub + End Class diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index eaf15f6..c6e85c3 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -72,5 +72,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb index d29a8ab..ed8e84d 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -11,6 +11,8 @@ Friend Module OptionModule Friend AdjustDDT As Boolean = False Friend FileNameFromArgs As String = String.Empty Friend SaveFileNameFromArgs As String = String.Empty + ' Forza la scrittura dello swing Left(L..) oppure Right(R..) + Friend ForcesSideSwing As String = String.Empty ' Parametri che contengono lista delle lingue disponibili e lingua selezionata Friend m_LanguageList As New ObservableCollection(Of Language) diff --git a/Utility.vb b/Utility.vb index bb1ef4f..8b44c73 100644 --- a/Utility.vb +++ b/Utility.vb @@ -22,6 +22,10 @@ Public Module Utility ' CurrFile deve arrivare già senza estensione! Private Function GenerateLockFileName(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "") As String + ' Se in modalità Modifica file DDT allora non bloccare il file + If OptionModule.AdjustDDT Then + Return String.Empty + End If If OptionModule.ReadOnlyDDF Then Return String.Empty End If @@ -711,6 +715,8 @@ Public Module Utility sFilePath = sPath sFileBlindProgLog = New System.IO.StreamWriter(sPath, True) Dim sInfoStart As String = Date.Now.ToString & " Avvio programma in cieco" + sInfoStart &= vbCrLf & My.Application.Info.Version.Major.ToString() & "." & My.Application.Info.Version.Minor.ToString() & + (ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() & My.Application.Info.Version.Revision.ToString() sFileBlindProgLog.WriteLine(sInfoStart) sFileBlindProgLog.Close() End Sub