diff --git a/AboutBoxWindow/AboutBoxV.xaml.vb b/AboutBoxWindow/AboutBoxV.xaml.vb
index 371936c..96b0dd9 100644
--- a/AboutBoxWindow/AboutBoxV.xaml.vb
+++ b/AboutBoxWindow/AboutBoxV.xaml.vb
@@ -2,6 +2,8 @@
Public Class AboutBoxV
+#Region "METHODS"
+
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Owner = Application.Current.MainWindow
DescriptionLbl.Text = My.Application.Info.Description.ToString()
@@ -15,20 +17,20 @@ Public Class AboutBoxV
Dim sOpts As String = IniFile.m_nKeyOptions.ToString()
KeyLbl.Text = sKey & " - " & sKlev & " - " & sOpts
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
- Dim sInfo As String = If( EgtIsDebug(), "*** Debug Libraries ***" & vbCrLf, "")
+ Dim sInfo As String = If(EgtIsDebug(), "*** Debug Libraries ***" & vbCrLf, "")
sInfo &= "DataRoot " & IniFile.m_sDataRoot & vbCrLf
sInfo &= "Doors " & IniFile.m_sDoorsDirPath & vbCrLf
If OptionModule.m_MaterialList.Count = 1 Then
sInfo &= "Material " & OptionModule.m_MaterialList(0).Name
End If
Dim sOpSys As String = String.Empty
- EgtGetOsInfo( sOpSys)
+ EgtGetOsInfo(sOpSys)
sInfo &= sOpSys & Environment.NewLine
Dim sCPU As String = String.Empty
- EgtGetCpuInfo( sCPU)
+ EgtGetCpuInfo(sCPU)
sInfo &= sCPU & Environment.NewLine
Dim sMem As String = String.Empty
- EgtGetMemoryInfo( sMem)
+ EgtGetMemoryInfo(sMem)
sInfo &= sMem & Environment.NewLine
Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene)
@@ -37,4 +39,6 @@ Public Class AboutBoxV
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub
+#End Region ' Methods
+
End Class
diff --git a/Application.xaml b/Application.xaml
index de05e83..1b287fc 100644
--- a/Application.xaml
+++ b/Application.xaml
@@ -1,15 +1,16 @@
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ ShutdownMode="OnMainWindowClose">
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
diff --git a/Application.xaml.vb b/Application.xaml.vb
index 3485136..f75a89a 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -1,7 +1,19 @@
-Imports EgtWPFLib5
-Imports EgtUILib
+Class Application
-Class Application
+#Region "FIELDS & PROPERTIES"
+
+ Public Property ThemeDictionary As ResourceDictionary
+ ' You could probably get it via its name with some query logic as well.
+ Get
+ Return Resources.MergedDictionaries(0)
+ End Get
+ Set(value As ResourceDictionary)
+ End Set
+ End Property
+
+#End Region ' Fields & Properties
+
+#Region "METHODS"
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
@@ -20,15 +32,6 @@ Class Application
'Me.MainWindow.Show()
End Sub
- Public Property ThemeDictionary As ResourceDictionary
- ' You could probably get it via its name with some query logic as well.
- Get
- Return Resources.MergedDictionaries(0)
- End Get
- Set(value As ResourceDictionary)
- End Set
- End Property
-
Public Sub ChangeTheme(uri As Uri)
ThemeDictionary.MergedDictionaries.Clear()
Dim rd As ResourceDictionary = New ResourceDictionary()
@@ -36,4 +39,6 @@ Class Application
ThemeDictionary.MergedDictionaries.Add(rd) ' New ResourceDictionary()) ' Source:=uri))
End Sub
+#End Region ' Methods
+
End Class
diff --git a/Assembly/Assembly.vb b/Assembly/Assembly.vb
index 14f97b2..299b356 100644
--- a/Assembly/Assembly.vb
+++ b/Assembly/Assembly.vb
@@ -7,6 +7,8 @@ Imports System.Text.RegularExpressions
Public Class Assembly
Implements INotifyPropertyChanged
+#Region "FIELDS & PROPERTIES"
+
' questa variabile se settata a vero da la possibilità di costruire un riferimento sui Jamb
Friend Shared BuiltReffCompo As Boolean = False
Public bIsNewAssembly As Boolean = False
@@ -24,7 +26,7 @@ Public Class Assembly
End Get
Set(value As Boolean)
m_OneDoorProperty = value
- NotifyPropertyChanged("OneDoorProperty")
+ NotifyPropertyChanged(NameOf(OneDoorProperty))
End Set
End Property
@@ -49,7 +51,7 @@ Public Class Assembly
End Get
Set(value As String)
m_LightUp = value
- NotifyPropertyChanged("LightUp")
+ NotifyPropertyChanged(NameOf(LightUp))
' viene ricalcolata la dimensione dell'anta
HeightDoor()
' viene ricalcolata l'altezza della porta e dei jamb laterali a partire dalla dimensione della porta
@@ -62,7 +64,7 @@ Public Class Assembly
' questo metodo è utilizzato per caricare e aggiornare il valore m_lightUp senza eseguire le operazioni del Set
Public Sub SetLightUp(sLightUp As String)
m_LightUp = sLightUp
- NotifyPropertyChanged("LightUp")
+ NotifyPropertyChanged(NameOf(LightUp))
End Sub
Private m_LightBottom As String
@@ -83,7 +85,7 @@ Public Class Assembly
End Property
Public Sub SetLightBottom(sLightBottom As String)
m_LightBottom = sLightBottom
- NotifyPropertyChanged("LightBottom")
+ NotifyPropertyChanged(NameOf(LightBottom))
End Sub
#End Region ' Light Up/Bottom
@@ -106,7 +108,7 @@ Public Class Assembly
End Property
Public Sub SetLightHinge(sSetLightHinge As String)
m_LightHinge = sSetLightHinge
- NotifyPropertyChanged("LightHinge")
+ NotifyPropertyChanged(NameOf(LightHinge))
End Sub
Private m_LightLock As String
@@ -125,7 +127,7 @@ Public Class Assembly
End Property
Public Sub SetLightLock(sLightLock As String)
m_LightLock = sLightLock
- NotifyPropertyChanged("LightLock")
+ NotifyPropertyChanged(NameOf(LightLock))
End Sub
#End Region ' Light Hinge/Lock
@@ -139,7 +141,7 @@ Public Class Assembly
End Get
Set(value As String)
m_ThicknessHead = value
- NotifyPropertyChanged("ThicknessHead")
+ NotifyPropertyChanged(NameOf(ThicknessHead))
' viene ricalcolata l'altezza del JambTop
HeightJambTop()
' viene ricalcolata l'altezza della porta e dei jamb laterali a partire dalla dimensione della porta
@@ -154,7 +156,7 @@ Public Class Assembly
End Property
Public Sub SetThicknessHead(sThicknessHead As String)
m_ThicknessHead = sThicknessHead
- NotifyPropertyChanged("ThicknessHead")
+ NotifyPropertyChanged(NameOf(ThicknessHead))
End Sub
#End Region ' ThicknessHead
@@ -168,7 +170,7 @@ Public Class Assembly
End Get
Set(value As String)
m_ThicknessBottom = value
- NotifyPropertyChanged("ThicknessBottom")
+ NotifyPropertyChanged(NameOf(ThicknessBottom))
' viene ricalcolata l'altezza del JambTop
HeightJambBottom()
' viene ricalcolata l'altezza della porta e dei jamb laterali a partire dalla dimensione della porta
@@ -183,7 +185,7 @@ Public Class Assembly
End Property
Public Sub SetThicknessBottom(sThicknessBottom As String)
m_ThicknessBottom = sThicknessBottom
- NotifyPropertyChanged("ThicknessBottom")
+ NotifyPropertyChanged(NameOf(ThicknessBottom))
End Sub
Private m_DepthBottom As String
@@ -193,7 +195,7 @@ Public Class Assembly
End Get
Set(value As String)
m_DepthBottom = value
- NotifyPropertyChanged("DepthBottom")
+ NotifyPropertyChanged(NameOf(DepthBottom))
' viene ricalcolata la profondità del JambBottom
SetThicKnessJamb()
UpDateAllCompo()
@@ -202,7 +204,7 @@ Public Class Assembly
End Property
Public Sub SetDepthBottom(sDepthBottom As String)
m_DepthBottom = sDepthBottom
- NotifyPropertyChanged("DepthBottom")
+ NotifyPropertyChanged(NameOf(DepthBottom))
End Sub
#End Region ' Thickness Depth Bottom
@@ -231,7 +233,7 @@ Public Class Assembly
End Property
Public Sub SetOverlapHinge(sOverlapHinge As String)
m_OverlapHinge = sOverlapHinge
- NotifyPropertyChanged("OverlapHinge")
+ NotifyPropertyChanged(NameOf(OverlapHinge))
End Sub
Private m_OverlapLock As String
@@ -254,7 +256,7 @@ Public Class Assembly
End Property
Public Sub SetOverlapLock(sOverlapLock As String)
m_OverlapLock = sOverlapLock
- NotifyPropertyChanged("OverlapLock")
+ NotifyPropertyChanged(NameOf(OverlapLock))
End Sub
Private m_OverlapTop As String
@@ -274,7 +276,7 @@ Public Class Assembly
End Property
Public Sub SetOverlapTop(sOverlapTop As String)
m_OverlapTop = sOverlapTop
- NotifyPropertyChanged("OverlapTop")
+ NotifyPropertyChanged(NameOf(OverlapTop))
End Sub
Private m_OverlapBottom As String
@@ -292,7 +294,7 @@ Public Class Assembly
End Property
Public Sub SetOverlapBottom(sOverlapBottom As String)
m_OverlapBottom = sOverlapBottom
- NotifyPropertyChanged("OverlapBottom")
+ NotifyPropertyChanged(NameOf(OverlapBottom))
End Sub
Private m_DeltaThickness As String
@@ -310,7 +312,7 @@ Public Class Assembly
End Property
Public Sub SetDeltaThickness(sDeltaThickness As String)
m_DeltaThickness = sDeltaThickness
- NotifyPropertyChanged("DeltaThickness")
+ NotifyPropertyChanged(NameOf(DeltaThickness))
End Sub
#End Region ' Overlap Hinge/Lock/Top/DeltaT
@@ -330,7 +332,7 @@ Public Class Assembly
End Property
Public Sub SetThickness(sThickness As String)
m_Thickness = sThickness
- NotifyPropertyChanged("Thickness")
+ NotifyPropertyChanged(NameOf(Thickness))
End Sub
Private m_Width As String
@@ -348,7 +350,7 @@ Public Class Assembly
End Property
Public Sub SetWidth(sWidth As String)
m_Width = sWidth
- NotifyPropertyChanged("Width")
+ NotifyPropertyChanged(NameOf(Width))
End Sub
#End Region ' Jamb Thickness/Width
@@ -380,14 +382,14 @@ Public Class Assembly
Next
m_DispositionItem = value
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
- NotifyPropertyChanged("DispositionItem")
+ NotifyPropertyChanged(NameOf(DispositionItem))
End Set
End Property
Public Sub SetDispositionItem(ObjDisposition As EdgeType)
If IsNothing(m_DispositionItem) Then
m_DispositionItem = ObjDisposition
End If
- NotifyPropertyChanged("DispositionItem")
+ NotifyPropertyChanged(NameOf(DispositionItem))
End Sub
Private m_LockEdgeType As New EdgeType("", Visibility.Visible)
@@ -405,7 +407,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.LockEdgeType = value
Next
m_LockEdgeType = value
- NotifyPropertyChanged("LockEdgeType")
+ NotifyPropertyChanged(NameOf(LockEdgeType))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.SetLockEdgeType(value)
'm_RightJamb.SetLockEdgeType(value)
@@ -415,7 +417,7 @@ Public Class Assembly
End Property
Public Sub SetLockEdgeType(sLockEdgeType As EdgeType)
m_LockEdgeType = sLockEdgeType
- NotifyPropertyChanged("LockEdgeType")
+ NotifyPropertyChanged(NameOf(LockEdgeType))
End Sub
Private m_HingeEdgeType As New EdgeType("", Visibility.Visible)
@@ -433,7 +435,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.HingeEdgeType = value
Next
m_HingeEdgeType = value
- NotifyPropertyChanged("HingeEdgeType")
+ NotifyPropertyChanged(NameOf(HingeEdgeType))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.SetHingeEdgeType(value)
'm_RightJamb.SetHingeEdgeType(value)
@@ -443,7 +445,7 @@ Public Class Assembly
End Property
Public Sub SetHingeEdgeType(sHingeEdgeType As EdgeType)
m_HingeEdgeType = sHingeEdgeType
- NotifyPropertyChanged("HingeEdgeType")
+ NotifyPropertyChanged(NameOf(HingeEdgeType))
End Sub
Private m_TopType As New EdgeType("", Visibility.Visible)
@@ -461,7 +463,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.TopType = value
Next
m_TopType = value
- NotifyPropertyChanged("TopType")
+ NotifyPropertyChanged(NameOf(TopType))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.SetTopType(value)
'm_RightJamb.SetTopType(value)
@@ -471,7 +473,7 @@ Public Class Assembly
End Property
Public Sub SetTopType(sTopType As EdgeType)
m_TopType = sTopType
- NotifyPropertyChanged("TopType")
+ NotifyPropertyChanged(NameOf(TopType))
End Sub
Private m_BottomType As New EdgeType("", Visibility.Visible)
@@ -489,7 +491,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.BottomType = value
Next
m_BottomType = value
- NotifyPropertyChanged("BottomType")
+ NotifyPropertyChanged(NameOf(BottomType))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.SetBottomType(value)
'm_RightJamb.SetBottomType(value)
@@ -499,7 +501,7 @@ Public Class Assembly
End Property
Public Sub SetBottomType(sBottomType As EdgeType)
m_BottomType = sBottomType
- NotifyPropertyChanged("BottomType")
+ NotifyPropertyChanged(NameOf(BottomType))
End Sub
Private m_TopMachining As Boolean
@@ -513,7 +515,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.TopMachining = value
Next
m_TopMachining = value
- NotifyPropertyChanged("TopMachining")
+ NotifyPropertyChanged(NameOf(TopMachining))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.TopMachining = m_TopMachining
'm_RightJamb.TopMachining = m_TopMachining
@@ -523,7 +525,7 @@ Public Class Assembly
End Property
Public Sub SetTopMachining(sTopMachining As Boolean)
m_TopMachining = sTopMachining
- NotifyPropertyChanged("TopMachining")
+ NotifyPropertyChanged(NameOf(TopMachining))
End Sub
Private m_LockEdgeMachining As Boolean
@@ -537,7 +539,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.LockEdgeMachining = value
Next
m_LockEdgeMachining = value
- NotifyPropertyChanged("LockEdgeMachining")
+ NotifyPropertyChanged(NameOf(LockEdgeMachining))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.LockEdgeMachining = m_LockEdgeMachining
@@ -548,7 +550,7 @@ Public Class Assembly
End Property
Public Sub SetLockEdgeMachining(sLockEdgeMachining As Boolean)
m_LockEdgeMachining = sLockEdgeMachining
- NotifyPropertyChanged("LockEdgeMachining")
+ NotifyPropertyChanged(NameOf(LockEdgeMachining))
End Sub
Private m_HingeEdgeMachining As Boolean
@@ -562,7 +564,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.HingeEdgeMachining = value
Next
m_HingeEdgeMachining = value
- NotifyPropertyChanged("HingeEdgeMachining")
+ NotifyPropertyChanged(NameOf(HingeEdgeMachining))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.HingeEdgeMachining = value
'm_RightJamb.HingeEdgeMachining = value
@@ -572,7 +574,7 @@ Public Class Assembly
End Property
Public Sub SetHingeEdgeMachining(sHingeEdgeMachining As Boolean)
m_HingeEdgeMachining = sHingeEdgeMachining
- NotifyPropertyChanged("HingeEdgeMachining")
+ NotifyPropertyChanged(NameOf(HingeEdgeMachining))
End Sub
Private m_BottomMachining As Boolean
@@ -586,7 +588,7 @@ Public Class Assembly
If ItemPartDoor.Type.Contains("F") Then ItemPartDoor.Door.BottomMachining = value
Next
m_BottomMachining = value
- NotifyPropertyChanged("BottomMachining")
+ NotifyPropertyChanged(NameOf(BottomMachining))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
'm_LeftJamb.BottomMachining = value
'm_RightJamb.BottomMachining = value
@@ -596,7 +598,7 @@ Public Class Assembly
End Property
Public Sub SetBottomMachining(sBottomMachining As Boolean)
m_BottomMachining = sBottomMachining
- NotifyPropertyChanged("BottomMachining")
+ NotifyPropertyChanged(NameOf(BottomMachining))
End Sub
#End Region ' EdgeType
@@ -610,11 +612,11 @@ Public Class Assembly
End Get
Set(value As Boolean)
m_Exterior = value
- NotifyPropertyChanged("Exterior")
+ NotifyPropertyChanged(NameOf(Exterior))
SetDimension("JambIsCheked")
'JambBIsChecked = value
SetJambBTIsChecked(value)
- NotifyPropertyChanged("JambBIsChecked")
+ NotifyPropertyChanged(NameOf(JambBIsChecked))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
SetThicKnessJamb()
'HingeRabbetJamb()
@@ -623,7 +625,7 @@ Public Class Assembly
End Property
Public Sub SetExterior(bExterior As Boolean)
m_Exterior = bExterior
- NotifyPropertyChanged("Exterior")
+ NotifyPropertyChanged(NameOf(Exterior))
End Sub
Private m_DeltaBottom As String
@@ -640,7 +642,7 @@ Public Class Assembly
End Property
Public Sub SetDeltaBottom(sDeltaBottom As String)
m_DeltaBottom = sDeltaBottom
- NotifyPropertyChanged("DeltaBottom")
+ NotifyPropertyChanged(NameOf(DeltaBottom))
End Sub
#End Region ' Exterior
@@ -654,12 +656,12 @@ Public Class Assembly
End Get
Set(value As Boolean)
m_Dimension = value
- NotifyPropertyChanged("Dimension")
+ NotifyPropertyChanged(NameOf(Dimension))
End Set
End Property
Public Sub SetDimension(bDimension As Boolean)
m_Dimension = bDimension
- NotifyPropertyChanged("Dimension")
+ NotifyPropertyChanged(NameOf(Dimension))
End Sub
Private m_AssemblyHeight As String
@@ -691,13 +693,13 @@ Public Class Assembly
End Get
Set(value As String)
m_AssemblyHeight = value
- NotifyPropertyChanged("AssemblyHeight")
+ NotifyPropertyChanged(NameOf(AssemblyHeight))
SetDimension("Height")
End Set
End Property
Public Sub SetAssemblyHeight(sAssemblyHeight As String)
m_AssemblyHeight = sAssemblyHeight
- NotifyPropertyChanged("AssemblyHeight")
+ NotifyPropertyChanged(NameOf(AssemblyHeight))
End Sub
Private m_AssemblyWidth As String
@@ -725,12 +727,12 @@ Public Class Assembly
m_AssemblyWidth = value
SetWidthJamb()
SetDimension("Width")
- NotifyPropertyChanged("AssemblyWidth")
+ NotifyPropertyChanged(NameOf(AssemblyWidth))
End Set
End Property
Public Sub SetAssemblyWidth(sAssemblyWidth As String)
m_AssemblyWidth = sAssemblyWidth
- NotifyPropertyChanged("AssemblyWidth")
+ NotifyPropertyChanged(NameOf(AssemblyWidth))
End Sub
' questa proprietà è utilizzata per stampare l'altezza della porta nella sezione dei jamb
@@ -775,7 +777,7 @@ Public Class Assembly
End Property
Public Sub SetLockEdgeOverMaterial(sLockEdgeOverMaterial As String)
m_LockEdgeOverMaterial = sLockEdgeOverMaterial
- NotifyPropertyChanged("LockEdgeOverMaterial")
+ NotifyPropertyChanged(NameOf(LockEdgeOverMaterial))
End Sub
Private m_HingeEdgeOverMaterial As String = String.Empty
@@ -804,7 +806,7 @@ Public Class Assembly
End Property
Public Sub SetHingeEdgeOverMaterial(sHingeEdgeOverMaterial As String)
m_HingeEdgeOverMaterial = sHingeEdgeOverMaterial
- NotifyPropertyChanged("HingeEdgeOverMaterial")
+ NotifyPropertyChanged(NameOf(HingeEdgeOverMaterial))
End Sub
Private m_TopOverMaterial As String = String.Empty
@@ -833,7 +835,7 @@ Public Class Assembly
End Property
Public Sub SetTopOverMaterial(sTopOverMaterial As String)
m_TopOverMaterial = sTopOverMaterial
- NotifyPropertyChanged("TopOverMaterial")
+ NotifyPropertyChanged(NameOf(TopOverMaterial))
End Sub
Private m_BottomOverMaterial As String = String.Empty
@@ -862,7 +864,7 @@ Public Class Assembly
End Property
Public Sub SetBottomOverMaterial(sBottomOverMaterial As String)
m_BottomOverMaterial = sBottomOverMaterial
- NotifyPropertyChanged("BottomOverMaterial")
+ NotifyPropertyChanged(NameOf(BottomOverMaterial))
End Sub
#End Region ' OverMaterial
@@ -887,7 +889,7 @@ Public Class Assembly
' setto la sua variabile
If Not IsNothing(m_JambT) Then
m_JambT.IsActive = value
- NotifyPropertyChanged("JambTIsChecked")
+ NotifyPropertyChanged(NameOf(JambTIsChecked))
End If
' se non esiste l'oggeto prima lo creo
SetDimension("JambIsCheked")
@@ -904,7 +906,7 @@ Public Class Assembly
' setto la sua variabile
If Not IsNothing(m_JambB) Then
m_JambB.IsActive = value
- NotifyPropertyChanged("JambBIsChecked")
+ NotifyPropertyChanged(NameOf(JambBIsChecked))
End If
' se non esiste l'oggeto prima lo creo
SetDimension("JambIsCheked")
@@ -915,7 +917,7 @@ Public Class Assembly
OptionModule.m_BottomJambChk = value
If Not IsNothing(m_JambB) Then
m_JambB.IsActive = value
- NotifyPropertyChanged("JambBIsChecked")
+ NotifyPropertyChanged(NameOf(JambBIsChecked))
Map.refSceneManagerVM.RefreshBtn()
End If
End Sub
@@ -930,11 +932,11 @@ Public Class Assembly
' setto la sua variabile
If Not IsNothing(m_JambL) Then
m_JambL.IsActive = value
- NotifyPropertyChanged("JambLIsChecked")
+ NotifyPropertyChanged(NameOf(JambLIsChecked))
End If
+ EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
' se non esiste l'oggeto prima lo creo
SetDimension("JambIsCheked")
-
End Set
End Property
@@ -948,13 +950,17 @@ Public Class Assembly
' setto la sua variabile
If Not IsNothing(m_JambR) Then
m_JambR.IsActive = value
- NotifyPropertyChanged("JambRIsChecked")
+ NotifyPropertyChanged(NameOf(JambRIsChecked))
End If
' se non esiste l'oggeto prima lo creo
SetDimension("JambIsCheked")
End Set
End Property
+#End Region ' Fields & Properties
+
+#Region "METHODS"
+
#Region "DOOR NUMBER"
' carica il numero di porte da mostrare nella combobox
@@ -981,7 +987,7 @@ Public Class Assembly
Else
OneDoorProperty = False
End If
- NotifyPropertyChanged("DoorNumber")
+ NotifyPropertyChanged(NameOf(DoorNumber))
SetDimension("DoorNumber")
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
Map.refSceneManagerVM.RefreshBtn()
@@ -999,7 +1005,7 @@ Public Class Assembly
Else
OneDoorProperty = False
End If
- NotifyPropertyChanged("DoorNumber")
+ NotifyPropertyChanged(NameOf(DoorNumber))
End Sub
#End Region ' Door Number
@@ -1015,7 +1021,7 @@ Public Class Assembly
Set(value As ObservableCollection(Of PartDoor))
m_ListPartDoor = value
' ogni volta che si aggiunge una compoenente riallinea la lista sotto
- NotifyPropertyChanged("ListPartDoorOfDoor")
+ NotifyPropertyChanged(NameOf(ListPartDoorOfDoor))
End Set
End Property
@@ -1035,7 +1041,7 @@ Public Class Assembly
#End Region ' List Part
-#Region "Lettura Assemblato"
+#Region "LETTURA ASSEMBLATO"
' messaggi che possono essere restituiti in fase di lettura dell'assemblato
Public Enum ResultReadingAssembInfo
@@ -2075,6 +2081,8 @@ Public Class Assembly
#Region "CreateRefCompo"
+#Region "METHODS"
+
' questo metodo è chiamato dalla proprietà CompoBtn nella classe CompoPanelVM
' dopo aver aggiunto una componente da pulsantiera viene chiamato questo metodo che costruisce il riferimento
' o anche solo esegue la modifica dell'associzaione
@@ -2419,8 +2427,26 @@ Public Class Assembly
Return True
End Function
+#End Region ' Methods
+
#End Region ' CreateRefCompo
+#Region "FIELDS & PROPERTIES"
+
+ ' gestisce la chimata delle funzioni a seconda della modifica eseguita
+ Public ReadOnly Property JambExists As Boolean
+ Get
+ If Not IsNothing(m_JambL) AndAlso Not IsNothing(m_JambR) AndAlso Not IsNothing(m_JambT) Then
+ Return True
+ End If
+ Return False
+ End Get
+ End Property
+
+#End Region ' Fields & Properties
+
+#Region "METHODS"
+
' ha lo scopo di creare una copia dei riferimenti dei PartDoor
' per permettere di scrivere in modo più semplice i metodi
Private Sub SetPartDoorCurrAssembly()
@@ -2445,21 +2471,15 @@ Public Class Assembly
m_Door2 = ListPartDoor(IndexPartDoor).Door
End If
Next
- NotifyPropertyChanged("JambExists")
+ NotifyPropertyChanged(NameOf(JambExists))
End Sub
- Public ReadOnly Property JambExists As Boolean
- Get
- If Not IsNothing(m_JambL) AndAlso Not IsNothing(m_JambR) AndAlso Not IsNothing(m_JambT) Then
- Return True
- End If
- Return False
- End Get
- End Property
+#End Region ' Methods
- ' gestisce la chimata delle funzioni a seconda della modifica eseguita
#Region "DIMENSIONING"
+#Region "METHODS"
+
' Durante la costruzione di un nuovo assemblato, oppure quando viene aggiunta/rimossa un'anta
' una volta creata la prima porta questa funzione calcola le dimensioni del telaio
Public Sub SetNewDimensionAssembly(ByVal Optional IsNewAssembly As Boolean = False)
@@ -2543,9 +2563,13 @@ Public Class Assembly
End Select
End Sub
+#End Region ' Methods
+
#End Region ' Dimensioning
-#Region "UpDateRefCompo"
+#Region "UPDATEREFCOMPO"
+
+#Region "METHODS"
' ricostruisce tutte le componenti del telaio
Public Sub CreateAssembly(Optional bAllDoors As Boolean = False)
@@ -2863,12 +2887,14 @@ Public Class Assembly
Next
End Sub
+#End Region ' Methods
-
-#End Region ' UpDateRefCompo
+#End Region ' UpdateRefCompo
#Region "HEIGHT"
+#Region "METHODS"
+
' calcola l'altezza dei JambLeft e JambRight
Public Sub HeightJamb(ByVal Optional IsNewAssembly As Boolean = False)
' se ho impostanto l'area di lavoro non modifico l'altezza dei jamb
@@ -2922,7 +2948,7 @@ Public Class Assembly
If Not IsNothing(m_JambL) Then m_JambL.SetHeight(DoubleToString(HJamb, 4))
If Not IsNothing(m_JambR) Then m_JambR.SetHeight(DoubleToString(HJamb, 4))
End If
- NotifyPropertyChanged("AssemblyHeight")
+ NotifyPropertyChanged(NameOf(AssemblyHeight))
End Sub
@@ -3067,10 +3093,14 @@ Public Class Assembly
End Sub
+#End Region ' Methods
+
#End Region ' Height
#Region "WIDTH"
+#Region "METHODS"
+
' calcola la larghezza dei jamb orizzonatli
Private Sub TopBottomWidth()
' vericfico che almeno uno su tre esista
@@ -3114,7 +3144,7 @@ Public Class Assembly
If Not IsNothing(m_JambB) Then m_JambB.SetWidth(DoubleToString(dWidth2 + dActualWidth, 4))
If Not IsNothing(m_JambT) Then m_JambT.SetWidth(DoubleToString(dWidth2 + dActualWidth, 4))
End Select
- NotifyPropertyChanged("AssemblyWidth")
+ NotifyPropertyChanged(NameOf(AssemblyWidth))
End Sub
@@ -3178,10 +3208,14 @@ Public Class Assembly
'm_RightJamb.SetWidth(m_Width)
End Sub
+#End Region ' Methods
+
#End Region ' Width
#Region "THICKNESS"
+#Region "METHODS"
+
' calcola la dimensione spessore dei Jamb (per tutti lo stesso)
Public Sub SetThicKnessJamb()
If Not IsNothing(m_JambB) Then
@@ -3196,10 +3230,14 @@ Public Class Assembly
If Not IsNothing(m_JambR) Then m_JambL.Thickness = m_Thickness
End Sub
+#End Region ' Methods
+
#End Region ' Thickness
#Region "SWING"
+#Region "METHODS"
+
' se sulla porta singola avviene cambio swing (da LeftHand a RightHand) allora devo invertire i Jamb laterali
' se eistono entrambi i Jamb laterali inverto allora li inverto
Public Sub UpDateCompolistOnJamb()
@@ -3479,6 +3517,8 @@ Public Class Assembly
End If
End Sub
+#End Region ' Methods
+
#End Region ' Swing
Public Sub RefreshJambCheck()
@@ -3530,6 +3570,8 @@ Public Class Assembly
#Region "RABBET"
+#Region "METHODS"
+
' restituisce l'indice della componente "rabbet"
Private Function nCompoRabbet() As Integer
Dim RabbetIndex As Integer = -1
@@ -3598,7 +3640,7 @@ Public Class Assembly
MessageBox.Show(String.Format(EgtMsg(50180), Map.refCompoPanelVM.CompoTypeList(IndexCompoPanel).Name & ".frame"), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else
- CurrCompo = Jamb.CompoList(IndexCompo)
+ CurrCompo = Jamb.CompoList(IndexCompo)
End If
' mofico la componete rabbet
If Not IsNothing(CurrCompo) Then
@@ -3619,20 +3661,20 @@ Public Class Assembly
If TypeOf CurrCompoParam Is TextBoxParam Then
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
TextParam.m_Value = sThicknessHead
- TextParam.NotifyPropertyChanged("Value")
+ TextParam.NotifyPropertyChanged(NameOf(Value))
End If
CurrCompoParam = CurrCompo.CompoParamList(2)
If TypeOf CurrCompoParam Is TextBoxParam Then
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
Dim sRabbetDepth As String = sOverlapTop
TextParam.m_Value = sRabbetDepth
- TextParam.NotifyPropertyChanged("Value")
+ TextParam.NotifyPropertyChanged(NameOf(Value))
End If
CurrCompoParam = CurrCompo.CompoParamList(3)
If TypeOf CurrCompoParam Is TextBoxOnOffParam Then
Dim TextParam As TextBoxOnOffParam = DirectCast(CurrCompoParam, TextBoxOnOffParam)
TextParam.SetIsActive(False)
- TextParam.NotifyPropertyChanged("Value")
+ TextParam.NotifyPropertyChanged(NameOf(Value))
End If
End Sub
@@ -3744,7 +3786,7 @@ Public Class Assembly
MessageBox.Show(String.Format(EgtMsg(50180), Map.refCompoPanelVM.CompoTypeList(CompoListIndex).Name & ".frame"), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else
- Local_Compo = Jamb.CompoList(IndexCompo)
+ Local_Compo = Jamb.CompoList(IndexCompo)
End If
If Not IsNothing(Local_Compo) Then
Dim dVal1 As Double = 0
@@ -3834,7 +3876,7 @@ Public Class Assembly
Else
TextParam.m_Value = DoubleToString(dDeltaT + dThicknessDoor, 4)
End If
- TextParam.NotifyPropertyChanged("Value")
+ TextParam.NotifyPropertyChanged(NameOf(Value))
End If
' depth
CurrCompoParam = CurrCompo.CompoParamList(2)
@@ -3843,7 +3885,7 @@ Public Class Assembly
Dim sRabbetDepth As String = sOverlap
' la profondità deve essere la stessa che è stata definita sul rabbet top
TextParam.m_Value = sRabbetDepth
- TextParam.NotifyPropertyChanged("Value")
+ TextParam.NotifyPropertyChanged(NameOf(Value))
End If
' angle
CurrCompoParam = CurrCompo.CompoParamList(3)
@@ -3851,7 +3893,7 @@ Public Class Assembly
Dim TextOnOffParam As TextBoxOnOffParam = DirectCast(CurrCompoParam, TextBoxOnOffParam)
' disaativo il paramtro Angle
TextOnOffParam.SetIsActive(False)
- TextOnOffParam.NotifyPropertyChanged("Value")
+ TextOnOffParam.NotifyPropertyChanged(NameOf(Value))
End If
Case 1
@@ -3863,7 +3905,7 @@ Public Class Assembly
If TypeOf DirectCast(CurrCompoParam, CompoParam) Is TextBoxParam Then
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
TextParam.m_Value = DoubleToString(dDeltaT, 4)
- TextParam.NotifyPropertyChanged("Value")
+ TextParam.NotifyPropertyChanged(NameOf(Value))
End If
' Depth
CurrCompoParam = CurrCompo.CompoParamList(2)
@@ -3871,7 +3913,7 @@ Public Class Assembly
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
Dim sRabbetDepth As String = sOverlap
TextParam.m_Value = sRabbetDepth
- TextParam.NotifyPropertyChanged("Value")
+ TextParam.NotifyPropertyChanged(NameOf(Value))
End If
' Angle
CurrCompoParam = CurrCompo.CompoParamList(3)
@@ -3880,19 +3922,28 @@ Public Class Assembly
Dim sAngle As String = "2"
TextOnOffParam.m_Value = sAngle
TextOnOffParam.SetIsActive(True)
- TextOnOffParam.NotifyPropertyChanged("Value")
+ TextOnOffParam.NotifyPropertyChanged(NameOf(Value))
End If
End Select
End Sub
+#End Region ' Methods
+
#End Region ' Rabbet
#End Region ' Rules Assembly
+#End Region ' Methods
+
+#Region "EVENTS"
+
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
+
+#End Region ' Events
+
End Class
diff --git a/Assembly/AssemblyPageV.xaml b/Assembly/AssemblyPageV.xaml
index bc37374..46267d8 100644
--- a/Assembly/AssemblyPageV.xaml
+++ b/Assembly/AssemblyPageV.xaml
@@ -249,22 +249,22 @@
Grid.Column="2"
Name="LockEdge"
IsChecked="{Binding CurrAssembly.LockEdgeMachining}"
- Style="{DynamicResource DoorParamsChBx}"/>
+ Style="{DynamicResource GeneralCheckBox}"/>
+ Style="{DynamicResource GeneralCheckBox}"/>
+ Style="{DynamicResource GeneralCheckBox}"/>
+ Style="{DynamicResource GeneralCheckBox}"/>
diff --git a/Assembly/AssemblyPageVM.vb b/Assembly/AssemblyPageVM.vb
index bcfd314..e877a47 100644
--- a/Assembly/AssemblyPageVM.vb
+++ b/Assembly/AssemblyPageVM.vb
@@ -1,11 +1,11 @@
Imports System.ComponentModel
-Imports System.Collections.ObjectModel
-Imports System.IO
Imports EgtUILib
Public Class AssemblyPageVM
Implements INotifyPropertyChanged
+#Region "FIELDS & PROPERTIES"
+
' copia del riferimento all'assemblato corrente
Public ReadOnly Property CurrAssembly As Assembly
Get
@@ -17,25 +17,9 @@ Public Class AssemblyPageVM
End Get
End Property
- ' Definizione comandi
- Private m_CmdJambBtn As ICommand
- Private m_EnterRefreshCmd As ICommand
- Private m_CmdOrderBtn As ICommand
-
' all'avvio del programma definisco come pagina impostata quella dell'Assemblato (altrimenti dovrei definire "FR_", "FL_"..)
Public Property SlectedPart As String = "AssemblyPage"
- ' Costruttore
- Sub New()
- Map.SetRefJambPageVM(Me)
- End Sub
-
- Sub PrepareEvent()
- If Not IsNothing(Map.refInstrumentPanelVM) Then
- AddHandler Map.refInstrumentPanelVM.EnableCurrentPage, AddressOf Me.SetStatusPage
- End If
- End Sub
-
#Region "Messages"
Public ReadOnly Property JambPageMsg As String
@@ -231,7 +215,75 @@ Public Class AssemblyPageVM
End Get
End Property
-#End Region
+#End Region ' Messages
+
+ ' Definizione comandi
+ Private m_CmdJambBtn As ICommand
+ Private m_EnterRefreshCmd As ICommand
+ Private m_CmdOrderBtn As ICommand
+
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
+
+ Sub New()
+ Map.SetRefJambPageVM(Me)
+ End Sub
+
+#End Region ' Constructor
+
+#Region "METHODS"
+
+ Sub PrepareEvent()
+ If Not IsNothing(Map.refInstrumentPanelVM) Then
+ AddHandler Map.refInstrumentPanelVM.EnableCurrentPage, AddressOf Me.SetStatusPage
+ End If
+ End Sub
+
+ ' ricevuto il nome dell'oggetto di tipo Part restituisce il PartDoor che lo contiene
+ Public Function ReserchPartDoor(TypePart As String) As PartDoor
+ Dim PD As PartDoor = Nothing
+ If IsNothing(CurrAssembly) OrElse IsNothing(CurrAssembly.ListPartDoor) Then
+ Return PD
+ End If
+ For IndexPartDoor As Integer = 0 To CurrAssembly.ListPartDoor.Count - 1
+ If CurrAssembly.ListPartDoor(IndexPartDoor).Door.TypePart.Contains(TypePart) Then
+ PD = CurrAssembly.ListPartDoor(IndexPartDoor)
+ Exit For
+ End If
+ Next
+ Return PD
+ End Function
+
+ ' carica a video l'ogetto di cui è passato il nome (TypePart)
+ Private Function LoadSelectedPartDoor(TypePart As String, CompoPanelVisibility As Visibility, PartPageIsReadOnly As Boolean) As Boolean
+ Dim Local_PD As PartDoor = ReserchPartDoor(TypePart)
+ If IsNothing(Local_PD) Then Return False
+ DdfFile.WriteDDFPart(Local_PD.Door, IniFile.m_sTempDir & "\" & TEMP_FILE, True, False)
+ ExecDoors(Map.refSceneManagerVM.ProjectScene, IniFile.m_sTempDir & "\" & TEMP_FILE, False)
+ Map.refPartPageVM.CurrPart = Local_PD.Door
+ Map.refCompoPanelVM.IsVisible = CompoPanelVisibility
+ Map.refPartPageVM.NotifyPropertyChanged(NameOf(Map.refPartPageVM.VisibilityTopShape))
+ Map.refPartPageVM.IsRaedOnly = PartPageIsReadOnly
+ Return True
+ End Function
+
+ Sub SetStatusPage()
+ NotifyPropertyChanged(NameOf(EnablePageAssembly))
+ End Sub
+ Public ReadOnly Property EnablePageAssembly As Boolean
+ Get
+ Map.refProjectManagerVM.NotifyPropertyChanged(NameOf(Map.refProjectManagerVM.EnableProjectManager))
+ Map.refAssemblyManagerVM.NotifyPropertyChanged(NameOf(Map.refAssemblyManagerVM.EnableAssebmlyManager))
+ If Not IsNothing(Map.refInstrumentPanelVM) Then
+ Return Map.refInstrumentPanelVM.EnablePage
+ Else
+ Return True
+ End If
+ End Get
+ End Property
+
+#End Region ' Methods
#Region "COMMANDS"
@@ -269,12 +321,12 @@ Public Class AssemblyPageVM
' aggiorno elenco quotature
Map.refDimensioningPanelVM.LoadHardwareDimList()
Map.refSceneManagerVM.RefreshBtn()
- Map.refProjectManagerVM.NotifyPropertyChanged("VisibilityCreateAssembly")
+ Map.refProjectManagerVM.NotifyPropertyChanged(NameOf(Map.refProjectManagerVM.VisibilityCreateAssembly))
End Sub
#End Region ' PartBtn
-#Region "REFRESH"
+#Region "RefreshCmd"
Public ReadOnly Property RefreshCmd As ICommand
Get
@@ -289,9 +341,9 @@ Public Class AssemblyPageVM
Map.refSceneManagerVM.RefreshBtn()
End Sub
-#End Region ' Refresh
+#End Region ' RefreshCmd
-#Region "ORDER"
+#Region "OrderCmd"
Public ReadOnly Property OrderCmd As ICommand
Get
@@ -307,56 +359,11 @@ Public Class AssemblyPageVM
OrderWnd.ShowDialog()
End Sub
-#End Region ' Order
+#End Region ' OrderCmd
-#End Region ' Comand
+#End Region ' Command
-#Region "METHODS"
-
- ' ricevuto il nome dell'oggetto di tipo Part restituisce il PartDoor che lo contiene
- Public Function ReserchPartDoor(TypePart As String) As PartDoor
- Dim PD As PartDoor = Nothing
- If IsNothing(CurrAssembly) OrElse IsNothing(CurrAssembly.ListPartDoor) Then
- Return PD
- End If
- For IndexPartDoor As Integer = 0 To CurrAssembly.ListPartDoor.Count - 1
- If CurrAssembly.ListPartDoor(IndexPartDoor).Door.TypePart.Contains(TypePart) Then
- PD = CurrAssembly.ListPartDoor(IndexPartDoor)
- Exit For
- End If
- Next
- Return PD
- End Function
-
- ' carica a video l'ogetto di cui è passato il nome (TypePart)
- Private Function LoadSelectedPartDoor(TypePart As String, CompoPanelVisibility As Visibility, PartPageIsReadOnly As Boolean) As Boolean
- Dim Local_PD As PartDoor = ReserchPartDoor(TypePart)
- If IsNothing(Local_PD) Then Return False
- DdfFile.WriteDDFPart(Local_PD.Door, IniFile.m_sTempDir & "\" & TEMP_FILE, True, False)
- ExecDoors(Map.refSceneManagerVM.ProjectScene, IniFile.m_sTempDir & "\" & TEMP_FILE, False)
- Map.refPartPageVM.CurrPart = Local_PD.Door
- Map.refCompoPanelVM.IsVisible = CompoPanelVisibility
- Map.refPartPageVM.NotifyPropertyChanged("VisibilityTopShape")
- Map.refPartPageVM.IsRaedOnly = PartPageIsReadOnly
- Return True
- End Function
-
- Sub SetStatusPage()
- NotifyPropertyChanged("EnablePageAssembly")
- End Sub
- Public ReadOnly Property EnablePageAssembly As Boolean
- Get
- Map.refProjectManagerVM.NotifyPropertyChanged("EnableProjectManager")
- Map.refAssemblyManagerVM.NotifyPropertyChanged("EnableAssebmlyManager")
- If Not IsNothing(Map.refInstrumentPanelVM) Then
- Return Map.refInstrumentPanelVM.EnablePage
- Else
- Return True
- End If
- End Get
- End Property
-
-#End Region ' Methods
+#Region "EVENTS"
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
@@ -364,5 +371,7 @@ Public Class AssemblyPageVM
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
+#End Region ' Events
+
End Class
diff --git a/Assembly/Association.vb b/Assembly/Association.vb
index 188f453..9a9a0fe 100644
--- a/Assembly/Association.vb
+++ b/Assembly/Association.vb
@@ -1,11 +1,10 @@
-Imports System.Collections.ObjectModel
-Imports System.IO
-Imports EgtUILib
-Imports EgtWPFLib5
+Imports EgtWPFLib5
Public Class Association
Inherits VMBase
+#Region "METHODS"
+
Private m_Side As Integer
Public Property Side As Integer
Get
@@ -26,9 +25,15 @@ Public Class Association
End Set
End Property
+#End Region ' Methods
+
+#Region "CONSTRUCTOR"
+
Sub New(ref_PartDoor As PartDoor, ref_nSide As Integer)
m_refPartDoor = ref_PartDoor
Side = ref_nSide
End Sub
+#End Region ' Constructor
+
End Class
diff --git a/Assembly/JambsAndDoorsSceneHostV.xaml.vb b/Assembly/JambsAndDoorsSceneHostV.xaml.vb
index 5b8a11c..1315396 100644
--- a/Assembly/JambsAndDoorsSceneHostV.xaml.vb
+++ b/Assembly/JambsAndDoorsSceneHostV.xaml.vb
@@ -5,12 +5,19 @@ Imports System.IO
Public Class JambsAndDoorsSceneHostV
+#Region "FIELDS & PROPERTIES"
+
Private m_nCtx As Integer = -1
Private m_nIdMarked As Integer = GDB_ID.NULL
+ Private m_bCtrl As Boolean = False
+ Private m_bShift As Boolean = False
+
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
Sub New()
-
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Creo riferimento a questa classe in CompoWindowMap
@@ -24,9 +31,14 @@ Public Class JambsAndDoorsSceneHostV
EgtSetCurrentContext(JambsAndDoorsScene.GetCtx())
End Sub
+#End Region ' Constructor
+
+#Region "METHODS"
+
Private Sub Load() Handles Me.Loaded
EgtNewFile()
LoadAssemblyProject()
+ PreInitializeScene()
End Sub
Private Sub PreInitializeScene()
@@ -35,8 +47,12 @@ Public Class JambsAndDoorsSceneHostV
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
JambsAndDoorsScene.SetDefaultMaterial(DefColor)
' imposto colori sfondo
- 'Dim BackTopColor As New Color3d(192, 192, 192)
- Dim BackTopColor As New Color3d(0, 123, 167)
+ Dim BackTopColor As Color3d
+ If Not IsNothing(Map.refOptionsVM) AndAlso Map.refOptionsVM.SelectedTheme.Name = "Default" Then
+ BackTopColor = New Color3d(192, 192, 192)
+ Else
+ BackTopColor = New Color3d(0, 123, 167)
+ End If
'GetMainPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
Dim BackBotColor As New Color3d(BackTopColor)
GetMainPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
@@ -91,6 +107,7 @@ Public Class JambsAndDoorsSceneHostV
' Reimposto il contesto principale
EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
+ Map.refSceneManagerVM.RefreshBtn()
End Sub
Friend Sub CleanHelpProject()
@@ -133,7 +150,7 @@ Public Class JambsAndDoorsSceneHostV
Dim sNamePartId As String = String.Empty
EgtGetName(nPartId, sNamePartId)
Select Case sNamePartId
- Case "DOOR", "FRAME_LOCK", "FRAME_HINGE", "FRAME_TOP"
+ Case "DOOR", "FRAME_LEFT", "FRAME_RIGHT", "FRAME_TOP"
SetMarkCurrId(nPartId)
Exit While
End Select
@@ -153,6 +170,7 @@ Public Class JambsAndDoorsSceneHostV
'''
Private Sub MyMouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles JambsAndDoorsScene.OnMouseDownScene
EgtSetCurrentContext(JambsAndDoorsScene.GetCtx())
+ If m_bCtrl Then Return
EgtSetObjFilterForSelWin(True, True, True, True, True)
Dim nSel As Integer
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
@@ -165,9 +183,16 @@ Public Class JambsAndDoorsSceneHostV
Select Case sNamePartId
Case "DOOR"
Map.refAssemblyPageVM.JambBtn("DO_1")
- Case "FRAME_LOCK"
- Case "FRAME_HINGE"
+ Case "FRAME_LEFT"
+ If m_bShift Then
+ Map.refAssemblyPageVM.CurrAssembly.JambLIsChecked = Not Map.refAssemblyPageVM.CurrAssembly.JambLIsChecked
+ Exit While
+ End If
+ Map.refAssemblyPageVM.JambBtn(ConstGen.PART_FRAME_LEFT)
+ Case "FRAME_RIGHT"
+ Map.refAssemblyPageVM.JambBtn(ConstGen.PART_FRAME_RIGHT)
Case "FRAME_TOP"
+ Map.refAssemblyPageVM.JambBtn(ConstGen.PART_FRAME_TOP)
Case Else
Exit While
End Select
@@ -175,6 +200,17 @@ Public Class JambsAndDoorsSceneHostV
End While
' Reimposto contesto principale progetto
EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
+ Map.refSceneManagerVM.RefreshBtn()
+ End Sub
+
+ Private Sub OnSceneKeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles JambsAndDoorsScene.KeyDown
+ If e.KeyValue = System.Windows.Forms.Keys.Control OrElse e.KeyValue = System.Windows.Forms.Keys.ControlKey Then m_bCtrl = True
+ If e.KeyValue = Forms.Keys.Shift OrElse e.KeyValue = Forms.Keys.ShiftKey Then m_bShift = True
+ End Sub
+
+ Private Sub OnSceneKeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles JambsAndDoorsScene.KeyUp
+ m_bCtrl = False
+ m_bShift = False
End Sub
Friend Sub SelectCurrDoor(Param As CompoParam)
@@ -196,4 +232,6 @@ Public Class JambsAndDoorsSceneHostV
EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
End Sub
+#End Region ' Methods
+
End Class
diff --git a/Assembly/PartDoor.vb b/Assembly/PartDoor.vb
index 07c3e86..1ac629e 100644
--- a/Assembly/PartDoor.vb
+++ b/Assembly/PartDoor.vb
@@ -1,12 +1,11 @@
-Imports System.ComponentModel
-Imports System.Collections.ObjectModel
-Imports System.IO
-Imports EgtUILib
+Imports System.Collections.ObjectModel
Imports EgtWPFLib5
Public Class PartDoor
Inherits VMBase
+#Region "FIELDS & PROPERTIES"
+
Private m_IsTemplate As Boolean = False
Public Property IsTemplate As Boolean
Get
@@ -53,7 +52,7 @@ Public Class PartDoor
Public Sub SetIsChecked(bIsChecked As Boolean)
m_IsChecked = bIsChecked
m_Door.IsActive = bIsChecked
- NotifyPropertyChanged("IsChecked")
+ NotifyPropertyChanged(NameOf(IsChecked))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End Sub
@@ -73,4 +72,6 @@ Public Class PartDoor
End Get
End Property
+#End Region ' Fields & Properties
+
End Class
diff --git a/AssemblyManager/AssemblyManagerV.xaml b/AssemblyManager/AssemblyManagerV.xaml
index 58951e6..bc6e139 100644
--- a/AssemblyManager/AssemblyManagerV.xaml
+++ b/AssemblyManager/AssemblyManagerV.xaml
@@ -26,7 +26,7 @@
+ Style="{DynamicResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
diff --git a/AssemblyManager/AssemblyManagerV.xaml.vb b/AssemblyManager/AssemblyManagerV.xaml.vb
index 9302233..b9a81f4 100644
--- a/AssemblyManager/AssemblyManagerV.xaml.vb
+++ b/AssemblyManager/AssemblyManagerV.xaml.vb
@@ -1,5 +1,7 @@
Public Class AssemblyManagerV
+#Region "METHODS"
+
Private Sub Door_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
Dim Item As ListBoxItem = DirectCast(sender, ListBoxItem)
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
@@ -44,4 +46,6 @@
End Sub
+#End Region ' Methods
+
End Class
diff --git a/AssemblyManager/AssemblyManagerVM.vb b/AssemblyManager/AssemblyManagerVM.vb
index 8361fe4..c8e4964 100644
--- a/AssemblyManager/AssemblyManagerVM.vb
+++ b/AssemblyManager/AssemblyManagerVM.vb
@@ -6,6 +6,8 @@ Imports EgtWPFLib5
Public Class AssemblyManagerVM
Inherits VMBase
+#Region "FIELDS & PROPERTIES"
+
' creiamo un nuovo progetto: un nome e una lista di porte
Private m_CurrProject As New Project
Public Property CurrProject As Project
@@ -14,7 +16,7 @@ Public Class AssemblyManagerVM
End Get
Set(value As Project)
m_CurrProject = value
- NotifyPropertyChanged("CurrProject")
+ NotifyPropertyChanged(NameOf(CurrProject))
End Set
End Property
@@ -25,7 +27,7 @@ Public Class AssemblyManagerVM
End Get
Set(value As Visibility)
m_VisibilityDoorList = value
- NotifyPropertyChanged("VisibilityDoorList")
+ NotifyPropertyChanged(NameOf(VisibilityDoorList))
End Set
End Property
@@ -39,7 +41,7 @@ Public Class AssemblyManagerVM
End Get
End Property
-#Region "MESSAGES"
+#Region "Messages"
Public ReadOnly Property AddNewDoorToolTip As String
Get
@@ -53,16 +55,22 @@ Public Class AssemblyManagerVM
End Get
End Property
-#End Region 'MESSAGES
+#End Region 'Messages
' Definizione comandi
Private m_cmdAddAssembly As ICommand
Private m_cmdRemoveAssembly As ICommand
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
+
Sub New()
Map.SetRefDoorManagerVM(Me)
End Sub
+#End Region ' Constructor
+
#Region "METHODS"
#Region "Apertura e salvataggio"
@@ -164,7 +172,7 @@ Public Class AssemblyManagerVM
SavedAssName.IsModified = False
' ogni progetto salvato è l'ultimo da aprire, anche se il programma è chiuso dall'HardwareManager
WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name)
- SavedAssName.NotifyPropertyChanged("IsModify")
+ SavedAssName.NotifyPropertyChanged(NameOf(SavedAssName.IsModified))
Else
Return False
End If
@@ -1364,7 +1372,7 @@ Public Class AssemblyManagerVM
For Each ItemPartDoor In CurrAssembly.ListPartDoorOfDoor
SetSwingOnDoor(CurrAssembly.DoorNumber, ItemPartDoor.Door, IndexSwing)
Next
- CurrAssembly.NotifyPropertyChanged("ListPartDoorOfDoor")
+ CurrAssembly.NotifyPropertyChanged(NameOf(CurrAssembly.ListPartDoorOfDoor))
End Sub
' carica i valori di default (dell'option page) nella prima porta
@@ -1571,11 +1579,11 @@ Public Class AssemblyManagerVM
#End Region ' Association
-#End Region ' METHODS
+#End Region ' Methods
#Region "COMMANDS"
-#Region "AddDoor"
+#Region "AddAssembly_Command"
Public ReadOnly Property AddAssembly_Command As ICommand
Get
@@ -1752,9 +1760,9 @@ Public Class AssemblyManagerVM
Return String.Empty
End Function
-#End Region ' AddDoor
+#End Region ' AddAssembly_Command
-#Region "RemoveAssembly"
+#Region "RemoveAssembly_Command"
Public ReadOnly Property RemoveAssembly_Command As ICommand
Get
@@ -1776,7 +1784,7 @@ Public Class AssemblyManagerVM
End Select
End Sub
-#End Region ' RemoveAssembly
+#End Region ' RemoveAssembly_Command
#End Region ' COMMANDS
diff --git a/AssemblyManager/AssemblyName.vb b/AssemblyManager/AssemblyName.vb
index 804beb4..795855c 100644
--- a/AssemblyManager/AssemblyName.vb
+++ b/AssemblyManager/AssemblyName.vb
@@ -54,7 +54,7 @@ Public Class AssemblyName
' Map.refMainWindowVM.ProjectNameMsg = sTitle
'End If
MakeTitle()
- NotifyPropertyChanged("GraphicName")
+ NotifyPropertyChanged(NameOf(GraphicName))
End Set
End Property
@@ -75,7 +75,7 @@ Public Class AssemblyName
End Get
Set(value As Assembly)
m_SelAssembly = value
- Map.refAssemblyPageVM.NotifyPropertyChanged("CurrAssembly")
+ Map.refAssemblyPageVM.NotifyPropertyChanged(NameOf(Map.refAssemblyPageVM.CurrAssembly))
End Set
End Property
diff --git a/Command/Command.vb b/Command/Command.vb
index 139c1ba..0cfdfbb 100644
--- a/Command/Command.vb
+++ b/Command/Command.vb
@@ -1,6 +1,4 @@
-
-
-Public Class Command
+Public Class Command
Implements ICommand
#Region "Fields"
@@ -29,7 +27,7 @@ Public Class Command
#Region "ICommand Members"
- _
+
Public Function CanExecute(ByVal parameter As Object) As Boolean Implements ICommand.CanExecute
Return If(_canExecute Is Nothing, True, _canExecute(parameter))
End Function
@@ -50,4 +48,5 @@ Public Class Command
End Sub
#End Region ' ICommand Members
+
End Class
\ No newline at end of file
diff --git a/CompoMatch.vb b/CompoMatch.vb
index c01aa97..3ed9943 100644
--- a/CompoMatch.vb
+++ b/CompoMatch.vb
@@ -3,6 +3,8 @@ Imports System.IO
Module CompoMatch
+#Region "METHODS"
+
' restituisce il nome dell'assegnazione eseguito nel file Matching.lua e resetta l'assegnazione
Friend Function CalcCompoMatching(sCompoDir As String, DoorNumber As Integer, sTemplate As String, ByRef sFrameTemplate As String) As Boolean
' Path del lua da utilizzare
@@ -206,7 +208,10 @@ Module CompoMatch
Return True
End Function
+#End Region ' Methods
+
#Region "HARDWAREMANAGER"
+
' carico il file Tabella.lua per la ricerca dei nomi delle geometrie
Friend Function LoadTableGeometry() As Boolean
EgtLuaCreateGlobTable("HMD")
diff --git a/CompoPanel/CompoPanelVM.vb b/CompoPanel/CompoPanelVM.vb
index 93dbc52..7edd15f 100644
--- a/CompoPanel/CompoPanelVM.vb
+++ b/CompoPanel/CompoPanelVM.vb
@@ -36,7 +36,7 @@ Public Class CompoPanelVM
End Get
Set(value As Visibility)
m_IsVisible = value
- NotifyPropertyChanged("IsVisible")
+ NotifyPropertyChanged(NameOf(IsVisible))
End Set
End Property
@@ -47,7 +47,7 @@ Public Class CompoPanelVM
End Get
Set(value As Visibility)
m_GoBackVisibility = value
- NotifyPropertyChanged("GoBackVisibility")
+ NotifyPropertyChanged(NameOf(GoBackVisibility))
End Set
End Property
diff --git a/CompoPanel/CompoType.vb b/CompoPanel/CompoType.vb
index 2c89a09..2a7126c 100644
--- a/CompoPanel/CompoType.vb
+++ b/CompoPanel/CompoType.vb
@@ -45,7 +45,7 @@ Public Class CompoType
End Get
Set(value As Boolean)
m_IsSelectedBtn = value
- NotifyPropertyChanged("IsSelectedBtn")
+ NotifyPropertyChanged(NameOf(IsSelectedBtn))
End Set
End Property
diff --git a/DataService/ThemesDataService.vb b/DataService/ThemesDataService.vb
index 8a0c83c..11f9d6c 100644
--- a/DataService/ThemesDataService.vb
+++ b/DataService/ThemesDataService.vb
@@ -1,7 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.Resources
-Imports Microsoft.Windows
Public Class ThemesDataService
diff --git a/DdfFile.vb b/DdfFile.vb
index 2060925..1d2bb66 100644
--- a/DdfFile.vb
+++ b/DdfFile.vb
@@ -1,10 +1,11 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
-Imports System.Text.RegularExpressions
Friend Module DdfFile
+#Region "METHODS"
+
' lista ordinata delle componenti da stampare
Friend CompoListOrder As New List(Of String)
' se riesco a scrivere un DDF (o una parte dell'essamblato) diventa true
@@ -25,6 +26,8 @@ Friend Module DdfFile
Private ParamInCompoIsCorrect As Boolean = True
+#End Region ' Methods
+
#Region "SCRITTURA DDF"
' Questa funzione dovrà sostituire quella precedente (Scritta sopra)
@@ -1641,6 +1644,7 @@ Friend Module DdfFile
#End Region ' Scrittura DDF
#Region "SCRITTURA ASSEMBLATO"
+
' serve per pulire il file temporaneo la prima volta che viene creato
Friend Function WriteDDFAssembly(ByVal CurrAssembly As Assembly, sPath As String, bIsDDF As Boolean) As Boolean
' verifico esistenza assemblato
@@ -1846,6 +1850,6 @@ Friend Module DdfFile
Return True
End Function
-#End Region
+#End Region ' Scrittura Assemblato
End Module
diff --git a/DoorParameters/Compo.vb b/DoorParameters/Compo.vb
index e8906d5..cb49ca4 100644
--- a/DoorParameters/Compo.vb
+++ b/DoorParameters/Compo.vb
@@ -55,7 +55,7 @@ Public Class Compo
End Get
Set(value As SolidColorBrush)
m_BorderColor = value
- NotifyPropertyChanged("BorderColor")
+ NotifyPropertyChanged(NameOf(BorderColor))
End Set
End Property
@@ -67,7 +67,7 @@ Public Class Compo
End Get
Set(value As SolidColorBrush)
m_BackGroundColor = value
- NotifyPropertyChanged("BackGroundColor")
+ NotifyPropertyChanged(NameOf(BackGroundColor))
End Set
End Property
@@ -79,8 +79,8 @@ Public Class Compo
End Get
Set(value As SolidColorBrush)
m_Foreground = value
- NotifyPropertyChanged("Foreground")
- End Set
+ NotifyPropertyChanged(NameOf(Foreground))
+ End Set
End Property
' Spessorre della linea che circonda l'elenco dei parametri
@@ -91,7 +91,7 @@ Public Class Compo
End Get
Set(value As Integer)
m_BorderThickness = value
- NotifyPropertyChanged("BorderThickness")
+ NotifyPropertyChanged(NameOf(BorderThickness))
End Set
End Property
@@ -103,21 +103,25 @@ Public Class Compo
End Get
Set(value As FontWeight)
m_FontBold = value
- NotifyPropertyChanged("FontBold")
+ NotifyPropertyChanged(NameOf(FontBold))
End Set
End Property
Public Sub ResetMark()
m_BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
m_BackGroundColor = Brushes.White
- m_Foreground = Brushes.Black
+ If Not IsNothing(Map.refOptionsVM) AndAlso Map.refOptionsVM.SelectedTheme.Name = "Default" Then
+ m_Foreground = Brushes.Black
+ Else
+ m_Foreground = Brushes.White
+ End If
m_BorderThickness = 1
m_FontBold = FontWeights.Normal
- NotifyPropertyChanged("BorderColor")
- NotifyPropertyChanged("BackGroundColor")
- NotifyPropertyChanged("Foreground")
- NotifyPropertyChanged("BorderThickness")
- NotifyPropertyChanged("FontBold")
+ NotifyPropertyChanged(NameOf(BorderColor))
+ NotifyPropertyChanged(NameOf(BackGroundColor))
+ NotifyPropertyChanged(NameOf(Foreground))
+ NotifyPropertyChanged(NameOf(BorderThickness))
+ NotifyPropertyChanged(NameOf(FontBold))
End Sub
Public Sub SetMark()
@@ -126,11 +130,11 @@ Public Class Compo
m_Foreground = Brushes.Gold
m_BorderThickness = 2
m_FontBold = FontWeights.Bold
- NotifyPropertyChanged("BorderColor")
- NotifyPropertyChanged("BackGroundColor")
- NotifyPropertyChanged("Foreground")
- NotifyPropertyChanged("BorderThickness")
- NotifyPropertyChanged("FontBold")
+ NotifyPropertyChanged(NameOf(BorderColor))
+ NotifyPropertyChanged(NameOf(BackGroundColor))
+ NotifyPropertyChanged(NameOf(Foreground))
+ NotifyPropertyChanged(NameOf(BorderThickness))
+ NotifyPropertyChanged(NameOf(FontBold))
End Sub
#End Region ' Colori GroupBox
@@ -166,7 +170,7 @@ Public Class Compo
End Get
Set(value As Boolean)
m_IsReadOnly = value
- NotifyPropertyChanged("IsReadOnly")
+ NotifyPropertyChanged(NameOf(IsReadOnly))
End Set
End Property
@@ -204,7 +208,7 @@ Public Class Compo
End Get
Set(value As Boolean)
m_OtherDoor = value
- NotifyPropertyChanged("OtherDoor")
+ NotifyPropertyChanged(NameOf(OtherDoor))
End Set
End Property
@@ -219,7 +223,7 @@ Public Class Compo
End Get
Set(value As Visibility)
m_VisibilitiReloadBtn = value
- NotifyPropertyChanged("VisibilitiReloadBtn")
+ NotifyPropertyChanged(NameOf(VisibilitiReloadBtn))
End Set
End Property
@@ -237,7 +241,7 @@ Public Class Compo
End Get
Set(value As Boolean)
m_MissingDirectory = value
- NotifyPropertyChanged("MissingDirectory")
+ NotifyPropertyChanged(NameOf(MissingDirectory))
End Set
End Property
@@ -249,7 +253,7 @@ Public Class Compo
End Get
Set(value As Boolean)
m_MissingFile = value
- NotifyPropertyChanged("MissingFile")
+ NotifyPropertyChanged(NameOf(MissingFile))
End Set
End Property
@@ -262,8 +266,8 @@ Public Class Compo
Set(value As Boolean)
m_LoadByDefault = value
SetImage()
- NotifyPropertyChanged("ShowParamList")
- NotifyPropertyChanged("IsError")
+ NotifyPropertyChanged(NameOf(ShowParamList))
+ NotifyPropertyChanged(NameOf(IsError))
End Set
End Property
@@ -275,7 +279,7 @@ Public Class Compo
End Get
Set(value As Boolean)
m_MissingParameter = value
- NotifyPropertyChanged("IsError")
+ NotifyPropertyChanged(NameOf(IsError))
End Set
End Property
@@ -294,7 +298,7 @@ Public Class Compo
Exit For
End If
Next
- NotifyPropertyChanged("IsError")
+ NotifyPropertyChanged(NameOf(IsError))
End Set
End Property
@@ -306,7 +310,7 @@ Public Class Compo
End Get
Set(value As SolidColorBrush)
m_ErrorColor = value
- NotifyPropertyChanged("ErrorColor")
+ NotifyPropertyChanged(NameOf(ErrorColor))
End Set
End Property
@@ -319,7 +323,7 @@ Public Class Compo
End Get
Set(value As String)
m_FontStyleCompoBrandFile = value
- NotifyPropertyChanged("FontStyleCompoBrandFile")
+ NotifyPropertyChanged(NameOf(FontStyleCompoBrandFile))
End Set
End Property
@@ -327,7 +331,7 @@ Public Class Compo
Public ReadOnly Property ShowParamList As Visibility
Get
If m_LoadByDefault Then
- NotifyPropertyChanged("IsError")
+ NotifyPropertyChanged(NameOf(IsError))
Return Visibility.Collapsed
End If
Return Visibility.Visible
@@ -342,7 +346,7 @@ Public Class Compo
Else
m_ImageButton = "/Resources/TopCommandBar/X.png"
End If
- NotifyPropertyChanged("IsError")
+ NotifyPropertyChanged(NameOf(IsError))
End Sub
Private m_ImageButton As String = "/Resources/TopCommandBar/X.png"
@@ -437,7 +441,7 @@ Public Class Compo
End Property
Public Sub SetIsActiveChapter(IsActive As Boolean)
m_IsActiveChapter = IsActive
- NotifyPropertyChanged("IsActiveChapter")
+ NotifyPropertyChanged(NameOf(IsActiveChapter))
End Sub
' utilizzato nel HardwareManager per mostrare i parametri in cascata
@@ -459,7 +463,7 @@ Public Class Compo
End Get
Set(value As Visibility)
m_GroupVisibilityChapter = value
- NotifyPropertyChanged("GroupVisibilityChapter")
+ NotifyPropertyChanged(NameOf(GroupVisibilityChapter))
End Set
End Property
@@ -476,8 +480,8 @@ Public Class Compo
Public Sub SetEnableChapter(bEnableChapter As Boolean)
m_EnableChapter = bEnableChapter
m_ErrorColor = DirectCast(New BrushConverter().ConvertFrom(OptionModule.ColorDisableChapter), SolidColorBrush)
- NotifyPropertyChanged("EnableChapter")
- NotifyPropertyChanged("ErrorColor")
+ NotifyPropertyChanged(NameOf(EnableChapter))
+ NotifyPropertyChanged(NameOf(ErrorColor))
End Sub
#End Region ' Group Chapter
@@ -526,7 +530,7 @@ Public Class Compo
If Not IsNothing(FakeDir) Then
FileList = New ObservableCollection(Of String)
FileList = FakeDir.ModelFileList
- NotifyPropertyChanged("FileList")
+ NotifyPropertyChanged(NameOf(FileList))
End If
' se la lista finta ha almeno un valore
If FileList.Count > 0 Then
@@ -558,7 +562,7 @@ Public Class Compo
If Not IsNothing(FakeDir) Then
FileList = New ObservableCollection(Of String)
FileList = FakeDir.ModelFileList
- NotifyPropertyChanged("FileList")
+ NotifyPropertyChanged(NameOf(FileList))
End If
' se la lista finta ha almeno un valore
If FileList.Count > 0 Then
@@ -580,7 +584,7 @@ Public Class Compo
Exit For
End If
Next
- NotifyPropertyChanged("FileList")
+ NotifyPropertyChanged(NameOf(FileList))
Dim SelItemindex As Integer = 0
' seleziono il primo file del direttorio
While SelItemindex < m_FileList.Count - 1 AndAlso Path.HasExtension(m_FileList(SelItemindex))
@@ -604,8 +608,8 @@ Public Class Compo
If IndexModelList > CompoType.FolderList.Count - 1 Then Return
m_FileList = CompoType.FolderList(IndexModelList).ModelFileList
End If
- NotifyPropertyChanged("FileList")
- NotifyPropertyChanged("SelBrandPart")
+ NotifyPropertyChanged(NameOf(FileList))
+ NotifyPropertyChanged(NameOf(SelBrandPart))
End Sub
#End Region ' Brand
@@ -620,7 +624,7 @@ Public Class Compo
End Get
Set(value As ObservableCollection(Of String))
m_FileList = value
- NotifyPropertyChanged("FileList")
+ NotifyPropertyChanged(NameOf(FileList))
End Set
End Property
@@ -644,7 +648,7 @@ Public Class Compo
Assembly.BuiltReffCompo = True
Map.refAssemblyPageVM.CurrAssembly.SetDimension("CreateRefCompo", Me)
Assembly.BuiltReffCompo = False
- NotifyPropertyChanged("SelFile")
+ NotifyPropertyChanged(NameOf(SelFile))
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
@@ -656,7 +660,7 @@ Public Class Compo
Dim CurrItem As String = ModelDir & m_SelFile
' passo il nome
SetSelTemplate(CurrItem)
- NotifyPropertyChanged("SelFile")
+ NotifyPropertyChanged(NameOf(SelFile))
End Sub
#End Region ' File
@@ -936,7 +940,7 @@ Public Class Compo
' se il parametro è stato creato passa alla riga successiva
If Not bIsFinished Then ParamIndex += 1
End While
- NotifyPropertyChanged("TemplateSelItem")
+ NotifyPropertyChanged(NameOf(TemplateSelItem))
End If
' esiste già una lista
@@ -1067,7 +1071,7 @@ Public Class Compo
End If
' Ricavo i diversi item
Dim bEnableCopy As Boolean = true
- If sItems(2).Contains("$") then
+ If sItems(2).Contains("$") Then
bEnableCopy = False
sItems(2) = sItems(2).Replace("$","")
End If
@@ -1997,7 +2001,7 @@ Public Class Compo
Else
TempParam.SetIsActive(True)
End If
- TempParam.NotifyPropertyChanged("IsActive")
+ TempParam.NotifyPropertyChanged(NameOf(TempParam.IsActive))
Exit For
End If
Next
@@ -2239,13 +2243,17 @@ Public Class CompoParam
If Not IsNothing(Map.refHardwarePageVM) AndAlso
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then
If CurrCompo.EnableChapter And Not ErrorParameter Then
- NotifyPropertyChanged("FontStyleParam")
- Return "Black"
+ NotifyPropertyChanged(NameOf(FontStyleParam))
+ If Not IsNothing(Map.refOptionsVM) AndAlso Map.refOptionsVM.SelectedTheme.Name = "Default" Then
+ Return "Black"
+ Else
+ Return "White"
+ End If
ElseIf CurrCompo.EnableChapter And ErrorParameter Then
- NotifyPropertyChanged("FontStyleParam")
- Return OptionModule.ColorErrorValue
- Else
- NotifyPropertyChanged("FontStyleParam")
+ NotifyPropertyChanged(NameOf(FontStyleParam))
+ Return OptionModule.ColorErrorValue
+ Else
+ NotifyPropertyChanged(NameOf(FontStyleParam))
Return OptionModule.ColorDisableChapter
End If
End If
@@ -2279,7 +2287,7 @@ Public Class CompoParam
End Get
Set(value As Boolean)
m_IsModifingRefCompoParam = value
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
End Set
End Property
@@ -2290,7 +2298,7 @@ Public Class CompoParam
End Get
Set(value As Boolean)
m_ErrorInReading = value
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
End Set
End Property
@@ -2301,7 +2309,7 @@ Public Class CompoParam
End Get
Set(value As Boolean)
m_MissingParameterInReading = value
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
End Set
End Property
@@ -2312,7 +2320,7 @@ Public Class CompoParam
End Get
Set(value As Boolean)
m_EnableCopy = value
- NotifyPropertyChanged("EnableCopy")
+ NotifyPropertyChanged(NameOf(EnableCopy))
End Set
End Property
@@ -2471,7 +2479,7 @@ Public Class TextBoxParam
' prima di caricare un nuovo valore, salvo il precedente
m_PrecValue = m_Value
m_Value = value
- NotifyPropertyChanged("ToolTipValue")
+ NotifyPropertyChanged(NameOf(ToolTipValue))
' per evitare di evideziare tutta la componente come errore
IsModifingRefCompoParam = False
'-----------------------------------------------------
@@ -2496,7 +2504,7 @@ Public Class TextBoxParam
MissingParameterInReading = False
SetModified()
If Not IsNothing(Map.refAssemblyManagerVM) Then Map.refAssemblyManagerVM.RefreshAssembly(CurrCompo)
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
'--------------------------------------------------------------------------------------------
' significa che sto modificando una componente del telaio
If Not IsNothing(CurrCompo.refCompoDoor) AndAlso Trim(m_Value) <> Trim(m_OrigValue) Then
@@ -2511,10 +2519,10 @@ Public Class TextBoxParam
IsModifingRefCompoParam = False
End If
End If
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
ElseIf Not IsNothing(CurrCompo.refCompoDoor) AndAlso Trim(m_Value) = Trim(m_OrigValue) Then
IsModifingRefCompoParam = False
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
End If
If IsNothing(CurrCompo.refJambCompo) Then Return
' se fallisce il caricamento dei parametri esce
@@ -2530,8 +2538,8 @@ Public Class TextBoxParam
End Property
Public Sub SetValue(sValue As String)
m_Value = sValue
- NotifyPropertyChanged("Value")
- NotifyPropertyChanged("ToolTipValue")
+ NotifyPropertyChanged(NameOf(Value))
+ NotifyPropertyChanged(NameOf(ToolTipValue))
' verifica i valori della configurazione
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage AndAlso
Not IsNothing(Map.refHardwarePageVM) AndAlso Not IsNothing(Map.refHardwarePageVM.CurrHardware) Then
@@ -2546,11 +2554,11 @@ Public Class TextBoxParam
ErrorInReading = True
CurrCompo.ErrorValue = True
End If
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
If Not String.IsNullOrEmpty(sValue) AndAlso sValue.Trim = "$" Then
EnableCopy = False
m_Value = ""
- NotifyPropertyChanged("Value")
+ NotifyPropertyChanged(NameOf(Value))
End If
End If
End Sub
@@ -2752,7 +2760,7 @@ Public Class ComboBoxParam
End Get
Set(value As ObservableCollection(Of String))
m_ItemList = value
- NotifyPropertyChanged("ItemList")
+ NotifyPropertyChanged(NameOf(ItemList))
End Set
End Property
@@ -2763,7 +2771,7 @@ Public Class ComboBoxParam
End Get
Set(value As ObservableCollection(Of String))
m_ItemListDDF = value
- NotifyPropertyChanged("ItemListDDF")
+ NotifyPropertyChanged(NameOf(ItemListDDF))
End Set
End Property
@@ -2806,7 +2814,7 @@ Public Class ComboBoxParam
Else
ErrorInReading = True
End If
- NotifyPropertyChanged("ColorParam")
+ NotifyPropertyChanged(NameOf(ColorParam))
End If
Else
If String.IsNullOrEmpty(m_SelItem) Then
@@ -2821,7 +2829,7 @@ Public Class ComboBoxParam
If Not IsNothing(Map.refAssemblyManagerVM) Then Map.refAssemblyManagerVM.RefreshAssembly(CurrCompo)
End If
End If
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
' ErrorInReading = False
' CurrCompo.ErrorValue = False
Dim CmpPar As CompoParam = Me
@@ -2873,7 +2881,7 @@ Public Class ComboBoxParam
Else
IsModifingRefCompoParam = True
End If
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
End If
' verifico di essere nella configurazione HardwareManager e che la Compo chiamata si chiama "Match File"
@@ -2900,7 +2908,7 @@ Public Class ComboBoxParam
CurrCompo.ErrorValue = True
EnableCopy = False
End If
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
' verifico di essere nella configurazione HardwareManager e che la Compo chiamata si chiama "Match File" MATCHING_FILE_TEMPLATE_DOOR
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage AndAlso
(Me.CurrCompo.TemplateDDFName = MATCHING_FILE_TEMPLATE OrElse Me.CurrCompo.TemplateDDFName = MATCHING_FILE_TEMPLATE_DOOR) Then
@@ -2914,7 +2922,7 @@ Public Class ComboBoxParam
Map.refHardwarePageVM.CurrHardware.SelectBrandMatching(Me)
End Select
End If
- NotifyPropertyChanged("SelItem")
+ NotifyPropertyChanged(NameOf(SelItem))
End Sub
Sub New(sDDFName As String, sName As String, CurrCompo As Compo, ref_ItemList As ObservableCollection(Of String), ref_ItemListDDF As ObservableCollection(Of String), sSelItem As String, Optional sLayerName As String = "")
@@ -3041,7 +3049,7 @@ Public Class TextBoxDGCParam
End Property
Public Sub SetConst(SelConst As String)
m_SelConst = SelConst
- NotifyPropertyChanged("SelConst")
+ NotifyPropertyChanged(NameOf(SelConst))
End Sub
Sub New(sDDFName As String, sName As String, CurrCompo As Compo, sValue As String, ComboBox As ComboBoxParam, ComboValuelList As List(Of String), ConstList As List(Of String), TypeVar As String, Optional sLayerName As String = "")
@@ -3081,14 +3089,14 @@ Public Class TextBoxThicknessParam
End If
End Set
End Property
- Public Sub SetConst(SelConst As ItemConstThickness)
- m_SelConst = SelConst
+ Public Sub SetConst(nSelConst As ItemConstThickness)
+ m_SelConst = nSelConst
If m_SelConst.dValue = 0 Then
IsEnableMeasure = True
Else
IsEnableMeasure = False
End If
- NotifyPropertyChanged("SelConst")
+ NotifyPropertyChanged(NameOf(SelConst))
End Sub
Private m_IsEnableMeasure As Boolean = True
@@ -3098,7 +3106,7 @@ Public Class TextBoxThicknessParam
End Get
Set(value As Boolean)
m_IsEnableMeasure = value
- NotifyPropertyChanged("IsEnableMeasure")
+ NotifyPropertyChanged(NameOf(IsEnableMeasure))
End Set
End Property
@@ -3125,9 +3133,9 @@ Public Class CheckBoxParam
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
- Public Sub SetIsChecked(IsChecked As Boolean)
- m_IsChecked = IsChecked
- NotifyPropertyChanged("IsChecked")
+ Public Sub SetIsChecked(bIsChecked As Boolean)
+ m_IsChecked = bIsChecked
+ NotifyPropertyChanged(NameOf(IsChecked))
End Sub
@@ -3169,7 +3177,7 @@ Public Class ComboBoxOnOffParam
' ErrorInReading = True
' CurrCompo.ErrorValue = True
'End If
- NotifyPropertyChanged("ErrorParameter")
+ NotifyPropertyChanged(NameOf(ErrorParameter))
If String.IsNullOrEmpty(m_SelItem) then
EnableCopy = False
End If
@@ -3273,9 +3281,9 @@ Public Class ActivateParam
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
- Public Sub SetIsActivated(IsActivate As Boolean)
- m_IsActivated = IsActivate
- NotifyPropertyChanged("IsChecked")
+ Public Sub SetIsActivated(bIsActivate As Boolean)
+ m_IsActivated = bIsActivate
+ NotifyPropertyChanged(NameOf(IsActivated))
End Sub
diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb
index d3d5a99..a32430a 100644
--- a/DoorParameters/Part.vb
+++ b/DoorParameters/Part.vb
@@ -3,7 +3,6 @@ Imports System.ComponentModel
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
-Imports System.Text.RegularExpressions
Public Class Part
Implements INotifyPropertyChanged
@@ -43,7 +42,7 @@ Public Class Part
End Get
Set(value As String)
m_TypePart = value
- NotifyPropertyChanged("TypePart")
+ NotifyPropertyChanged(NameOf(TypePart))
End Set
End Property
@@ -72,7 +71,7 @@ Public Class Part
End Property
Public Sub SetIsActive(bIsActive As Boolean)
m_IsActive = bIsActive
- NotifyPropertyChanged("IsActive")
+ NotifyPropertyChanged(NameOf(IsActive))
End Sub
' lista delle disposizioni da mostrare a video (bevel)
@@ -93,14 +92,14 @@ Public Class Part
m_DispositionItem = value
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
OptionModule.m_Disposition = m_DispositionItem
- NotifyPropertyChanged("DispositionItem")
+ NotifyPropertyChanged(NameOf(DispositionItem))
End Set
End Property
Public Sub SetDispositionItem(ObjDisposition As EdgeType)
If IsNothing(m_DispositionItem) Then
m_DispositionItem = ObjDisposition
End If
- NotifyPropertyChanged("DispositionItem")
+ NotifyPropertyChanged(NameOf(DispositionItem))
End Sub
#End Region ' Nuove proprietà delle parti
@@ -230,7 +229,7 @@ Public Class Part
Else
PropertiesIsVisible = Visibility.Collapsed
End If
- NotifyPropertyChanged("SelectedMaterial")
+ NotifyPropertyChanged(NameOf(SelectedMaterial))
OptionModule.m_CurrMaterial = m_SelectedMaterial
Map.refSceneManagerVM.RefreshBtn()
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
@@ -292,9 +291,9 @@ Public Class Part
Catch ex As Exception
m_SelectedProperty = m_PropertiesList(0)
End Try
- NotifyPropertyChanged("SelectedProperty")
+ NotifyPropertyChanged(NameOf(SelectedProperty))
End If
- NotifyPropertyChanged("PropertiesList")
+ NotifyPropertyChanged(NameOf(PropertiesList))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
Map.refSceneManagerVM.RefreshBtn()
End Set
@@ -308,9 +307,9 @@ Public Class Part
Catch ex As Exception
m_SelectedProperty = m_PropertiesList(0)
End Try
- NotifyPropertyChanged("SelectedProperty")
+ NotifyPropertyChanged(NameOf(SelectedProperty))
End If
- NotifyPropertyChanged("PropertiesList")
+ NotifyPropertyChanged(NameOf(PropertiesList))
End Sub
Private m_SelectedProperty As PropertyItem
@@ -322,13 +321,13 @@ Public Class Part
m_SelectedProperty = value
Map.refSceneManagerVM.RefreshBtn()
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
- NotifyPropertyChanged("SelectedProperty")
+ NotifyPropertyChanged(NameOf(SelectedProperty))
End Set
End Property
- Public Sub SetProperty(ByVal SelProperty As PropertyItem)
- m_SelectedProperty = SelProperty
- NotifyPropertyChanged("SelectedProperty")
+ Public Sub SetProperty(ByVal nSelProperty As PropertyItem)
+ m_SelectedProperty = nSelProperty
+ NotifyPropertyChanged(NameOf(SelectedProperty))
End Sub
Private m_PropertiesIsVisible As Visibility = OptionModule.m_DisableProperties
@@ -339,7 +338,7 @@ Public Class Part
Set(value As Visibility)
If m_PropertiesIsVisible <> Visibility.Visible Then Return
m_PropertiesIsVisible = value
- NotifyPropertyChanged("PropertiesIsVisible")
+ NotifyPropertyChanged(NameOf(PropertiesIsVisible))
End Set
End Property
@@ -358,12 +357,12 @@ Public Class Part
If StringToDouble(value, dHeight) Then
EgtLuaSetGlobNumVar("H", dHeight)
End If
- NotifyPropertyChanged("ToolTipEvaluatedThickness")
- NotifyPropertyChanged("ToolTipEvaluatedWidth")
- NotifyPropertyChanged("ToolTipEvaluatedHeight")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedThickness))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedWidth))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedHeight))
'SetVarSize()
UpdateToolTip()
- NotifyPropertyChanged("Height")
+ NotifyPropertyChanged(NameOf(Height))
If Not Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then
Map.refAssemblyPageVM.CurrAssembly.SetDimension("Height")
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
@@ -376,8 +375,8 @@ Public Class Part
If StringToDouble(sHeight, dHeight) Then
EgtLuaSetGlobNumVar("H", dHeight)
End If
- NotifyPropertyChanged("Height")
- NotifyPropertyChanged("ToolTipEvaluatedHeight")
+ NotifyPropertyChanged(NameOf(Height))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedHeight))
If Not Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End If
@@ -404,9 +403,9 @@ Public Class Part
If StringToDouble(value, dWidth) Then
EgtLuaSetGlobNumVar("W", dWidth)
End If
- NotifyPropertyChanged("ToolTipEvaluatedThickness")
- NotifyPropertyChanged("ToolTipEvaluatedWidth")
- NotifyPropertyChanged("ToolTipEvaluatedHeight")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedThickness))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedWidth))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedHeight))
'SetVarSize()
UpdateToolTip()
Map.refAssemblyPageVM.CurrAssembly.SetDimension("Width")
@@ -419,8 +418,8 @@ Public Class Part
If StringToDouble(sWidth, dWidth) Then
EgtLuaSetGlobNumVar("W", dWidth)
End If
- NotifyPropertyChanged("Width")
- NotifyPropertyChanged("ToolTipEvaluatedWidth")
+ NotifyPropertyChanged(NameOf(Width))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedWidth))
If Not Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End If
@@ -447,9 +446,9 @@ Public Class Part
If StringToDouble(value, dThickness) Then
EgtLuaSetGlobNumVar("T", dThickness)
End If
- NotifyPropertyChanged("ToolTipEvaluatedThickness")
- NotifyPropertyChanged("ToolTipEvaluatedWidth")
- NotifyPropertyChanged("ToolTipEvaluatedHeight")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedThickness))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedWidth))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedHeight))
'SetVarSize()
UpdateToolTip()
Map.refAssemblyPageVM.CurrAssembly.SetDimension("Thickness")
@@ -462,8 +461,8 @@ Public Class Part
If StringToDouble(sThickness, dThickness) Then
EgtLuaSetGlobNumVar("T", dThickness)
End If
- NotifyPropertyChanged("Thickness")
- NotifyPropertyChanged("ToolTipEvaluatedThickness")
+ NotifyPropertyChanged(NameOf(Thickness))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedThickness))
If Not Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End If
@@ -494,7 +493,7 @@ Public Class Part
Set(value As String)
m_Weight = value
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
- NotifyPropertyChanged("ToolTipEvaluatedWeight")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedWeight))
End Set
End Property
Public ReadOnly Property ToolTipEvaluatedWeight As String
@@ -526,7 +525,7 @@ Public Class Part
If m_IsCheckedWeight <> value Then
m_IsCheckedWeight = value
End If
- NotifyPropertyChanged("VisibilityWeight")
+ NotifyPropertyChanged(NameOf(VisibilityWeight))
End Set
End Property
@@ -577,7 +576,7 @@ Public Class Part
m_Swing = value
OptionModule.SetCurrSwing(m_SwingAlias, value)
m_Swing = m_SwingAlias.AliasName
- NotifyPropertyChanged("Swing")
+ NotifyPropertyChanged(NameOf(Swing))
Map.refAssemblyPageVM.CurrAssembly.SetDimension("Swing")
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
' aggiorno la grafica
@@ -588,7 +587,7 @@ Public Class Part
Public Sub SetSwing(sSwing As String)
OptionModule.SetCurrSwing(m_SwingAlias, sSwing)
m_Swing = m_SwingAlias.AliasName
- NotifyPropertyChanged("Swing")
+ NotifyPropertyChanged(NameOf(Swing))
End Sub
#End Region ' Swing
@@ -655,15 +654,15 @@ Public Class Part
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
- Public Sub SetLockEdgeType(LockEdgeType As EdgeType)
- m_LockEdgeType = LockEdgeType
- NotifyPropertyChanged("LockEdgeType")
+ Public Sub SetLockEdgeType(nLockEdgeType As EdgeType)
+ m_LockEdgeType = nLockEdgeType
+ NotifyPropertyChanged(NameOf(LockEdgeType))
End Sub
Private m_HingeEdgeType As New EdgeType("", Visibility.Visible)
Public Property HingeEdgeType As EdgeType
Get
- NotifyPropertyChanged("EdgeTypeList")
+ NotifyPropertyChanged(NameOf(Map.refAssemblyPageVM.CurrAssembly.EdgeTypeList))
Return m_HingeEdgeType
End Get
Set(value As EdgeType)
@@ -672,9 +671,9 @@ Public Class Part
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
- Public Sub SetHingeEdgeType(HingeEdgeType As EdgeType)
- m_HingeEdgeType = HingeEdgeType
- NotifyPropertyChanged("HingeEdgeType")
+ Public Sub SetHingeEdgeType(nHingeEdgeType As EdgeType)
+ m_HingeEdgeType = nHingeEdgeType
+ NotifyPropertyChanged(NameOf(HingeEdgeType))
End Sub
Private m_TopType As New EdgeType("", Visibility.Visible)
@@ -688,9 +687,9 @@ Public Class Part
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
- Public Sub SetTopType(TopType As EdgeType)
- m_TopType = TopType
- NotifyPropertyChanged("TopType")
+ Public Sub SetTopType(nTopType As EdgeType)
+ m_TopType = nTopType
+ NotifyPropertyChanged(NameOf(TopType))
End Sub
Private m_BottomType As New EdgeType("", Visibility.Visible)
@@ -704,9 +703,9 @@ Public Class Part
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
- Public Sub SetBottomType(BottomType As EdgeType)
- m_BottomType = BottomType
- NotifyPropertyChanged("BottomType")
+ Public Sub SetBottomType(nBottomType As EdgeType)
+ m_BottomType = nBottomType
+ NotifyPropertyChanged(NameOf(BottomType))
End Sub
Private m_InvertBevel As Boolean = False
@@ -716,14 +715,14 @@ Public Class Part
End Get
Set(value As Boolean)
m_InvertBevel = value
- NotifyPropertyChanged("InvertBevel")
+ NotifyPropertyChanged(NameOf(InvertBevel))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
Map.refSceneManagerVM.RefreshBtn()
End Set
End Property
Public Sub SetInvertBevel(bInvertBevel As Boolean)
m_InvertBevel = bInvertBevel
- NotifyPropertyChanged("InvertBevel")
+ NotifyPropertyChanged(NameOf(InvertBevel))
End Sub
#End Region ' Edge
@@ -856,7 +855,7 @@ Public Class Part
Set(value As String)
m_LockEdgeOverMaterial = value
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
- NotifyPropertyChanged("ToolTipEvaluatedLockOverMaterial")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedLockOverMaterial))
End Set
End Property
@@ -868,7 +867,7 @@ Public Class Part
Set(value As String)
m_HingeEdgeOverMaterial = value
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
- NotifyPropertyChanged("ToolTipEvaluatedHingeOverMaterial")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedHingeOverMaterial))
End Set
End Property
@@ -880,7 +879,7 @@ Public Class Part
Set(value As String)
m_TopOverMaterial = value
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
- NotifyPropertyChanged("ToolTipEvaluatedTopOverMaterial")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedTopOverMaterial))
End Set
End Property
@@ -892,7 +891,7 @@ Public Class Part
Set(value As String)
m_BottomOverMaterial = value
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
- NotifyPropertyChanged("ToolTipEvaluatedBottomOverMaterial")
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedBottomOverMaterial))
End Set
End Property
@@ -919,8 +918,8 @@ Public Class Part
End Get
Set(value As String)
m_PosCut = value
- NotifyPropertyChanged("PosCut")
- NotifyPropertyChanged("ToolTipEvaluatedPosCut")
+ NotifyPropertyChanged(NameOf(PosCut))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedPosCut))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End Set
End Property
@@ -999,8 +998,8 @@ Public Class Part
TopAngleIsChecked = True
TopArcIsChecked = False
End If
- NotifyPropertyChanged("VisibilityTopArch")
- NotifyPropertyChanged("VisibilityTopAngle")
+ NotifyPropertyChanged(NameOf(VisibilityTopArch))
+ NotifyPropertyChanged(NameOf(VisibilityTopAngle))
End Set
End Property
@@ -1013,8 +1012,8 @@ Public Class Part
End Get
Set(value As String)
m_Radius = value
- NotifyPropertyChanged("Radius")
- NotifyPropertyChanged("ToolTipEvaluatedRadius")
+ NotifyPropertyChanged(NameOf(Radius))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedRadius))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End Set
End Property
@@ -1036,8 +1035,8 @@ Public Class Part
End Get
Set(value As String)
m_Posx = value
- NotifyPropertyChanged("Posx")
- NotifyPropertyChanged("ToolTipEvaluatedPosx")
+ NotifyPropertyChanged(NameOf(Posx))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedPosx))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End Set
End Property
@@ -1061,9 +1060,9 @@ Public Class Part
m_TopArcIsChecked = value
If m_TopAngleIsChecked And m_TopArcIsChecked Then
m_TopAngleIsChecked = Not value
- NotifyPropertyChanged("TopAngleIsChecked")
+ NotifyPropertyChanged(NameOf(TopAngleIsChecked))
End If
- NotifyPropertyChanged("TopArcIsChecked")
+ NotifyPropertyChanged(NameOf(TopArcIsChecked))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
Map.refSceneManagerVM.RefreshBtn()
End Set
@@ -1092,8 +1091,8 @@ Public Class Part
End Get
Set(value As String)
m_Angle = value
- NotifyPropertyChanged("Angle")
- NotifyPropertyChanged("ToolTipEvaluatedAngle")
+ NotifyPropertyChanged(NameOf(Angle))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedAngle))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End Set
End Property
@@ -1115,8 +1114,8 @@ Public Class Part
End Get
Set(value As String)
m_PosxAngle = value
- NotifyPropertyChanged("PosxAngle")
- NotifyPropertyChanged("ToolTipEvaluatedPosxAngle")
+ NotifyPropertyChanged(NameOf(PosxAngle))
+ NotifyPropertyChanged(NameOf(ToolTipEvaluatedPosxAngle))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
End Set
End Property
@@ -1140,9 +1139,9 @@ Public Class Part
m_TopAngleIsChecked = value
If m_TopArcIsChecked And m_TopAngleIsChecked Then
m_TopArcIsChecked = Not value
- NotifyPropertyChanged("TopArcIsChecked")
+ NotifyPropertyChanged(NameOf(TopArcIsChecked))
End If
- NotifyPropertyChanged("TopAngleIsChecked")
+ NotifyPropertyChanged(NameOf(TopAngleIsChecked))
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
Map.refSceneManagerVM.RefreshBtn()
End Set
@@ -1256,7 +1255,11 @@ Public Class Part
For Each Compo In CurrPartDoor.Door.CompoList
Compo.BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
Compo.BackGroundColor = DirectCast(New BrushConverter().ConvertFrom("#FFFFFF"), SolidColorBrush)
- Compo.Foreground = DirectCast(New BrushConverter().ConvertFrom("#000000"), SolidColorBrush)
+ If Not IsNothing(Map.refOptionsVM) AndAlso Map.refOptionsVM.SelectedTheme.Name = "Default" Then
+ Compo.Foreground = DirectCast(New BrushConverter().ConvertFrom("#000000"), SolidColorBrush)
+ Else
+ Compo.Foreground = DirectCast(New BrushConverter().ConvertFrom("#FFFFFF"), SolidColorBrush)
+ End If
Compo.BorderThickness = 1
Compo.FontBold = FontWeights.Normal
Next
@@ -1382,7 +1385,7 @@ Public Class Part
NewCompo.BorderThickness = 2
NewCompo.FontBold = FontWeights.Bold
m_SelCompo = NewCompo
- NotifyPropertyChanged("SelCompo")
+ NotifyPropertyChanged(NameOf(SelCompo))
End If
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
Return NewCompo
@@ -1601,7 +1604,7 @@ Public Class Part
For ParamIndex = 0 To m_CompoList(CompoIndex).CompoParamList.Count - 1
If TypeOf m_CompoList(CompoIndex).CompoParamList(ParamIndex) Is TextBoxParam Then
Dim TextBoxParam As TextBoxParam = DirectCast(m_CompoList(CompoIndex).CompoParamList(ParamIndex), TextBoxParam)
- TextBoxParam.NotifyPropertyChanged("ToolTipValue")
+ TextBoxParam.NotifyPropertyChanged(NameOf(TextBoxParam.ToolTipValue))
End If
Next
Next
diff --git a/DoorParameters/PartPageV.xaml b/DoorParameters/PartPageV.xaml
index 84a0a44..b3b74fe 100644
--- a/DoorParameters/PartPageV.xaml
+++ b/DoorParameters/PartPageV.xaml
@@ -221,7 +221,7 @@
+ Style="{DynamicResource GeneralCheckBox}"/>
+ Style="{DynamicResource GeneralCheckBox}"/>
+ Style="{DynamicResource GeneralCheckBox}"/>
+
@@ -727,14 +728,16 @@
-
+
-