diff --git a/Assembly/Assembly.vb b/Assembly/Assembly.vb
index aa63fa5..2982d4f 100644
--- a/Assembly/Assembly.vb
+++ b/Assembly/Assembly.vb
@@ -64,6 +64,7 @@ Public Class Assembly
End Sub
#End Region ' Light Up/Bottom
+#Region "Light Hinge/Lock"
Private m_LightHinge As String
Public Property LightHinge As String
Get
@@ -99,6 +100,7 @@ Public Class Assembly
m_LightLock = sLightLock
NotifyPropertyChanged("LightLock")
End Sub
+#End Region ' Light Hinge/Lock
Private m_ThicknessHead As String
Public Property ThicknessHead As String
@@ -120,6 +122,7 @@ Public Class Assembly
NotifyPropertyChanged("ThicknessHead")
End Sub
+#Region "Overlap Hinge/Lock/Top/DeltaT"
Private m_OverlapHinge As String
Public Property OverlapHinge As String
Get
@@ -202,6 +205,7 @@ Public Class Assembly
m_DeltaThickness = sDeltaThickness
NotifyPropertyChanged("DeltaThickness")
End Sub
+#End Region ' Overlap Hinge/Lock/Top/DeltaT
Private m_Exterior As Boolean
Public Property Exterior As Boolean
@@ -239,8 +243,10 @@ Public Class Assembly
End Property
Public Sub SetExterior(bExterior As Boolean)
m_Exterior = bExterior
+ NotifyPropertyChanged("Exterior")
End Sub
+#Region "Jamb Thckness/Width"
Private m_Thickness As String
Public Property Thickness As String
Get
@@ -275,6 +281,8 @@ Public Class Assembly
m_Width = sWidth
NotifyPropertyChanged("Width")
End Sub
+#End Region ' Jamb Thickness/Width
+
'---------------------------------------------------------------------------------------------------------------------------------------------
#Region "EdgeType"
@@ -756,7 +764,6 @@ Public Class Assembly
If IsNothing(ReadAssembly.m_Exterior) Or Not ReadAssembly.m_Exterior Then
ReadAssembly.m_Exterior = False
ReadAssembly.m_OverlapTop = OptionModule.m_OverlapTop
- ReadAssembly.m_DeltaThickness = OptionModule.m_DeltaThickness
End If
End If
End If
@@ -772,6 +779,7 @@ Public Class Assembly
End If
End Sub
+ ' funzione per la ricerca dei valori, restituice la riga successiva
Private Function GetValue(Index As Integer, Name As String, ByRef Var As String) As Integer
If Index = -1 Then
Return Index
@@ -790,8 +798,7 @@ Public Class Assembly
End If
End If
End Function
-
-
+ ' funzione per la ricerca dei profili, restituisce la riga successiva
Private Function GetValueProfiles(Index As Integer, Name As String, ByRef Var As EdgeType, ByRef VarMachining As Boolean, ByVal VarOverMaterial As String) As Integer
' Creo una stringa per scrivere gli errori
Dim bError As Boolean = False
@@ -900,6 +907,8 @@ Public Class Assembly
Index = GetValue(Index, "hinge", m_OverlapHinge)
If Index = -1 Then Return -1
Index = GetValue(Index, "lock", m_OverlapLock)
+ If Index = -1 Then Return -1
+ Index = GetValue(Index, "deltaT", m_DeltaThickness)
Return Index
End Function
@@ -921,8 +930,8 @@ Public Class Assembly
m_Exterior = True
If Index = -1 Then Return -1
Index = GetValue(Index, "top", m_OverlapTop)
- If Index = -1 Then Return -1
- Index = GetValue(Index, "deltaT", m_DeltaThickness)
+ 'If Index = -1 Then Return -1
+ 'Index = GetValue(Index, "deltaT", m_DeltaThickness)
Return Index
End Function
@@ -944,13 +953,15 @@ Public Class Assembly
DoorPiece = DoorPiece.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
Local_Door.IsNotAssembly = True
Local_Door.IsActive = True
Local_PartDoor.Door = Local_Door
- Local_PartDoor.Door.SwingTypeList = m_SwingTypeListSinlgeDoor
+ Local_PartDoor.Door.SwingTypeList = OptionModule.m_SwingTypeList
Local_PartDoor.SetIsChecked(Local_Door.IsActive)
SetArrayPartDoor(Local_PartDoor, 0)
DdfFile.WriteDDFPart(GetArrayPartDoor(0).Door, IniFile.m_sTempDir & "\" & TEMP_FILE, True, False)
@@ -960,7 +971,6 @@ Public Class Assembly
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage
Exit While
End If
-
Select Case DoorPiece
Case "DO_1"
Local_PartDoor.Door = Local_Door
@@ -1014,6 +1024,7 @@ Public Class Assembly
Return 1
End Function
+#Region "Associazione delle compo lette da ddf"
Public Sub MatchCompo()
For IndexDoor As Integer = 0 To CInt(DoorNumber) - 1
ResearchMatchJamb(GetArrayPartDoor(IndexDoor).Door, Map.refAssemblyPageVM.CurrAssembly.LeftJamb)
@@ -1026,7 +1037,6 @@ Public Class Assembly
ResearchMatchDoor(GetArrayPartDoor(1).Door, GetArrayPartDoor(0).Door)
End If
End Sub
-
Private Sub ResearchMatchJamb(Door As Part, Jamb As Part)
For IndexCompo As Integer = 0 To Door.CompoList.Count - 1
If Not String.IsNullOrEmpty(Door.CompoList(IndexCompo).IdCode) Then
@@ -1073,7 +1083,6 @@ Public Class Assembly
End If
Next
End Sub
-
Private Sub ResearchMatchDoor(DoorActive As Part, DoorInactive As Part)
If Not DoorActive.Swing.Contains("I") Then
For IndexCompo As Integer = 0 To DoorActive.CompoList.Count - 1
@@ -1121,6 +1130,8 @@ Public Class Assembly
End If
End Sub
+#End Region ' Associazione delle compo lette da ddf
+
' Agiorna IsVisible delle porte contenute nell'ArrayPartDoor
Public Sub DoorVisibility()
' aggiorno la visibilità delle porte senza però modificare la dimensione dei Jamb caricati
@@ -1136,6 +1147,9 @@ Public Class Assembly
m_ArrayPartDoor(Index).NotifyPropertyChanged("IsVisible")
End If
Next
+ If Not IsNothing(GetArrayPartDoor(0).Door) Then
+ If GetArrayPartDoor(0).Door.IsNotAssembly = True Then m_DoorNumber = "1"
+ End If
If m_DoorNumber = "1" Then
OneDoorProperty = True
Else
@@ -1145,7 +1159,9 @@ Public Class Assembly
End Sub
#End Region ' Lettura Assemblato
+ '---------------------------------------------------------------------------------------------------------------------------------------------
#Region "RULES ASSEMBLY"
+ ' carica la maggior parte dei valori da passare allo script lua.
Public Function LoadModuleParam(CurrCompo As Compo) As Boolean
Dim bExterior As Boolean = Exterior
Dim dThicknessDoor As Double
@@ -1232,6 +1248,10 @@ Public Class Assembly
UpDateCurrCompoJamb(GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo))
Case "Lock"
UpDateCurrCompoJamb(GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo))
+ Case "Top"
+ UpDateCurrCompoJamb(GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo))
+ Case "Bottom"
+ UpDateCurrCompoJamb(GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo))
End Select
End If
@@ -1241,62 +1261,43 @@ Public Class Assembly
End Sub
Public Sub UpDateCurrCompoJamb(ByRef CurrCompo As Compo)
- If Not IsNothing(CurrCompo.refJambCompo) AndAlso CurrCompo.refJambCompo.CompoParamList.Count = CurrCompo.CompoParamList.Count Then
- LoadModuleParam(CurrCompo)
- CurrCompo.refJambCompo.IsReadOnly = False
- '--------------------------------------------------------------------------------------------------------------------------------------------------------------
- ' devo distinguere il caso della componente sulla porta o sul jamb
- For IndexParam As Integer = 0 To CurrCompo.refJambCompo.CompoParamList.Count - 1
- 'ParamFunction.ParamName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName
- If TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is TextBoxParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
- Dim x = EgtLuaSetGlobStringVar("STU.InParamName", DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxParam).DDFName)
- 'If EgtLuaCallFunction("STU.CalcParam") Then
- Dim dInParamValue As Double
- StringToDouble(DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxParam).m_Value, dInParamValue)
- EgtLuaSetGlobNumVar("STU.InParamValue", dInParamValue)
- x = EgtLuaCallFunction("STU.CalcParam")
- Dim sVal As String = String.Empty
- EgtLuaGetGlobStringVar("STU.OutParamValue", sVal)
- DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxParam).SetValue(CStr(sVal))
- EgtLuaGetGlobBoolVar("STU.IsEnable", DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxParam).IsReadOnly)
- 'End If
- ElseIf TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is ComboBoxParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
- DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), ComboBoxParam).IsReadOnly = False
- ElseIf TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is TextBoxOnOffParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
- EgtLuaSetGlobStringVar("STU.InParamName", DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxOnOffParam).DDFName)
- If EgtLuaCallFunction("STU.CalcParam") Then
+ If Not IsNothing(CurrCompo.refJambCompo) Then
+ If LoadModuleParam(CurrCompo) Then
+ CurrCompo.refJambCompo.IsReadOnly = False
+ ' devo distinguere il caso della componente sulla porta o sul jamb
+ For IndexParam As Integer = 0 To CurrCompo.refJambCompo.CompoParamList.Count - 1
+ If TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is TextBoxParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
+ EgtLuaSetGlobStringVar("STU.InParamName", DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxParam).DDFName)
+ Dim dInParamValue As Double
+ StringToDouble(DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxParam).m_Value, dInParamValue)
+ EgtLuaSetGlobNumVar("STU.InParamValue", dInParamValue)
+ EgtLuaCallFunction("STU.CalcParam")
Dim sVal As String = String.Empty
- EgtLuaSetGlobStringVar("STU.InParamValue", DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxOnOffParam).m_Value)
EgtLuaGetGlobStringVar("STU.OutParamValue", sVal)
- DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxOnOffParam).SetValue(CStr(sVal))
- EgtLuaGetGlobBoolVar("STU.IsEnable", DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxOnOffParam).IsReadOnly)
+ DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxParam).SetValue(CStr(sVal))
+ EgtLuaGetGlobBoolVar("STU.IsEnable", DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxParam).IsReadOnly)
+ ElseIf TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is ComboBoxParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
+ DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), ComboBoxParam).IsReadOnly = False
+ ElseIf TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is TextBoxOnOffParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
+ EgtLuaSetGlobStringVar("STU.InParamName", DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxOnOffParam).DDFName)
+ If EgtLuaCallFunction("STU.CalcParam") Then
+ Dim sVal As String = String.Empty
+ EgtLuaSetGlobStringVar("STU.InParamValue", DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxOnOffParam).m_Value)
+ EgtLuaGetGlobStringVar("STU.OutParamValue", sVal)
+ DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxOnOffParam).SetValue(CStr(sVal))
+ EgtLuaGetGlobBoolVar("STU.IsEnable", DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxOnOffParam).IsReadOnly)
+ End If
End If
- End If
- Next
- '--------------------------------------------------------------------------------------------------------------------------------------------------------------
-
+ Next
+ Else
+ MessageBox.Show("Script Lua (" & CurrCompo.CompoType.Path & "\" & "Matching.lua" & ")has not been found", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
+ End If
Else
MessageBox.Show("Error in matching component in jamb, the compo on the jamb will not be modify", "Caution Matching", MessageBoxButton.OK, MessageBoxImage.Warning)
End If
EgtLuaResetGlobVar("STU")
End Sub
- 'Public Sub UpDateCurrCompoDoor(ByRef CurrCompo As Compo)
- ' If Not IsNothing(CurrCompo.refJambCompo) AndAlso CurrCompo.refJambCompo.CompoParamList.Count = CurrCompo.CompoParamList.Count Then
- ' LoadModuleParam(CurrCompo)
- ' For IndexParam As Integer = 0 To CurrCompo.refJambCompo.CompoParamList.Count - 1
- ' ParamFunction.ParamName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName
- ' If TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is TextBoxParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
- ' DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxParam).SetValue(DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxParam).m_Value)
- ' ElseIf TypeOf CurrCompo.refJambCompo.CompoParamList(IndexParam) Is TextBoxOnOffParam AndAlso CurrCompo.CompoParamList(IndexParam).DDFName = CurrCompo.refJambCompo.CompoParamList(IndexParam).DDFName Then
- ' DirectCast(CurrCompo.refJambCompo.CompoParamList(IndexParam), TextBoxOnOffParam).SetValue(DirectCast(CurrCompo.CompoParamList(IndexParam), TextBoxOnOffParam).m_Value)
- ' End If
- ' Next
- ' Else
- ' MessageBox.Show("Error in matching component in jamb, the compo on the jamb will not be modify", "Caution Matching", MessageBoxButton.OK, MessageBoxImage.Warning)
- ' End If
- 'End Sub
-
' calcola la giusta lista di swing per ogni porta e ricalcolo la dimensione dei Jamb Top e Bottom (width)
Public Sub DoorVisibilityNew()
' definisco gli swing riferiti ai Jamb e quindi anche i nomi da associare alle porte durante la creazione di una nuova porta
@@ -1305,6 +1306,7 @@ Public Class Assembly
Select Case DoorNumber
Case "1" ' passaggio da due porte ad una porta
OneDoorProperty = True
+ NotifyPropertyChanged("OneDoorProperty")
' inverto la posizioned delle porte
If GetArrayPartDoor(0).Door.Swing.Contains("I") Then
AppPartDoor = GetArrayPartDoor(1)
@@ -1332,30 +1334,44 @@ Public Class Assembly
End If
'--------------------------------------------------------------------------------------------------------------------------------------------------------------
' Elimino tutti le componenti sul Jamb (che ora diventa di Tipo L) eliminando dalla porta due
+ Map.refPartPageVM.CurrPart = GetArrayPartDoor(1).Door
For IndexDeleteCompo As Integer = GetArrayPartDoor(1).Door.CompoList.Count - 1 To 0 Step -1
- GetArrayPartDoor(1).Door.CompoList(IndexDeleteCompo).Delete()
+ Map.refPartPageVM.CurrPart.CompoList(IndexDeleteCompo).Delete()
Next
' ricarico tutti i riferimenti della porta vecchia sul jamb
- For IndexDeleteCompo As Integer = 0 To GetArrayPartDoor(0).Door.CompoList.Count - 1
- If Not IsNothing(GetArrayPartDoor(0).Door.CompoList(IndexDeleteCompo).refJambCompo) Then
-
- End If
- Next
+ Map.refPartPageVM.CurrPart = GetArrayPartDoor(0).Door
+ SetTopWidth()
+ ReplaceHardware()
'--------------------------------------------------------------------------------------------------------------------------------------------------------------
' riassegno gli swing ai Jamb
LeftJamb.SetSwing(GetArrayPartDoor(0).Door.Swing)
TopJamb.SetSwing(GetArrayPartDoor(0).Door.Swing)
RightJamb.SetSwing(GetArrayPartDoor(0).Door.Swing)
BottomJamb.SetSwing(GetArrayPartDoor(0).Door.Swing)
- If LeftJamb.Swing.Contains("L") Then
- LeftJamb.TypePart = "FL_H"
- RightJamb.TypePart = "FR_L"
+ If Not Exterior Then
+ If LeftJamb.Swing.Contains("L") Then
+ LeftJamb.TypePart = "FL_H"
+ RightJamb.TypePart = "FR_L"
+ Else
+ LeftJamb.TypePart = "FL_L"
+ RightJamb.TypePart = "FR_H"
+ End If
+ BottomJamb.TypePart = "FB_B"
+ TopJamb.TypePart = "FT_T"
Else
- LeftJamb.TypePart = "FL_L"
- RightJamb.TypePart = "FR_H"
+ If LeftJamb.Swing.Contains("L") Then
+ LeftJamb.TypePart = "FL_HE"
+ RightJamb.TypePart = "FR_LE"
+ Else
+ LeftJamb.TypePart = "FL_LE"
+ RightJamb.TypePart = "FR_HE"
+ End If
+ BottomJamb.TypePart = "FB_BE"
+ TopJamb.TypePart = "FT_TE"
End If
- BottomJamb.TypePart = "FB_B"
- TopJamb.TypePart = "FT_T"
+ TopRabbetJamb()
+ BottomRabbetJamb()
+ HingeRabbetJamb()
NotifyPropertyChanged("CurrAssembly")
Case "2" ' passaggio da una porta a due porte
OneDoorProperty = False
@@ -1440,11 +1456,9 @@ Public Class Assembly
RightJamb.TypePart = "FR_H"
BottomJamb.TypePart = "FB_B"
TopJamb.TypePart = "FT_T"
+ ReplaceHardware()
NotifyPropertyChanged("CurrAssembly")
End Select
- ' azzero le dimensioni appena create della porta
- m_BottomJamb.SetWidth("0")
- m_TopJamb.SetWidth("0")
For Index As Integer = 0 To CInt(m_DoorNumber) - 1
If Not IsNothing(m_ArrayPartDoor(Index)) Then
m_ArrayPartDoor(Index).IsVisible = Visibility.Visible
@@ -1888,11 +1902,12 @@ Public Class Assembly
End If
End Sub
- ' ricalcola la posizione di tutti gli hardware
+ ' ricalcola la posizione di tutti gli hardware se esiste un riferimento
Public Sub ReplaceHardware()
For IndexDoor As Integer = 0 To CInt(DoorNumber) - 1
For IndexCompo As Integer = 0 To Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList.Count - 1
If Not IsNothing(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).refJambCompo) Then
+ Dim x As String = Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).refJambCompo.TemplateSelItem
For IndexParam As Integer = 0 To Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList.Count - 1
If TypeOf Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList(IndexParam) Is TextBoxParam Then
DirectCast(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList(IndexParam), TextBoxParam).Value = DirectCast(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList(IndexParam), TextBoxParam).Value
@@ -1903,6 +1918,21 @@ Public Class Assembly
Next
End Sub
+ 'Public Sub AddHardware()
+ ' For IndexDoor As Integer = 0 To CInt(DoorNumber) - 1
+ ' For IndexCompo As Integer = 0 To Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList.Count - 1
+ ' If Not IsNothing(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).refJambCompo) Then
+ ' 'If Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).refJambCompo.Si Then
+ ' Dim x As String = Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).refJambCompo.TemplateSelItem
+ ' For IndexParam As Integer = 0 To Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList.Count - 1
+ ' If TypeOf Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList(IndexParam) Is TextBoxParam Then
+ ' DirectCast(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList(IndexParam), TextBoxParam).Value = DirectCast(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(IndexDoor).Door.CompoList(IndexCompo).CompoParamList(IndexParam), TextBoxParam).Value
+ ' End If
+ ' Next
+ ' End If
+ ' Next
+ ' Next
+ 'End Sub
#End Region ' Rules Assembly
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
diff --git a/Assembly/AssemblyPageV.xaml b/Assembly/AssemblyPageV.xaml
index eff1ea6..38a0588 100644
--- a/Assembly/AssemblyPageV.xaml
+++ b/Assembly/AssemblyPageV.xaml
@@ -20,6 +20,11 @@
+
+
+
+
+
@@ -28,7 +33,7 @@
-
+
@@ -134,7 +139,7 @@
-
+
@@ -243,7 +248,7 @@
-
+
-
+
-
-
-
-
+
+
+
+
-
+
diff --git a/Assembly/AssemblyPageVM.vb b/Assembly/AssemblyPageVM.vb
index 6b921c1..a6f7e9d 100644
--- a/Assembly/AssemblyPageVM.vb
+++ b/Assembly/AssemblyPageVM.vb
@@ -20,6 +20,7 @@ Public Class AssemblyPageVM
' Definizione comando
Private m_CmdJambBtn As ICommand
Private m_EnterRefreshCmd As ICommand
+ Private m_CmdOrderBtn As ICommand
Sub New()
Map.SetRefJambPageVM(Me)
@@ -108,6 +109,12 @@ Public Class AssemblyPageVM
End Get
End Property
+ Public ReadOnly Property OrderMsg As String
+ Get
+ Return "Order"
+ End Get
+ End Property
+
Public ReadOnly Property LockedgeMsg As String
Get
Return EgtMsg(50005)
@@ -236,6 +243,18 @@ Public Class AssemblyPageVM
Map.refSceneManagerVM.RefreshBtn()
End Sub
+ Public ReadOnly Property OrderCmd As ICommand
+ Get
+ If m_CmdOrderBtn Is Nothing Then
+ m_CmdOrderBtn = New Command(AddressOf ShowOrder)
+ End If
+ Return m_CmdOrderBtn
+ End Get
+ End Property
+
+ Public Sub ShowOrder()
+ Map.refAssemblyManagerVM.OpenSelectedAssembly(Map.refAssemblyManagerVM.SelectedAssembly)
+ End Sub
#End Region ' Comand
#Region "METHODS"
diff --git a/DdfFile.vb b/DdfFile.vb
index e22a2fb..8267a24 100644
--- a/DdfFile.vb
+++ b/DdfFile.vb
@@ -232,24 +232,24 @@ Friend Module DdfFile
Dim y As String = PositionJamb_Y(Part)
Dim z As String = PositionJamb_Z(Part)
DdfFileContent.Add("position: ")
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "x: -" & x)
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "y: -" & y)
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: -" & z)
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "x: " & x)
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "y: " & y)
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: " & z)
ElseIf Part.TypePart.Contains("FR_") Then
DdfFileContent.Add("position: ")
DdfFileContent.Add(ConstCompo.K_SPACE3 & "x: " & PositionJamb_X(Part))
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "y: -" & PositionJamb_Y(Part))
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: -" & PositionJamb_Z(Part))
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "y: " & PositionJamb_Y(Part))
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: " & PositionJamb_Z(Part))
ElseIf Part.TypePart.Contains("FT_") Then
DdfFileContent.Add("position: ")
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "x: -" & PositionJamb_X(Part))
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "x: " & PositionJamb_X(Part))
DdfFileContent.Add(ConstCompo.K_SPACE3 & "y: " & PositionJamb_Y(Part))
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: -" & PositionJamb_Z(Part))
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: " & PositionJamb_Z(Part))
ElseIf Part.TypePart.Contains("FB_") Then
DdfFileContent.Add("position: ")
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "x: -" & PositionJamb_X(Part))
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "y: -" & PositionJamb_Y(Part))
- DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: -" & PositionJamb_Z(Part))
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "x: " & PositionJamb_X(Part))
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "y: " & PositionJamb_Y(Part))
+ DdfFileContent.Add(ConstCompo.K_SPACE3 & "z: " & PositionJamb_Z(Part))
End If
DdfFileContent.Add("")
End If
@@ -351,13 +351,13 @@ Friend Module DdfFile
If CurrPart.TypePart.Contains("FT_") Then
y = DoubleToString(dHeightDoor - dOverlapTop + dLightUp, 4)
Else
- y = DoubleToString(dLightBottom + dThicknessJamb, 4)
+ y = DoubleToString(-dLightBottom - dThicknessJamb, 4)
End If
Else
If CurrPart.TypePart.Contains("FT_") Then
y = DoubleToString(dHeightDoor + dLightUp, 4)
Else
- y = DoubleToString(dLightBottom, 4)
+ y = DoubleToString(-dLightBottom, 4)
End If
End If
Return y
@@ -382,9 +382,9 @@ Friend Module DdfFile
If CurrPart.TypePart.Contains("E") Then
' posizione del Jamb sinistro
If CurrPart.TypePart.Contains("FL_L") Then
- x = DoubleToString(dThicknessJamb - dOverlapLock + dLightLock, 4)
+ x = DoubleToString(-dThicknessJamb + dOverlapLock - dLightLock, 4)
ElseIf CurrPart.TypePart.Contains("FL_H") Then
- x = DoubleToString(dThicknessJamb - dOverlapHinge + dLightHinge, 4)
+ x = DoubleToString(-dThicknessJamb + dOverlapHinge - dLightHinge, 4)
End If
' posiziono il jamb destro
If CurrPart.TypePart.Contains("FR_") Then
@@ -401,25 +401,25 @@ Friend Module DdfFile
' posiziono il jamb sopra
If CurrPart.TypePart.Contains("FT_") Then
If CurrPart.Swing.Contains("L") Then
- x = DoubleToString(dLightHinge, 4)
+ x = DoubleToString(-dLightHinge, 4)
Else
- x = DoubleToString(dLightLock, 4)
+ x = DoubleToString(-dLightLock, 4)
End If
End If
' posiziono il jamb sotto
If CurrPart.TypePart.Contains("FB_") Then
If CurrPart.Swing.Contains("L") Then
- x = DoubleToString(dLightHinge, 4)
+ x = DoubleToString(-dLightHinge, 4)
Else
- x = DoubleToString(dLightLock, 4)
+ x = DoubleToString(-dLightLock, 4)
End If
End If
Else
' posizione del Jamb sinistro
If CurrPart.TypePart.Contains("FL_L") Then
- x = DoubleToString(dThicknessJamb + dLightLock, 4)
+ x = DoubleToString(-dThicknessJamb - dLightLock, 4)
ElseIf CurrPart.TypePart.Contains("FL_H") Then
- x = DoubleToString(dThicknessJamb + dLightHinge, 4)
+ x = DoubleToString(-dThicknessJamb - dLightHinge, 4)
End If
' posiziono il jamb destro
If CurrPart.TypePart.Contains("FR_") Then
@@ -436,9 +436,9 @@ Friend Module DdfFile
' posiziono il jamb sopra
If CurrPart.TypePart.Contains("FT_") Then
If CurrPart.Swing.Contains("L") Then
- x = DoubleToString(dOverlapHinge + dLightHinge, 4)
+ x = DoubleToString(-dOverlapHinge - dLightHinge, 4)
Else
- x = DoubleToString(dOverlapLock + dLightLock, 4)
+ x = DoubleToString(-dOverlapLock - dLightLock, 4)
End If
End If
End If
@@ -454,9 +454,9 @@ Friend Module DdfFile
Dim dThicknessJamb As Double
StringToDouble(Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door.Thickness, dThicknessDoor)
StringToDouble(Map.refAssemblyPageVM.CurrAssembly.Thickness, dThicknessJamb)
- z = DoubleToString(dThicknessJamb - dThicknessDoor - dDeltaThickness, 4)
+ z = DoubleToString(-dThicknessJamb + dThicknessDoor + dDeltaThickness, 4)
Else
- z = DoubleToString(dDeltaThickness, 4)
+ z = DoubleToString(-dDeltaThickness, 4)
End If
Return z
End Function
@@ -718,21 +718,21 @@ Friend Module DdfFile
MessageBox.Show(EgtMsg(50106) & "Overlap Lock", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
+ If StringToDouble(CurrAssembly.DeltaThickness, dVal) Then
+ GeneralAssembly.Add(ConstCompo.K_SPACE3 & "deltaT : " & DoubleToString(dVal, 5))
+ Else
+ MessageBox.Show(EgtMsg(50106) & "Delta Thickness", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
+ Return
+ End If
' i parametri associatia alla condizione di Exterior sono stampati solo se Exterior è true
If CurrAssembly.Exterior Then
- GeneralAssembly.Add(ConstCompo.K_SPACE3 & "Exterior :")
+ GeneralAssembly.Add(" " & "Exterior :")
If StringToDouble(CurrAssembly.OverlapTop, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "top : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "Overlap Top", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
- If StringToDouble(CurrAssembly.DeltaThickness, dVal) Then
- GeneralAssembly.Add(ConstCompo.K_SPACE3 & "deltaT : " & DoubleToString(dVal, 5))
- Else
- MessageBox.Show(EgtMsg(50106) & "Delta Thickness", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
- Return
- End If
End If
GeneralAssembly.Add("")
GeneralAssembly.Add(" " & ConstCompo.K_PROFILES & ":")
diff --git a/DoorManager/AssemblyManagerVM.vb b/DoorManager/AssemblyManagerVM.vb
index 0238b4e..d81af10 100644
--- a/DoorManager/AssemblyManagerVM.vb
+++ b/DoorManager/AssemblyManagerVM.vb
@@ -135,15 +135,14 @@ Public Class AssemblyManagerVM
End If
End Function
' Apre il File in selzionato o crea un nuovo oggetto
-
+ Friend bSaveCurrent As Boolean = True
Public Function OpenSelectedAssembly(value As AssemblyName) As Boolean
- Dim bSaveCurrent As Boolean = True
+ 'Dim bSaveCurrent As Boolean = True
If Not IsNothing(SelectedAssembly) Then
If Not IsNothing(m_SelectedAssembly.Name) AndAlso m_SelectedAssembly.Name = value.Name Then
Dim OredrWindow As New OrderV(Application.Current.MainWindow, Map.refOrderVM)
- 'OredrWindow.Show()
+ bSaveCurrent = False
OredrWindow.ShowDialog()
- bSaveCurrent = Map.refOrderVM.ModifyConfiguration
Else
bSaveCurrent = SaveCurrentAssembly()
SelectedAssembly = value
@@ -157,6 +156,10 @@ 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
+ If IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
+ Return False
+ End If
DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, True)
'Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage
NotifyPropertyChanged("SelectedAssembly")
@@ -174,7 +177,7 @@ Public Class AssemblyManagerVM
Map.refAssemblyPageVM.CurrAssembly = CreateNewAssembly(m_SelectedAssembly.Name)
DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, IniFile.m_sTempDir & "\" & TEMP_ASSEMBLY, True)
- If Map.refOrderVM.Configuration = "Door" Then
+ If OptionModule.m_ConfigurationSoftware = "Door" Then
Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door.IsNotAssembly = True
End If
If Not Map.refAssemblyPageVM.CurrAssembly.GetArrayPartDoor(0).Door.IsNotAssembly Then
diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb
index 53dd050..4733e79 100644
--- a/DoorParameters/Part.vb
+++ b/DoorParameters/Part.vb
@@ -671,6 +671,14 @@ Public Class Part
NewCompo.refJambCompo.SetTemplateSelItem(FrameCompoFile)
NewCompo.refJambCompo.IsReadOnly = True
End If
+ Case "Top"
+ NewCompo.refJambCompo = CurrAssembly.TopJamb.AddRefCompo(CompoTypeJamb)
+ NewCompo.refJambCompo.SetTemplateSelItem(FrameCompoFile)
+ NewCompo.refJambCompo.IsReadOnly = True
+ Case "Bottom"
+ NewCompo.refJambCompo = CurrAssembly.BottomJamb.AddRefCompo(CompoTypeJamb)
+ NewCompo.refJambCompo.SetTemplateSelItem(FrameCompoFile)
+ NewCompo.refJambCompo.IsReadOnly = True
End Select
Case "2"
Select Case CurrCompoType.JambSide
@@ -703,14 +711,6 @@ Public Class Part
NewCompo.refJambCompo = CurrAssembly.BottomJamb.AddRefCompo(CompoTypeJamb)
NewCompo.refJambCompo.SetTemplateSelItem(FrameCompoFile)
NewCompo.refJambCompo.IsReadOnly = True
- Case "Top"
- NewCompo.refJambCompo = CurrAssembly.TopJamb.AddRefCompo(CompoTypeJamb)
- NewCompo.refJambCompo.SetTemplateSelItem(FrameCompoFile)
- NewCompo.refJambCompo.IsReadOnly = True
- Case "Bottom"
- NewCompo.refJambCompo = CurrAssembly.BottomJamb.AddRefCompo(CompoTypeJamb)
- NewCompo.refJambCompo.SetTemplateSelItem(FrameCompoFile)
- NewCompo.refJambCompo.IsReadOnly = True
End Select
End Select
End If
diff --git a/DoorParameters/PartPageV.xaml b/DoorParameters/PartPageV.xaml
index 8845f7e..9e009ba 100644
--- a/DoorParameters/PartPageV.xaml
+++ b/DoorParameters/PartPageV.xaml
@@ -30,9 +30,22 @@
-
+ Converter={StaticResource DoorVisibilityConverter}}">-->
+
+
+
+
+
+
+
@@ -48,7 +61,8 @@
-
+
+
@@ -197,12 +211,16 @@
Text="{Binding CurrPart.BottomOverMaterial, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding IsChecked, ElementName=Bottom}"
Margin="10,2,40,4" IsReadOnly="{Binding IsRaedOnly}"/>
-
-
+
+
-
+
diff --git a/DoorParameters/PartPageVM.vb b/DoorParameters/PartPageVM.vb
index 879c936..97b1d43 100644
--- a/DoorParameters/PartPageVM.vb
+++ b/DoorParameters/PartPageVM.vb
@@ -21,6 +21,21 @@ Public Class PartPageVM
End Set
End Property
+ Private m_OredrButtonVisibility As Visibility = Visibility.Visible
+ Public ReadOnly Property OrderButtonVisibility As Visibility
+ Get
+ SetOrderButtonVisibility()
+ Return m_OredrButtonVisibility
+ End Get
+ End Property
+ Public Sub SetOrderButtonVisibility()
+ If OptionModule.m_ConfigurationSoftware = "Door" Then
+ m_OredrButtonVisibility = Visibility.Visible
+ Else
+ m_OredrButtonVisibility = Visibility.Collapsed
+ End If
+ End Sub
+
Sub New()
Map.SetRefDoorParametersVM(Me)
Part.m_rfModifyTitle = AddressOf Map.refMainWindowVM.ModifyTitle
@@ -118,9 +133,16 @@ Public Class PartPageVM
End Set
End Property
+ Public ReadOnly Property OrderMsg As String
+ Get
+ Return "Order"
+ End Get
+ End Property
+
' definizione comando
Private m_EnterRefreshCmd As ICommand
Private m_F1GuideCmd As ICommand
+ Private m_cmdOrderBtn As ICommand
#Region "COMMANDS"
@@ -158,6 +180,15 @@ Public Class PartPageVM
Map.refProjectManagerVM.Guide()
End Sub
+ Public ReadOnly Property OrderCmd As ICommand
+ Get
+ If m_cmdOrderBtn Is Nothing Then
+ m_cmdOrderBtn = New Command(AddressOf Map.refAssemblyPageVM.ShowOrder)
+ End If
+ Return m_cmdOrderBtn
+ End Get
+ End Property
+
#End Region ' Command
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index b8c8e26..f7ecf2c 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 3e56f18..1867f02 100644
--- a/OptionsWindow/OptionModule.vb
+++ b/OptionsWindow/OptionModule.vb
@@ -269,7 +269,7 @@ Friend Module OptionModule
'-----------------------------------------------------------------------------------------------------------------
'i valori della pagina dell'assemblato
Dim Config As String = String.Empty
- DefaultGetPrivateProfileString(K_CONFIGURATION, S_RUNAS, "Door", Config)
+ GetPrivateProfileString(K_CONFIGURATION, S_RUNAS, "Assembly", Config)
m_ConfigurationSoftware = Config
Dim ThicknessJamb As String = String.Empty
DefaultGetPrivateProfileString(S_SIZEJAMB, K_THICKNESS, "25", ThicknessJamb)
diff --git a/Order/OrderV.xaml b/Order/OrderV.xaml
index aa048dd..44f402e 100644
--- a/Order/OrderV.xaml
+++ b/Order/OrderV.xaml
@@ -22,7 +22,7 @@
-
+
-
-
+
+
diff --git a/Order/OrderVM.vb b/Order/OrderVM.vb
index 6d37400..e361750 100644
--- a/Order/OrderVM.vb
+++ b/Order/OrderVM.vb
@@ -1,5 +1,7 @@
-Public Class OrderVM
+Imports System.ComponentModel
+Public Class OrderVM
+ Implements INotifyPropertyChanged
#Region "Messages"
Public ReadOnly Property Title As String
@@ -55,7 +57,7 @@
End Get
Set(value As String)
m_Customer = value
- Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
+ 'Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
End Set
End Property
@@ -66,7 +68,7 @@
End Get
Set(value As String)
m_Elevation = value
- Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
+ 'Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
End Set
End Property
@@ -77,7 +79,7 @@
End Get
Set(value As String)
m_Project = value
- Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
+ 'Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
End Set
End Property
@@ -88,7 +90,7 @@
End Get
Set(value As String)
m_PO = value
- Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
+ 'Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
End Set
End Property
@@ -99,31 +101,37 @@
End Get
Set(value As String)
m_Line = value
- Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
+ 'Map.refAssemblyManagerVM.SelectedAssembly.IsModify = True
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
+ '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
- ModifyConfiguration = True
- End Set
- 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
@@ -151,10 +159,20 @@
For Each Window In Application.Current.Windows
If TypeOf Window Is OrderV Then
Dim OptionsWindow As OrderV = DirectCast(Window, OrderV)
- ' se eseguo una modifica prima di avere una porta...controllo bene!!
+ ' so se chiudo la pagina dal pulsanye salva allora stampo il file corrente
+ If Not IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
+ DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, Map.refAssemblyManagerVM.SelectedAssembly.Name, True)
+ End If
OptionsWindow.Close()
+ Map.refAssemblyManagerVM.bSaveCurrent = True
End If
Next
End Sub
+ Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
+
+ Public Sub NotifyPropertyChanged(propName As String)
+ RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
+ End Sub
+
End Class
diff --git a/SceneManager/Refresh/RefreshPanelV.xaml b/SceneManager/Refresh/RefreshPanelV.xaml
index 9b002c4..2fe2b06 100644
--- a/SceneManager/Refresh/RefreshPanelV.xaml
+++ b/SceneManager/Refresh/RefreshPanelV.xaml
@@ -10,12 +10,15 @@
-
-
+
diff --git a/SceneManager/Refresh/RefreshPanelVM.vb b/SceneManager/Refresh/RefreshPanelVM.vb
index c57ab9e..f021e6e 100644
--- a/SceneManager/Refresh/RefreshPanelVM.vb
+++ b/SceneManager/Refresh/RefreshPanelVM.vb
@@ -33,9 +33,12 @@ Public Class RefreshPanelVM
Return m_AssemblyIsChecked
End Get
Set(value As Boolean)
- m_AssemblyIsChecked = value
- m_AssemblyExploseIsChecked = False
- NotifyPropertyChanged("AssemblyExploseIsChecked")
+ If Not SceneManagerVM.nComposeAssembly = 1 Then
+ m_AssemblyIsChecked = value
+ m_AssemblyExploseIsChecked = False
+ m_AssemblyDispositionIsChecked = False
+ NotifyPropertyChanged("AssemblyExploseIsChecked")
+ End If
End Set
End Property
@@ -45,9 +48,27 @@ Public Class RefreshPanelVM
Return m_AssemblyExploseIsChecked
End Get
Set(value As Boolean)
- m_AssemblyExploseIsChecked = value
- m_AssemblyIsChecked = False
- NotifyPropertyChanged("AssemblyIsChecked")
+ If Not SceneManagerVM.nComposeAssembly = 2 Then
+ m_AssemblyExploseIsChecked = value
+ m_AssemblyIsChecked = False
+ m_AssemblyDispositionIsChecked = False
+ NotifyPropertyChanged("AssemblyIsChecked")
+ End If
+ End Set
+ End Property
+
+ Private m_AssemblyDispositionIsChecked As Boolean
+ Public Property AssemblyDispositionIsChecked As Boolean
+ Get
+ Return m_AssemblyDispositionIsChecked
+ End Get
+ Set(value As Boolean)
+ If Not SceneManagerVM.nComposeAssembly = 0 Then
+ m_AssemblyDispositionIsChecked = value
+ m_AssemblyIsChecked = False
+ m_AssemblyExploseIsChecked = False
+ NotifyPropertyChanged("AssemblyIsChecked")
+ End If
End Set
End Property
@@ -58,6 +79,24 @@ Public Class RefreshPanelVM
End Get
End Property
+ Public ReadOnly Property AssemblyMsg As String
+ Get
+ Return "Assembly"
+ End Get
+ End Property
+
+ Public ReadOnly Property ExploseMsg As String
+ Get
+ Return "Explose"
+ End Get
+ End Property
+
+ Public ReadOnly Property DisposeMsg As String
+ Get
+ Return "Dispose"
+ End Get
+ End Property
+
#End Region
#Region "ToolTip"
@@ -71,7 +110,7 @@ Public Class RefreshPanelVM
Private m_CmdRefreshBtn As ICommand
Private m_CmdAssemblyBtn As ICommand
Private m_CmdAssemblyExploseBtn As ICommand
- Private m_CmdNotAssemblyBtn As ICommand
+ Private m_CmdAssemblyDispositionBtn As ICommand
Private m_CmdShowErrorBtn As ICommand
Sub New()
@@ -123,6 +162,16 @@ Public Class RefreshPanelVM
End Get
End Property
+ Public ReadOnly Property AssemblyDispositionBtnCommand As ICommand
+ Get
+ If m_CmdAssemblyDispositionBtn Is Nothing Then
+ ' Richiamo il comando che già esiste
+ m_CmdAssemblyDispositionBtn = New Command(AddressOf Map.refSceneManagerVM.NotAssemblyBtn)
+ End If
+ Return m_CmdAssemblyDispositionBtn
+ End Get
+ End Property
+
#End Region ' AssemblyBtnCommand
Friend m_MsgGraphic As String
diff --git a/SceneManager/SceneManagerVM.vb b/SceneManager/SceneManagerVM.vb
index f952bed..96943b2 100644
--- a/SceneManager/SceneManagerVM.vb
+++ b/SceneManager/SceneManagerVM.vb
@@ -258,23 +258,16 @@ Public Class SceneManagerVM
#Region "AssemblyBtnCommand"
Public Sub AssemblyBtn()
- If nComposeAssembly = 1 Then
- NotAssemblyBtn()
- Else
- nComposeAssembly = 1
- End If
+ nComposeAssembly = 1
RefreshBtn()
End Sub
Public Sub AssemblyExlposeBtn()
- If nComposeAssembly = 2 Then
- NotAssemblyBtn()
- Else
- nComposeAssembly = 2
- End If
+ nComposeAssembly = 2
RefreshBtn()
End Sub
Public Sub NotAssemblyBtn()
nComposeAssembly = 0
+ RefreshBtn()
End Sub
#End Region ' AssemblyBtn