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:CompileDesigner
-
+ DesignerMSBuild: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}">
-
+
-
-
-
+
+
diff --git a/SceneManager/Refresh/RefreshPanelVM.vb b/SceneManager/Refresh/RefreshPanelVM.vb
index 2ff5dc1..92e8a01 100644
--- a/SceneManager/Refresh/RefreshPanelVM.vb
+++ b/SceneManager/Refresh/RefreshPanelVM.vb
@@ -16,6 +16,17 @@ Public Class RefreshPanelVM
End Set
End Property
+ Private m_ErrorVisibility As Visibility = Visibility.Collapsed
+ Public Property ErrorVisibility As Visibility
+ Get
+ Return m_ErrorVisibility
+ End Get
+ Set(value As Visibility)
+ m_ErrorVisibility = value
+ NotifyPropertyChanged("ErrorVisibility")
+ End Set
+ End Property
+
Private m_ButtonVisibility As Visibility = Visibility.Collapsed
Public Property ButtonVisibility As Visibility
Get
@@ -27,47 +38,50 @@ Public Class RefreshPanelVM
End Set
End Property
- Private m_AssemblyIsChecked As Boolean
+ Private m_AssemblyIsChecked As Boolean = True
Public Property AssemblyIsChecked As Boolean
Get
Return m_AssemblyIsChecked
End Get
Set(value As Boolean)
- If Not SceneManagerVM.nComposeAssembly = 1 Then
- m_AssemblyIsChecked = value
- m_AssemblyExploseIsChecked = False
- m_AssemblyDispositionIsChecked = False
- NotifyPropertyChanged("AssemblyExploseIsChecked")
+ If SceneManagerVM.nComposeAssembly <> 1 Then
+ m_AssemblyIsChecked = True
+ m_ExplodedIsChecked = False
+ m_DisposedIsChecked = False
+ NotifyPropertyChanged("ExplodedIsChecked")
+ NotifyPropertyChanged("DisposedIsChecked")
End If
End Set
End Property
- Private m_AssemblyExploseIsChecked As Boolean
- Public Property AssemblyExploseIsChecked As Boolean
+ Private m_ExplodedIsChecked As Boolean = False
+ Public Property ExplodedIsChecked As Boolean
Get
- Return m_AssemblyExploseIsChecked
+ Return m_ExplodedIsChecked
End Get
Set(value As Boolean)
- If Not SceneManagerVM.nComposeAssembly = 2 Then
- m_AssemblyExploseIsChecked = value
+ If SceneManagerVM.nComposeAssembly <> 2 Then
+ m_ExplodedIsChecked = True
m_AssemblyIsChecked = False
- m_AssemblyDispositionIsChecked = False
+ m_DisposedIsChecked = False
NotifyPropertyChanged("AssemblyIsChecked")
- End If
+ NotifyPropertyChanged("DisposedIsChecked")
+ End If
End Set
End Property
- Private m_AssemblyDispositionIsChecked As Boolean
- Public Property AssemblyDispositionIsChecked As Boolean
+ Private m_DisposedIsChecked As Boolean = False
+ Public Property DisposedIsChecked As Boolean
Get
- Return m_AssemblyDispositionIsChecked
+ Return m_DisposedIsChecked
End Get
Set(value As Boolean)
- If Not SceneManagerVM.nComposeAssembly = 0 Then
- m_AssemblyDispositionIsChecked = value
+ If SceneManagerVM.nComposeAssembly <> 0 Then
+ m_DisposedIsChecked = True
m_AssemblyIsChecked = False
- m_AssemblyExploseIsChecked = False
+ m_ExplodedIsChecked = False
NotifyPropertyChanged("AssemblyIsChecked")
+ NotifyPropertyChanged("ExplodedIsChecked")
End If
End Set
End Property
@@ -85,15 +99,15 @@ Public Class RefreshPanelVM
End Get
End Property
- Public ReadOnly Property ExploseMsg As String
+ Public ReadOnly Property ExplodedMsg As String
Get
- Return "Explose"
+ Return "Exploded"
End Get
End Property
- Public ReadOnly Property DisposeMsg As String
+ Public ReadOnly Property DispositionMsg As String
Get
- Return "Dispose"
+ Return "Disposed"
End Get
End Property
@@ -109,12 +123,13 @@ Public Class RefreshPanelVM
#End Region
Private m_CmdRefreshBtn As ICommand
Private m_CmdAssemblyBtn As ICommand
- Private m_CmdAssemblyExploseBtn As ICommand
- Private m_CmdAssemblyDispositionBtn As ICommand
+ Private m_CmdExplodedBtn As ICommand
+ Private m_CmdDisposedBtn As ICommand
Private m_CmdShowErrorBtn As ICommand
Sub New()
Map.SetRefRefreshPanelVM(Me)
+ ButtonVisibility = If(OptionModule.m_ConfigurationSoftware = ConfigType.Door, Visibility.Collapsed, Visibility.Visible)
End Sub
#Region "COMMAND"
@@ -152,23 +167,23 @@ Public Class RefreshPanelVM
End Get
End Property
- Public ReadOnly Property AssemblyExploseBtnCommand As ICommand
+ Public ReadOnly Property ExplodedBtnCommand As ICommand
Get
- If m_CmdAssemblyExploseBtn Is Nothing Then
+ If m_CmdExplodedBtn Is Nothing Then
' Richiamo il comando che già esiste
- m_CmdAssemblyExploseBtn = New Command(AddressOf Map.refSceneManagerVM.AssemblyExlposeBtn)
+ m_CmdExplodedBtn = New Command(AddressOf Map.refSceneManagerVM.ExlpodedBtn)
End If
- Return m_CmdAssemblyExploseBtn
+ Return m_CmdExplodedBtn
End Get
End Property
- Public ReadOnly Property AssemblyDispositionBtnCommand As ICommand
+ Public ReadOnly Property DisposedBtnCommand As ICommand
Get
- If m_CmdAssemblyDispositionBtn Is Nothing Then
+ If m_CmdDisposedBtn Is Nothing Then
' Richiamo il comando che già esiste
- m_CmdAssemblyDispositionBtn = New Command(AddressOf Map.refSceneManagerVM.NotAssemblyBtn)
+ m_CmdDisposedBtn = New Command(AddressOf Map.refSceneManagerVM.DisposedBtn)
End If
- Return m_CmdAssemblyDispositionBtn
+ Return m_CmdDisposedBtn
End Get
End Property
diff --git a/SceneManager/SceneManagerVM.vb b/SceneManager/SceneManagerVM.vb
index e7643ac..90fb5a2 100644
--- a/SceneManager/SceneManagerVM.vb
+++ b/SceneManager/SceneManagerVM.vb
@@ -192,11 +192,10 @@ Public Class SceneManagerVM
IndexLine += 1
End While
DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).m_MsgGraphic = FileContent(IndexLine)
- 'MessageBox.Show(FileContent(IndexLine), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
- ' se compare u errore disattivo il righello
+ ' se compare un errore disattivo il righello
DirectCast(Me.InstrumentPanel.DataContext, InstrumentPanelVM).GetDistIsChecked = False
' rendo visibile il bottone dell'errore
- DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).ButtonVisibility = Visibility.Visible
+ DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).ErrorVisibility = Visibility.Visible
DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).MsgError = EgtMsg(50101) & nMsgErr
' altrimenti un avvertimento
ElseIf nMsgErr < 0 Then
@@ -204,14 +203,10 @@ Public Class SceneManagerVM
IndexLine += 1
End While
DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).m_MsgGraphic = FileContent(IndexLine)
- 'MessageBox.Show(FileContent(IndexLine), "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
- DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).ButtonVisibility = Visibility.Visible
+ DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).ErrorVisibility = Visibility.Visible
DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).MsgError = EgtMsg(50144) & nMsgErr
- End If
-
- If nMsgErr = 0 Then
- 'DirectCast(Me.StatusBar.DataContext, StatusBarVM).StatusOutput = String.Empty
- DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).ButtonVisibility = Visibility.Collapsed
+ Else
+ DirectCast(Me.RefreshPanel.DataContext, RefreshPanelVM).ErrorVisibility = Visibility.Collapsed
End If
End Sub
@@ -221,7 +216,7 @@ Public Class SceneManagerVM
#Region "RefreshBtnCommand"
'''
- ''' Returns a command that do Exec.
+ ''' Returns a command that do Refresh.
'''
Public ReadOnly Property RefreshBtnCommand As ICommand
Get
@@ -233,15 +228,16 @@ Public Class SceneManagerVM
End Property
'''
- ''' Execute the Exec. This method is invoked by the ExecCommand.
+ ''' Execute the refresh. This method is invoked by the RefreshBtnCommand.
'''
'''
- Friend Shared nComposeAssembly As Integer
+ Friend Shared nComposeAssembly As Integer = 1
Public Sub RefreshBtn()
Dim rfDoorParametersVM As PartPageVM = Map.refPartPageVM
Dim CurrDoorPath As String = IniFile.m_sTempDir & "\" & TEMP_FILE
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage Then
DdfFile.WriteDDFPart(Map.refPartPageVM.CurrPart, CurrDoorPath, True, False)
+ ' Viene scritto per usi successivi, non usato in questa esecuzione
DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, True)
ExecDoors(m_ProjectScene, CurrDoorPath)
ComposeAssembly(nComposeAssembly)
@@ -261,11 +257,11 @@ Public Class SceneManagerVM
nComposeAssembly = 1
RefreshBtn()
End Sub
- Public Sub AssemblyExlposeBtn()
+ Public Sub ExlpodedBtn()
nComposeAssembly = 2
RefreshBtn()
End Sub
- Public Sub NotAssemblyBtn()
+ Public Sub DisposedBtn()
nComposeAssembly = 0
RefreshBtn()
End Sub
@@ -278,7 +274,6 @@ Public Class SceneManagerVM
If Not File.Exists(IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua") Then
EgtOutLog("SetUp error: SetUp configuration file (" & IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua)" & " doesn't exist ")
MessageBox.Show("File (" & IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua)" & " doesn't exist ", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
- 'Return False
Else
EgtLuaExecFile(IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua")
EgtLuaSetGlobIntVar("STU.Assembl", nAssembl)