diff --git a/Assembly/Assembly.vb b/Assembly/Assembly.vb index c5aaa46..5f2de2a 100644 --- a/Assembly/Assembly.vb +++ b/Assembly/Assembly.vb @@ -475,6 +475,7 @@ Public Class Assembly Return m_LockEdgeOverMaterial End Get Set(value As String) + If String.IsNullOrEmpty(value) Then value = "0" Dim dVal As Double If StringToDouble(value, dVal) Then m_LockEdgeOverMaterial = value @@ -499,6 +500,7 @@ Public Class Assembly Return m_HingeEdgeOverMaterial End Get Set(value As String) + If String.IsNullOrEmpty(value) Then value = "0" Dim dVal As Double If StringToDouble(value, dVal) Then m_HingeEdgeOverMaterial = value @@ -523,6 +525,7 @@ Public Class Assembly Return m_TopOverMaterial End Get Set(value As String) + If String.IsNullOrEmpty(value) Then value = "0" Dim dVal As Double If StringToDouble(value, dVal) Then m_TopOverMaterial = value @@ -547,6 +550,7 @@ Public Class Assembly Return m_BottomOverMaterial End Get Set(value As String) + If String.IsNullOrEmpty(value) Then value = "0" Dim dVal As Double If StringToDouble(value, dVal) Then m_BottomOverMaterial = value @@ -945,19 +949,18 @@ Public Class Assembly Line += 1 End If Part.ReadDDFPartDoor(FileContent, Line, Local_Door) - Dim DoorPiece As String = Local_Door.TypePart + If String.IsNullOrEmpty(Local_Door.TypePart) Then Local_Door.TypePart = "DO_1" + Dim sDoorPiece As String = Local_Door.TypePart ' per eliminare lo swing associato al jamb FL_L --> FL_ - If OptionModule.m_ConfigurationSoftware = "Door" Then Local_Door.IsNotAssembly = True - If Not IsNothing(DoorPiece) And Not Local_Door.IsNotAssembly Then - If DoorPiece.Count > 3 AndAlso DoorPiece.Contains("F") Then - DoorPiece = DoorPiece.Remove(3) + If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then Local_Door.IsNotAssembly = True + If Not Local_Door.IsNotAssembly Then + If sDoorPiece.Count > 3 AndAlso sDoorPiece.Contains("F") Then + sDoorPiece = sDoorPiece.Remove(3) End If Map.refCompoPanelVM.GoBackVisibility = Visibility.Visible - 'Map.refPartPageVM.OrderButtonVisibility = Visibility.Collapsed Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage Else - ' significa che stiamo per leggere una posrta singola - 'Map.refPartPageVM.OrderButtonVisibility = Visibility.Visible + ' significa che stiamo per leggere una porta singola Local_Door.IsNotAssembly = True Local_Door.IsActive = True Local_PartDoor.Door = Local_Door @@ -971,7 +974,7 @@ Public Class Assembly Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage Exit While End If - Select Case DoorPiece + Select Case sDoorPiece Case "DO_1" Local_PartDoor.Door = Local_Door Local_PartDoor.Door.SwingTypeList = m_SwingTypeListSinlgeDoor @@ -1011,9 +1014,7 @@ Public Class Assembly Case "FB_" Local_Door.SwingTypeList = m_SwingTypeList m_BottomJamb = Local_Door - If Not m_Exterior Then - m_BottomJamb.IsActive = False - End If + If Not m_Exterior Then m_BottomJamb.IsActive = False End Select '' End If '' End If diff --git a/DoorManager/AssemblyManagerV.xaml b/AssemblyManager/AssemblyManagerV.xaml similarity index 100% rename from DoorManager/AssemblyManagerV.xaml rename to AssemblyManager/AssemblyManagerV.xaml diff --git a/DoorManager/AssemblyManagerV.xaml.vb b/AssemblyManager/AssemblyManagerV.xaml.vb similarity index 100% rename from DoorManager/AssemblyManagerV.xaml.vb rename to AssemblyManager/AssemblyManagerV.xaml.vb diff --git a/DoorManager/AssemblyManagerVM.vb b/AssemblyManager/AssemblyManagerVM.vb similarity index 90% rename from DoorManager/AssemblyManagerVM.vb rename to AssemblyManager/AssemblyManagerVM.vb index d5b2d0f..93ce541 100644 --- a/DoorManager/AssemblyManagerVM.vb +++ b/AssemblyManager/AssemblyManagerVM.vb @@ -160,23 +160,22 @@ Public Class AssemblyManagerVM If File.Exists(m_SelectedAssembly.Name) Then Map.refAssemblyPageVM.CurrAssembly = CreateNewAssembly(m_SelectedAssembly.Name) Assembly.ReadDDFAssembly(m_SelectedAssembly.Name, Map.refAssemblyPageVM.CurrAssembly) - ' se l'apertura di un assemblato genera u errore interrompi tutto + ' se l'apertura di un assemblato genera un errore interrompi tutto If IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then Return False End If - If OptionModule.m_ConfigurationSoftware = "Door" Then + If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then DdfFile.WriteDDFPart(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door, m_SelectedAssembly.Name, True, False) Else - DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, m_SelectedAssembly.Name, True) + DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, True) End If - 'DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, True) - 'Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage NotifyPropertyChanged("SelectedAssembly") ' se è avvenuta la modifica dei valori dei bevel devo avvisare che vi è stata una modifica ' dopo aver caricato tutti i valori all'apertura del progetto devo riportare la modifica a false m_SelectedAssembly.IsModify = Part.FirstReadingEdge If Not Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door.IsNotAssembly Then - ExecDoors(Map.refSceneManagerVM.ProjectScene, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY) + ExecDoors(Map.refSceneManagerVM.ProjectScene, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, False) + Map.refSceneManagerVM.ComposeAssembly(SceneManagerVM.nComposeAssembly) End If Return True Else @@ -186,12 +185,13 @@ Public Class AssemblyManagerVM Map.refAssemblyPageVM.CurrAssembly = CreateNewAssembly(m_SelectedAssembly.Name) DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, True) - If OptionModule.m_ConfigurationSoftware = "Door" Then + If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door.IsNotAssembly = True End If If Not Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door.IsNotAssembly Then Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage - ExecDoors(Map.refSceneManagerVM.ProjectScene, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY) + ExecDoors(Map.refSceneManagerVM.ProjectScene, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, False) + Map.refSceneManagerVM.ComposeAssembly(SceneManagerVM.nComposeAssembly) CreateRabbet = False Else Assembly.ReadDDFAssembly(IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, Map.refAssemblyPageVM.CurrAssembly) @@ -254,6 +254,7 @@ Public Class AssemblyManagerVM 'Local_SelAssembly.HingeRabbetJamb() Return Local_SelAssembly End Function + ' creazione dei jamb Private Sub CreatePart(ByRef CurrAssembly As Assembly) CurrAssembly.LeftJamb = New Part @@ -284,6 +285,7 @@ Public Class AssemblyManagerVM CurrAssembly.BottomJamb.SwingTypeList = OptionModule.m_SwingTypeList CurrAssembly.BottomJamb.IsActive = OptionModule.m_BottomJambChk End Sub + ' Caricamento del vettore delle porte, Se già ne esite uno esso viene sovrascritto con nuovi oggetti Private Sub CreateDoor(ByRef CurrAssembly As Assembly) CurrAssembly.LockEdgeType = CurrAssembly.LockEdgeType @@ -416,19 +418,17 @@ Public Class AssemblyManagerVM Dim ImportTemplate As String = String.Empty '--------------------------------------------------------------------------------------------------------------------------------------------------- ' CHIEDO SE SI VUOLE IMPOTRTARE UN TEMPLATE - 'If OptionModule.m_ConfigurationSoftware = "Door" Then - ' 'Prima di tutto chiedo se vuole aprire un template - ' If MessageBox.Show(EgtMsg(50146), EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) = MessageBoxResult.Yes Then - ' ' Apro la finestra di dailogo aperta direttamente sulla cartella cercata - ' Dim OpenFileDialog As New System.Windows.Forms.OpenFileDialog - ' OpenFileDialog.InitialDirectory = IniFile.m_TemplateDir - ' If OpenFileDialog.ShowDialog <> Forms.DialogResult.OK Then - ' ' se la risposta è diversa da OK esce - ' Return - ' End If - ' ' carico l'indirizzo del template che voglio aprire - ' ImportTemplate = OpenFileDialog.FileName + 'Prima di tutto chiedo se vuole aprire un template + 'If MessageBox.Show(EgtMsg(50146), EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) = MessageBoxResult.Yes Then + ' ' Apro la finestra di dailogo aperta direttamente sulla cartella cercata + ' Dim OpenFileDialog As New System.Windows.Forms.OpenFileDialog + ' OpenFileDialog.InitialDirectory = IniFile.m_TemplateDir + ' If OpenFileDialog.ShowDialog <> Forms.DialogResult.OK Then + ' ' se la risposta è diversa da OK esce + ' Return ' End If + ' ' carico l'indirizzo del template che voglio aprire + ' ImportTemplate = OpenFileDialog.FileName 'End If '---------------------------------------------------------------------------------------------------------------------------------------------------- ' lancio la finestra per la creazione di una nuova porta @@ -478,17 +478,15 @@ Public Class AssemblyManagerVM CurrProject.NotifyPropertyChanged("AssemblyList") '------------------------------------------------------------------------------------------------------------------------------------------------ ' LETTURA DI UN FILE DI TIPO TEMPLATE - 'If OptionModule.m_ConfigurationSoftware = "Door" Then - ' If String.IsNullOrEmpty(ImportTemplate) Then - ' NewAssembly = True - ' Else - ' ' !!!!se sto aprendo un template significa che devo leggere un file già esistente!!!! - ' NewAssembly = False - ' ' creo il file ddf associato al template - ' Map.refAssemblyPageVM.CurrAssembly = CreateNewAssembly(ImportTemplate) - ' Assembly.ReadDDFAssembly(ImportTemplate, Map.refAssemblyPageVM.CurrAssembly) - ' DdfFile.WriteDDFPart(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door, Local_AssemblyName.Name, True, False) - ' End If + 'If String.IsNullOrEmpty(ImportTemplate) Then + ' NewAssembly = True + 'Else + ' ' !!!!se sto aprendo un template significa che devo leggere un file già esistente!!!! + ' NewAssembly = False + ' ' creo il file ddf associato al template + ' Map.refAssemblyPageVM.CurrAssembly = CreateNewAssembly(ImportTemplate) + ' Assembly.ReadDDFAssembly(ImportTemplate, Map.refAssemblyPageVM.CurrAssembly) + ' DdfFile.WriteDDFPart(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door, Local_AssemblyName.Name, True, False) 'End If '------------------------------------------------------------------------------------------------------------------------------------------------ ' carico il nome ceme Assemblato selezionato @@ -534,7 +532,7 @@ Public Class AssemblyManagerVM ' ' stamp a video il messaggio per chiedere se eliminare ' DeletingResult = MessageBox.Show(String.Format(EgtMsg(50116), Path.GetFileNameWithoutExtension(m_SelectedAssembly)), EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No) 'End if - DeletingResult = MessageBox.Show(String.Format(EgtMsg(50117), Path.GetFileNameWithoutExtension(m_SelectedAssembly.Name)), EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No) + DeletingResult = MessageBox.Show(String.Format(EgtMsg(50116), Path.GetFileNameWithoutExtension(m_SelectedAssembly.Name)), EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No) ' chiedo se devo eliminere il file: se si If DeletingResult = MessageBoxResult.Yes Then ' ricerco l'indice del file all'interno della lista delle porte diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb index 62b3293..23fd528 100644 --- a/DoorParameters/Part.vb +++ b/DoorParameters/Part.vb @@ -566,7 +566,6 @@ Public Class Part If Not SetItemTemplate(NewCompo.CompoType.DDFName) = String.Empty Then NewCompo.SetTemplateSelItem(SetItemTemplate(NewCompo.CompoType.DDFName)) Else - ' se esiste un lista di template If NewCompo.TemplateItemList.Count > 0 Then Dim SelItemindex As Integer = 0 @@ -576,10 +575,9 @@ Public Class Part End While ' inizializzo la combobox template NewCompo.SetTemplateSelItem(NewCompo.TemplateItemList(SelItemindex)) - End If End If - ' se non c'è il template + ' se non c'è il template Else ' nascondo il template NewCompo.TemplateVisibility = Visibility.Collapsed @@ -611,9 +609,7 @@ Public Class Part Dim CurrAssembly As Assembly = Map.refAssemblyPageVM.CurrAssembly ' inserisco il nome della componente nella funzione che gestirà l'associazione dei parametri If Not File.Exists(NewCompo.CompoType.Path & "\" & "Matching.lua") Then - EgtOutLog("SetUp error: SetUp configuration file (" & NewCompo.CompoType.Path & "\" & "Matching.lua)" & " doesn't exist ") - 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error) - 'Return False + EgtOutLog("Compo Matching error: missing file (" & NewCompo.CompoType.Path & "\" & "Matching.lua)" & " doesn't exist ") Else ' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato, ' e testa e uscita dell'utensile attrezzato diff --git a/DoorParameters/PartPageVM.vb b/DoorParameters/PartPageVM.vb index 97b1d43..05cbeec 100644 --- a/DoorParameters/PartPageVM.vb +++ b/DoorParameters/PartPageVM.vb @@ -21,18 +21,18 @@ Public Class PartPageVM End Set End Property - Private m_OredrButtonVisibility As Visibility = Visibility.Visible + Private m_OrderButtonVisibility As Visibility = Visibility.Visible Public ReadOnly Property OrderButtonVisibility As Visibility Get SetOrderButtonVisibility() - Return m_OredrButtonVisibility + Return m_OrderButtonVisibility End Get End Property Public Sub SetOrderButtonVisibility() - If OptionModule.m_ConfigurationSoftware = "Door" Then - m_OredrButtonVisibility = Visibility.Visible + If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then + m_OrderButtonVisibility = Visibility.Visible Else - m_OredrButtonVisibility = Visibility.Collapsed + m_OrderButtonVisibility = Visibility.Collapsed End If End Sub diff --git a/Doors.vb b/Doors.vb index 3baf751..6a367bc 100644 --- a/Doors.vb +++ b/Doors.vb @@ -16,9 +16,9 @@ Imports EgtUILib Public Module Doors - Function ExecDoors(ByRef scene As Scene, sFilePath As String) As Boolean + Function ExecDoors(ByRef scene As Scene, sFilePath As String, Optional bDraw As Boolean = True) As Boolean ' Scelta file DDF - Dim sFile As String + Dim sFile As String sFile = sFilePath ' Generazione porta ' Cursore attesa @@ -28,7 +28,7 @@ Public Module Doors ' Scrivo il nome del file aperto in una variabile globale per averlo in caso di errore IniFile.m_DDFFilePath = sFile ' Aggiorno la visualizzazione - EgtZoom(ZM.ALL) + If bDraw Then EgtZoom(ZM.ALL) ' Cursore standard scene.Cursor = System.Windows.Forms.Cursors.Default Return bOk diff --git a/EgtDOORCreator.vbproj b/EgtDOORCreator.vbproj index ff1d856..b81fd13 100644 --- a/EgtDOORCreator.vbproj +++ b/EgtDOORCreator.vbproj @@ -122,10 +122,10 @@ - + AssemblyManagerV.xaml - + @@ -196,7 +196,7 @@ MSBuild:Compile Designer - + Designer MSBuild:Compile diff --git a/Guide/GuideV.xaml.vb b/Guide/GuideV.xaml.vb index d41692e..43a3b23 100644 --- a/Guide/GuideV.xaml.vb +++ b/Guide/GuideV.xaml.vb @@ -10,7 +10,7 @@ ' Add any initialization after the InitializeComponent() call. Me.DataContext = GuideVM m_GuideVM = GuideVM - DoorBrowser.Navigate(New Uri(IniFile.m_sHelpDir & "\EnglishTsetJava\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")) + DoorBrowser.Navigate(New Uri(IniFile.m_sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")) End Sub End Class diff --git a/Guide/GuideViewModel.vb b/Guide/GuideViewModel.vb index 1c49acd..695573f 100644 --- a/Guide/GuideViewModel.vb +++ b/Guide/GuideViewModel.vb @@ -5,7 +5,7 @@ Imports EgtUILib Public Class GuideVM ' se non è stata selezionato ancora nulla allora faccio partire il menu principale - Public Shared m_AddressGuide As String = "Test" + Public Shared m_AddressGuide As String = "Index" Public ReadOnly Property Title As String Get diff --git a/MainWindow/MainWindowV.xaml b/MainWindow/MainWindowV.xaml index f99fdfe..5723162 100644 --- a/MainWindow/MainWindowV.xaml +++ b/MainWindow/MainWindowV.xaml @@ -14,9 +14,9 @@ - + - + diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 1a5a106..27afc7b 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 19a3e3d..38ba966 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -21,12 +21,17 @@ Friend Module OptionModule Friend m_bBevelUp As Visibility Friend m_bBevelDown As Visibility - Friend Enum LauncherWindow + Friend Enum LauncherWindow As Integer Open_window = 0 Open_last_project = 1 Empty = 2 End Enum + Friend Enum ConfigType As Integer + Door = 0 + Assembly = 1 + End Enum + Friend m_Width As String Friend m_Height As String Friend m_Thickness As String @@ -51,7 +56,7 @@ Friend Module OptionModule Friend m_SwingTypeListLeftDoor As New List(Of String) Friend m_SwingTypeListRightDoor As New List(Of String) - Friend m_ConfigurationSoftware As String + Friend m_ConfigurationSoftware As ConfigType Friend m_ThicknessJamb As String Friend m_WidthJamb As String @@ -121,13 +126,8 @@ Friend Module OptionModule End If 'i valori della pagina dell'assemblato - Dim Config As String = String.Empty - GetPrivateProfileString(S_GENERAL, S_RUNAS, "1", Config) - If Config = "0" Then - m_ConfigurationSoftware = "Door" - Else - m_ConfigurationSoftware = "Assembly" - End If + Dim Config As Integer = GetPrivateProfileInt(S_GENERAL, S_RUNAS, 0) + m_ConfigurationSoftware = If(Config = 0, ConfigType.Door, ConfigType.Assembly) ' imposto unità di misura per interfaccia utente m_bIsMmUnit = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0) @@ -138,11 +138,8 @@ Friend Module OptionModule m_SelectedMeasureUnit = m_MeasureUnitList(1) End If - Dim nOptionLauncher As Integer - ' leggo il valore - If Not IsNothing(CStr(GetPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0))) Then - nOptionLauncher = GetPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0) - End If + ' imposto tipo di avvio + Dim nOptionLauncher As Integer = GetPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0) ' leggo il direttorio di salvataggio dei progetti Dim sMyProjectDir As String = String.Empty diff --git a/OptionsWindow/OptionsV.xaml b/OptionsWindow/OptionsV.xaml index 75761f0..6c64867 100644 --- a/OptionsWindow/OptionsV.xaml +++ b/OptionsWindow/OptionsV.xaml @@ -184,7 +184,7 @@ - + diff --git a/OptionsWindow/OptionsViewModel.vb b/OptionsWindow/OptionsViewModel.vb index bb928a9..fa2cc3a 100644 --- a/OptionsWindow/OptionsViewModel.vb +++ b/OptionsWindow/OptionsViewModel.vb @@ -394,6 +394,13 @@ Public Class OptionsVM End Property '---------------------------------------------------------------------------------------------------------------------------------------------------- + + Public ReadOnly Property EnableAssembly As Boolean + Get + Return (OptionModule.m_ConfigurationSoftware = ConfigType.Assembly) + End Get + End Property + Public Property LightUp As String Get Return OptionModule.m_LightUp diff --git a/Order/OrderV.xaml b/Order/OrderV.xaml index 44f402e..d19a20e 100644 --- a/Order/OrderV.xaml +++ b/Order/OrderV.xaml @@ -5,8 +5,8 @@ Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico" TitleBarBrush="{StaticResource EgaltechBlue1}" BorderBrush="{StaticResource EgaltechBlue1}" - WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True" - IsMinimizable="True" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" + WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False" + IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" Height="250" Width="350"> diff --git a/Order/OrderVM.vb b/Order/OrderVM.vb index e361750..db9392e 100644 --- a/Order/OrderVM.vb +++ b/Order/OrderVM.vb @@ -105,34 +105,6 @@ Public Class OrderVM End Set End Property - 'Private m_ConfigurationList As New List(Of String) - 'Public ReadOnly Property ConfigurationList As List(Of String) - ' Get - ' m_ConfigurationList.Add("Assembly") - ' m_ConfigurationList.Add("Door") - ' Return m_ConfigurationList - ' End Get - 'End Property - - 'Friend ModifyConfiguration As Boolean = False - 'Public Property Configuration As String - ' Get - ' Return OptionModule.m_ConfigurationSoftware - ' End Get - ' Set(value As String) - ' OptionModule.m_ConfigurationSoftware = value - ' DefaultWritePrivateProfileString(K_CONFIGURATION, S_RUNAS, OptionModule.m_ConfigurationSoftware) - ' Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True - ' If OptionModule.m_ConfigurationSoftware = "Door" Then - ' Map.refPartPageVM.OrderButtonVisibility = Visibility.Visible - ' Else - ' Map.refPartPageVM.OrderButtonVisibility = Visibility.Collapsed - ' End If - ' NotifyPropertyChanged("OrderButtonVisibility") - ' ModifyConfiguration = True - ' End Set - 'End Property - Private m_cmdCloseOrder As ICommand Sub New() diff --git a/ProjectManager/ProjectManagerV.xaml b/ProjectManager/ProjectManagerV.xaml index ba38fa9..d589c66 100644 --- a/ProjectManager/ProjectManagerV.xaml +++ b/ProjectManager/ProjectManagerV.xaml @@ -1,44 +1,42 @@ - + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Orientation="Horizontal"> - - - - - - - - - - + + + + + + + + + - + - - - + diff --git a/ProjectManager/ProjectManagerVM.vb b/ProjectManager/ProjectManagerVM.vb index cfc908e..b67dd13 100644 --- a/ProjectManager/ProjectManagerVM.vb +++ b/ProjectManager/ProjectManagerVM.vb @@ -516,12 +516,9 @@ Public Class ProjectManagerVM Public Sub CreateTemplate() ' se esite una porta, allora rendo possibile la creazione di un template della porta corrente If Not IsNothing(Map.refPartPageVM.CurrPart) Then - Dim rfCurrDoor As Part = Map.refPartPageVM.CurrPart ' Stampo il file correte nella cartella Template - Dim SaveFileDialog As New EgtWPFLib5.EgtSaveFileDialog SaveFileDialog.Title = K_NEWTEMPLATE - SaveFileDialog.Directory = IniFile.m_TemplateDir & "\" SaveFileDialog.Extension = K_DDTEXTENSION 'SaveFileDialog.FileName = m_CurrProject.Name & "\" @@ -538,7 +535,11 @@ Public Class ProjectManagerVM Else SaveFileDialog.FileName &= K_DDTEXTENSION End If - DdfFile.WriteDDFPart(rfCurrDoor, SaveFileDialog.FileName, False, True) + If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then + DdfFile.WriteDDFPart(Map.refPartPageVM.CurrPart, SaveFileDialog.FileName, False, True) + Else + DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, SaveFileDialog.FileName, False) + End If Else MessageBox.Show(EgtMsg(50155), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation) End If diff --git a/RegexFunction.vb b/RegexFunction.vb index 0ba5728..0336d5b 100644 --- a/RegexFunction.vb +++ b/RegexFunction.vb @@ -14,15 +14,6 @@ Module RegexFunction Return Regex.Match(sLine, "\s*--\s*(" & sKey & ")\s*=\s*(.*)\s*$").Groups(2).Value End Function - ' verifico che il messaggio da stampare a video non abbia la forma "Msg1000" - Friend Function EgtMsgNotFound(sMsg As String) As Boolean - If Regex.Match(sMsg, "\s*(Msg)\s*(.*)\s*$").Groups(1).Value = "Msg" Then - Return True - Else - Return False - End If - End Function - ' restituisca la stringa di commento Friend Function SearchComments(sLine As String) As Boolean If String.IsNullOrEmpty(Regex.Match(sLine, "\s*#\s*(.*?\b)\s*$").Groups(1).Value) Then @@ -65,6 +56,7 @@ Module RegexFunction If Regex.Match(FindComments(sLine), "\s*(...).*$").Groups(1).Value = "..." Then Return True Return False End Function + ' restituisce il valore dopo i due punti Friend Function SearchKeyValue(sLine As String, sKey As String) As String Dim x = Regex.Match(FindComments(sLine), "\s*-*\s*" & sKey & "\s*:\s*(.*?\b)\s*$").Groups(1).Value diff --git a/SceneManager/InstrumentPanel/InstrumentPanelVM.vb b/SceneManager/InstrumentPanel/InstrumentPanelVM.vb index 3891dd0..536e86a 100644 --- a/SceneManager/InstrumentPanel/InstrumentPanelVM.vb +++ b/SceneManager/InstrumentPanel/InstrumentPanelVM.vb @@ -36,16 +36,11 @@ Public Class InstrumentPanelVM Public Sub GetDistance(bGetDistanceIsChecked As Boolean) If bGetDistanceIsChecked Then Map.refSceneManagerVM.ProjectScene.SetStatusGetDistance() - 'If DirectCast(m_rfSceneManagerVM.StatusBar.DataContext, StatusBarVM).ButtonVisibility = Visibility.Visible Then - ' DirectCast(m_rfSceneManagerVM.StatusBar.DataContext, StatusBarVM).ButtonVisibility = Visibility.Collapsed - 'End If Else Map.refSceneManagerVM.ProjectScene.ResetStatusGetDistance() Map.refSceneManagerVM.ProjectScene.SetStatusNull() Dim rfStatusBarVM As StatusBarVM = Map.refStatusBarVM rfStatusBarVM.StatusOutput = String.Empty - '' controllo che non ci siano errori nel disegno - 'm_rfSceneManagerVM.ShowGraphicError() End If End Sub diff --git a/SceneManager/Refresh/RefreshPanelV.xaml b/SceneManager/Refresh/RefreshPanelV.xaml index 2fe2b06..b836a3d 100644 --- a/SceneManager/Refresh/RefreshPanelV.xaml +++ b/SceneManager/Refresh/RefreshPanelV.xaml @@ -7,18 +7,22 @@ Command="{Binding RefreshBtnCommand}"> -