EgtDOORCreator 1.8j1 :

- creazione di assemblati
This commit is contained in:
Nicola Pievani
2017-11-21 16:07:47 +00:00
parent 322ecb8682
commit 0bc8e470b9
94 changed files with 7927 additions and 1965 deletions
+444 -87
View File
@@ -2,11 +2,11 @@
Imports System.ComponentModel
Imports EgtUILib
Public Class OptionsViewModel
Public Class OptionsVM
Implements INotifyPropertyChanged
Dim m_rfMainWindowViewModel As MainWindowViewModel
Dim m_rfCurrDoor As Door
Dim m_rfMainWindowVM As MainWindowVM
' serve per definire l'indirizzo per la guida (senza aggiungere l'estenzione!)
Dim m_Chapter As String
@@ -44,7 +44,7 @@ Public Class OptionsViewModel
OptionModule.m_SelectedMeasureUnit = value
' iniziliazzo il valore dell'unità di misura
DdfFile.UnitMeasure = value
If value = OptionModule.m_MeasureUnitList(0) Then
If value = OptionModule.m_MeasureUnitList(0) Then
OptionModule.m_bIsMmUnit = True
ElseIf value = OptionModule.m_MeasureUnitList(1) Then
OptionModule.m_bIsMmUnit = False
@@ -90,7 +90,6 @@ Public Class OptionsViewModel
Else
Return False
End If
'Return OptionModule.m_bBevelUp
End Get
Set(value As Boolean)
' se sto accendendo o spegmemdo un bevel
@@ -107,11 +106,9 @@ Public Class OptionsViewModel
DefaultWritePrivateProfileString(S_EDGE, K_BEVELU_INI, "0")
End If
RefreshEdgeTypeList()
NotifyPropertyChanged("EdgeTypeList")
Else
Return
End If
m_Chapter = "bevel_up"
End Set
End Property
@@ -152,7 +149,6 @@ Public Class OptionsViewModel
Set(value As String)
OptionModule.m_Width = value
DefaultWritePrivateProfileString(S_SIZE, K_WIDTH_INI, OptionModule.m_Width)
m_Chapter = "general"
End Set
End Property
@@ -188,7 +184,7 @@ Public Class OptionsViewModel
Public Shared Property IsCheckedWeight As Boolean
Get
If Door.IsCheckedWeight = Visibility.Visible Then
If Part.IsCheckedWeight = Visibility.Visible Then
Return True
Else
Return False
@@ -196,18 +192,18 @@ Public Class OptionsViewModel
End Get
Set(value As Boolean)
If value Then
Door.IsCheckedWeight = Visibility.Visible
Part.IsCheckedWeight = Visibility.Visible
DefaultWritePrivateProfileString(S_SIZE, K_WEIGHTISCHECKED_INI, "1")
Else
If Door.IsCheckedWeight = Visibility.Visible Then
If Part.IsCheckedWeight = Visibility.Visible Then
If MessageBox.Show(EgtMsg(50153), EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) = MessageBoxResult.Yes Then
Door.IsCheckedWeight = Visibility.Collapsed
Part.IsCheckedWeight = Visibility.Collapsed
DefaultWritePrivateProfileString(S_SIZE, K_WEIGHTISCHECKED_INI, "0")
Else
Return
End If
End If
End If
End If
End Set
End Property
@@ -229,30 +225,10 @@ Public Class OptionsViewModel
Public Shared ReadOnly Property EdgeTypeList As ObservableCollection(Of EdgeType)
Get
Return Door.m_EdgeTypeList
Return Part.m_EdgeTypeList
End Get
End Property
' ''Public Property EdgeTypeList As ObservableCollection(Of String)
' '' Get
' '' Return Door.m_EdgeTypeList
' '' End Get
' '' Set(value As ObservableCollection(Of String))
' '' ' carico la lista degli EdgeType appena aggiornata
' '' Door.m_EdgeTypeList = value
' '' ' aggiorno le lista pressenti nella pagina delle impostazioni
' '' NotifyPropertyChanged("EdgeTypeList")
' '' ' verifico che esista una porta
' '' If Not IsNothing(m_rfCurrDoor) Then
' '' ' Aggiorno le liste degli elementi
' '' m_rfCurrDoor.NotifyPropertyChanged("EdgeTypeList")
' '' 'EdgeDoorControl(m_rfCurrDoor.LockEdgeType)
' '' m_rfCurrDoor.NotifyPropertyChanged("LockEdgeType")
' '' m_rfCurrDoor.NotifyPropertyChanged("HingeEdgeType")
' '' End If
' '' End Set
' ''End Property
Public Property LockEdgeType As EdgeType
Get
If m_LockEdgeType.IsActive = Visibility.Collapsed Then
@@ -417,6 +393,300 @@ Public Class OptionsViewModel
End Set
End Property
'----------------------------------------------------------------------------------------------------------------------------------------------------
Public Property LightUp As String
Get
Return OptionModule.m_LightUp
End Get
Set(value As String)
OptionModule.m_LightUp = value
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTUP, OptionModule.m_LightUp)
End Set
End Property
Public Property LightBottom As String
Get
Return OptionModule.m_LightBottom
End Get
Set(value As String)
OptionModule.m_LightBottom = value
' modifico le dimensioni dei Jambs
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTBOTTOM, OptionModule.m_LightBottom)
End Set
End Property
Public Property LightHinge As String
Get
Return OptionModule.m_LightHinge
End Get
Set(value As String)
OptionModule.m_LightHinge = value
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTHINGE, OptionModule.m_LightHinge)
End Set
End Property
Public Property LightLock As String
Get
Return OptionModule.m_LightLock
End Get
Set(value As String)
OptionModule.m_LightLock = value
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTLOCK, OptionModule.m_LightLock)
End Set
End Property
' spessore del jamb della testa
Public Property ThicknessHead As String
Get
Return OptionModule.m_ThicknessHead
End Get
Set(value As String)
OptionModule.m_ThicknessHead = value
DefaultWritePrivateProfileString(S_OVERLAP, K_THICKNESSHEAD, OptionModule.m_ThicknessHead)
End Set
End Property
Public Property OverlapHinge As String
Get
Return OptionModule.m_OverlapHinge
End Get
Set(value As String)
OptionModule.m_OverlapHinge = value
DefaultWritePrivateProfileString(S_OVERLAP, K_OVERLAPHINGE, OptionModule.m_OverlapHinge)
End Set
End Property
Public Property OverlapLock As String
Get
Return OptionModule.m_OverlapLock
End Get
Set(value As String)
OptionModule.m_OverlapLock = value
DefaultWritePrivateProfileString(S_OVERLAP, K_OVERLAPLOCK, OptionModule.m_OverlapLock)
End Set
End Property
Public Property OverlapTop As String
Get
Return OptionModule.m_OverlapTop
End Get
Set(value As String)
OptionModule.m_OverlapTop = value
DefaultWritePrivateProfileString(S_OVERLAP, K_OVERLAPTOP, OptionModule.m_OverlapTop)
End Set
End Property
Public Property DeltaThickness As String
Get
Return OptionModule.m_DeltaThickness
End Get
Set(value As String)
OptionModule.m_DeltaThickness = value
DefaultWritePrivateProfileString(S_OVERLAP, K_DELTAT, OptionModule.m_DeltaThickness)
End Set
End Property
Public Property Exterior As Boolean
Get
Return OptionModule.m_Exterior
End Get
Set(value As Boolean)
OptionModule.m_Exterior = value
If OptionModule.m_Exterior Then
DefaultWritePrivateProfileString(S_OVERLAP, K_EXTERIOR, "1")
Else
DefaultWritePrivateProfileString(S_OVERLAP, K_EXTERIOR, "0")
End If
End Set
End Property
Public Property ThicknessJamb As String
Get
Return OptionModule.m_ThicknessJamb
End Get
Set(value As String)
OptionModule.m_ThicknessJamb = value
DefaultWritePrivateProfileString(S_SIZEJAMB, K_THICKNESS, OptionModule.m_ThicknessJamb)
End Set
End Property
Public Property WidthJamb As String
Get
Return OptionModule.m_WidthJamb
End Get
Set(value As String)
OptionModule.m_WidthJamb = value
DefaultWritePrivateProfileString(S_SIZEJAMB, K_WIDTH, OptionModule.m_WidthJamb)
End Set
End Property
Public ReadOnly Property DoorListNumber As List(Of String)
Get
Return OptionModule.m_DoorsListNumber
End Get
End Property
Public Property DoorNumber As String
Get
Return OptionModule.m_DoorsNumber
End Get
Set(value As String)
End Set
End Property
Public Property LockEdgeTypeAssembly As EdgeType
Get
If m_LockEdgeTypeAssembly.IsActive = Visibility.Collapsed Then
OptionModule.m_LockEdgeTypeAssembly = EdgeTypeList(0)
End If
Return OptionModule.m_LockEdgeTypeAssembly
End Get
Set(value As EdgeType)
OptionModule.m_LockEdgeTypeAssembly = value
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_LOCKEDGE, OptionModule.m_LockEdgeTypeAssembly.Name)
End Set
End Property
Public Property HingeEdgeTypeAssembly As EdgeType
Get
If m_HingeEdgeTypeAssembly.IsActive = Visibility.Collapsed Then
OptionModule.m_HingeEdgeTypeAssembly = EdgeTypeList(0)
End If
Return OptionModule.m_HingeEdgeTypeAssembly
End Get
Set(value As EdgeType)
OptionModule.m_HingeEdgeTypeAssembly = value
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_HINGEDGE_INI, OptionModule.m_HingeEdgeTypeAssembly.Name)
End Set
End Property
Public Property TopTypeAssembly As EdgeType
Get
If m_TopTypeAssembly.IsActive = Visibility.Collapsed Then
OptionModule.m_TopTypeAssembly = EdgeTypeList(0)
End If
Return OptionModule.m_TopTypeAssembly
End Get
Set(value As EdgeType)
OptionModule.m_TopTypeAssembly = value
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_TOPEDGE_INI, OptionModule.m_TopTypeAssembly.Name)
End Set
End Property
Public Property BottomTypeAssembly As EdgeType
Get
If m_BottomTypeAssembly.IsActive = Visibility.Collapsed Then
OptionModule.m_BottomTypeAssembly = EdgeTypeList(0)
End If
Return OptionModule.m_BottomTypeAssembly
End Get
Set(value As EdgeType)
OptionModule.m_BottomTypeAssembly = value
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_BOTTOMEDGE_INI, OptionModule.m_BottomTypeAssembly.Name)
End Set
End Property
#Region "Machining Assembly"
Public Property LockEdgeMachiningAssembly As Boolean
Get
Return OptionModule.m_LockEdgeMachiningAssembly
End Get
Set(value As Boolean)
OptionModule.m_LockEdgeMachiningAssembly = value
If value Then
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_LOCKEDGEISCHECKED_INI, "1")
Else
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_LOCKEDGEISCHECKED_INI, "0")
End If
End Set
End Property
Public Property LockEdgeOverMaterialAssembly As String
Get
Return OptionModule.m_LockEdgeOverMaterialAssembly
End Get
Set(value As String)
OptionModule.m_LockEdgeOverMaterialAssembly = value
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_LOCKEDGEOVERMATERIAL_INI, OptionModule.m_LockEdgeOverMaterialAssembly)
End Set
End Property
Public Property HingeEdgeMachiningAssembly As Boolean
Get
Return OptionModule.m_HingeEdgeMachiningAssembly
End Get
Set(value As Boolean)
OptionModule.m_HingeEdgeMachiningAssembly = value
If value Then
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_HINGEDGEEISCHECKED_INI, "1")
Else
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_HINGEDGEEISCHECKED_INI, "0")
End If
End Set
End Property
Public Property HingeEdgeOverMaterialAssembly As String
Get
Return OptionModule.m_HingeEdgeOverMaterialAssembly
End Get
Set(value As String)
OptionModule.m_HingeEdgeOverMaterialAssembly = value
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_HINGEDGEOVERMATERIAL_INI, OptionModule.m_HingeEdgeOverMaterialAssembly)
End Set
End Property
Public Property TopMachiningAssembly As Boolean
Get
Return OptionModule.m_TopMachiningAssembly
End Get
Set(value As Boolean)
OptionModule.m_TopMachiningAssembly = value
If value Then
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_TOPISCHECKED_INI, "1")
Else
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_TOPISCHECKED_INI, "0")
End If
End Set
End Property
Public Property TopOverMaterialAssembly As String
Get
Return OptionModule.m_TopOverMaterialAssembly
End Get
Set(value As String)
OptionModule.m_TopOverMaterialAssembly = value
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_TOPOVERMATERIAL_INI, OptionModule.m_TopOverMaterialAssembly)
End Set
End Property
Public Property BottomMachiningAssembly As Boolean
Get
Return OptionModule.m_BottomMachiningAssembly
End Get
Set(value As Boolean)
OptionModule.m_BottomMachiningAssembly = value
If value Then
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_BOTTOMISCHECKED_INI, "1")
Else
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_BOTTOMISCHECKED_INI, "0")
End If
End Set
End Property
Public Property BottomOverMaterialAssembly As String
Get
Return OptionModule.m_BottomOverMaterialAssembly
End Get
Set(value As String)
OptionModule.m_BottomOverMaterialAssembly = value
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_BOTTOMOVERMATERIAL_INI, OptionModule.m_BottomOverMaterialAssembly)
End Set
End Property
#End Region ' Machining Assembly
'-------------------------------------------------------------------------------------------------------------------------------------------------------
' Definizione comandi
Private m_cmdCloseOptions As ICommand
Private m_cmdBrowse As ICommand
@@ -484,6 +754,12 @@ Public Class OptionsViewModel
End Get
End Property
Public ReadOnly Property DoorMsg As String
Get
Return "Door"
End Get
End Property
Public ReadOnly Property WidthMsg As String
Get
Return EgtMsg(MSG_MAINWINDOW + 1)
@@ -613,6 +889,87 @@ Public Class OptionsViewModel
End Get
End Property
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'tab2
Public ReadOnly Property AssemblyMsg As String
Get
Return "Assembly"
End Get
End Property
Public ReadOnly Property LightUpMsg As String
Get
Return "Light Up"
End Get
End Property
Public ReadOnly Property LightLockMsg As String
Get
Return "Light Lock"
End Get
End Property
Public ReadOnly Property LightBottomMsg As String
Get
Return "Light Bottom"
End Get
End Property
Public ReadOnly Property LightHingeMsg As String
Get
Return "Light Hinge"
End Get
End Property
Public ReadOnly Property ThicknessHeadMsg As String
Get
Return "Thickness Head"
End Get
End Property
Public ReadOnly Property OverlapHingeMsg As String
Get
Return "Overlap Hinge"
End Get
End Property
Public ReadOnly Property OverlapLockMsg As String
Get
Return "Overlap Lock"
End Get
End Property
Public ReadOnly Property OverlapTopMsg As String
Get
Return "Overlap Top"
End Get
End Property
Public ReadOnly Property DeltaTMsg As String
Get
Return "Delta T"
End Get
End Property
Public ReadOnly Property ExteriorMsg As String
Get
Return "Exterior"
End Get
End Property
Public ReadOnly Property DoorNumberMsg As String
Get
Return "Number Doors"
End Get
End Property
Public ReadOnly Property JambsAndDoorsMsg As String
Get
Return "Jambs and Doors"
End Get
End Property
#End Region
' Controllo di eliminare un bevel dalla lista: 1 se accendo un bevel, 2 se spengo un bevel, -1 tutti i casi che non sono questi
@@ -639,12 +996,13 @@ Public Class OptionsViewModel
' chiedo se vuole continuare: vero se cambia li lista
Private Function QuestionSetBevel(bCheckBevel As Integer) As Boolean
If Not IsNothing(m_rfCurrDoor) Then
If Not IsNothing(Map.refPartPageVM.CurrPart) Or IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
' se la porta esiste
If bCheckBevel = 1 Then
' controllo se sto eliminando da uno degli elementi della lista: se si chiedo di continuare
If m_rfCurrDoor.LockEdgeType.Name = "BU" Or m_rfCurrDoor.LockEdgeType.Name = "BD" Or m_rfCurrDoor.HingeEdgeType.Name = "BU" Or m_rfCurrDoor.HingeEdgeType.Name = "BD" Then
If Map.refPartPageVM.CurrPart.LockEdgeType.Name = "BU" Or Map.refPartPageVM.CurrPart.LockEdgeType.Name = "BD" Or Map.refPartPageVM.CurrPart.HingeEdgeType.Name = "BU" Or Map.refPartPageVM.CurrPart.HingeEdgeType.Name = "BD" Or
Map.refAssemblyPageVM.CurrAssembly.LockEdgeType.Name = "BU" Or Map.refAssemblyPageVM.CurrAssembly.LockEdgeType.Name = "BD" Or Map.refAssemblyPageVM.CurrAssembly.HingeEdgeType.Name = "BU" Or Map.refAssemblyPageVM.CurrAssembly.HingeEdgeType.Name = "BD" Then
' Se blocco tutto non accade nulla
If MessageBox.Show(EgtMsg(50154), EgtMsg(50115), MessageBoxButton.YesNo, MessageBoxImage.Asterisk, MessageBoxResult.No) = MessageBoxResult.No Then
Return False
@@ -667,70 +1025,69 @@ Public Class OptionsViewModel
Else
Return True
End If
''If bCheckBevel = 1 Then
'' ' controllo se to oliminando da uno degli elementi della lista: se si chiedo di continuare
'' If m_rfCurrDoor.LockEdgeType.Name = "BU" Or m_rfCurrDoor.LockEdgeType.Name = "BD" Or m_rfCurrDoor.HingeEdgeType.Name = "BU" Or m_rfCurrDoor.HingeEdgeType.Name = "BD" Then
'' ' Se blocco tutto non accade nulla
'' If MessageBox.Show(EgtMsg(50154), EgtMsg(50115), MessageBoxButton.YesNo, MessageBoxImage.Asterisk, MessageBoxResult.No) = MessageBoxResult.No Then
'' Return False
'' Else
'' ' se decido di continuare
'' Return True
'' End If
'' Else
'' ' se non sono presenti elementi nella lista
'' Return True
'' End If
'' ' se sto attivando un bevel nella lista
''ElseIf bCheckBevel = 2 Then
'' Return True
''Else
'' ' per tutti gli altri casi (-1) non accade nulla
'' Return False
''End If
End Function
' creo la lista di oggetti aggiornando la visibilità dei bevel Up e Down
Public Sub RefreshEdgeTypeList()
For Index = 0 To Door.m_EdgeTypeList.Count - 1
NotifyPropertyChanged("EdgeTypeList")
For Index = 0 To Part.m_EdgeTypeList.Count - 1
If m_StaticEdgeTypeList(Index) = "BU" Then
Door.m_EdgeTypeList(Index).Name = m_StaticEdgeTypeList(Index)
Door.m_EdgeTypeList(Index).IsActive = OptionModule.m_bBevelUp
Part.m_EdgeTypeList(Index).Name = m_StaticEdgeTypeList(Index)
Part.m_EdgeTypeList(Index).IsActive = OptionModule.m_bBevelUp
ElseIf m_StaticEdgeTypeList(Index) = "BD" Then
Door.m_EdgeTypeList(Index).Name = m_StaticEdgeTypeList(Index)
Door.m_EdgeTypeList(Index).IsActive = OptionModule.m_bBevelDown
Part.m_EdgeTypeList(Index).Name = m_StaticEdgeTypeList(Index)
Part.m_EdgeTypeList(Index).IsActive = OptionModule.m_bBevelDown
Else
Door.m_EdgeTypeList(Index).Name = m_StaticEdgeTypeList(Index)
Door.m_EdgeTypeList(Index).IsActive = Visibility.Visible
Part.m_EdgeTypeList(Index).Name = m_StaticEdgeTypeList(Index)
Part.m_EdgeTypeList(Index).IsActive = Visibility.Visible
End If
Next
If Not IsNothing(m_rfCurrDoor) Then
If Not IsNothing(Map.refPartPageVM.CurrPart) Then
NotifyPropertyChanged("LockEdgeType")
m_rfCurrDoor.NotifyPropertyChanged("LockEdgeType")
NotifyPropertyChanged("LockEdgeTypeAssembly")
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("LockEdgeType")
NotifyPropertyChanged("HingeEdgeType")
m_rfCurrDoor.NotifyPropertyChanged("HingeEdgeType")
NotifyPropertyChanged("HingeEdgeTypeAssembly")
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("HingeEdgeType")
NotifyPropertyChanged("TopType")
m_rfCurrDoor.NotifyPropertyChanged("TopType")
NotifyPropertyChanged("TopTypeAssembly")
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("TopType")
NotifyPropertyChanged("BottomType")
m_rfCurrDoor.NotifyPropertyChanged("BottomType")
NotifyPropertyChanged("BottomTypeAssembly")
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("BottomType")
End If
If Not IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
Map.refAssemblyPageVM.CurrAssembly.NotifyPropertyChanged("EdgeTypeList")
NotifyPropertyChanged("LockEdgeType")
NotifyPropertyChanged("LockEdgeTypeAssembly")
Map.refAssemblyPageVM.CurrAssembly.NotifyPropertyChanged("LockEdgeType")
NotifyPropertyChanged("HingeEdgeType")
NotifyPropertyChanged("HingeEdgeTypeAssembly")
Map.refAssemblyPageVM.CurrAssembly.NotifyPropertyChanged("HingeEdgeType")
NotifyPropertyChanged("TopType")
NotifyPropertyChanged("TopTypeAssembly")
Map.refAssemblyPageVM.CurrAssembly.NotifyPropertyChanged("TopType")
NotifyPropertyChanged("BottomType")
NotifyPropertyChanged("BottomTypeAssembly")
Map.refAssemblyPageVM.CurrAssembly.NotifyPropertyChanged("BottomType")
End If
End Sub
Public Shared Sub CreateEdgeTypeList()
For Index = 0 To m_StaticEdgeTypeList.Count - 1
If m_StaticEdgeTypeList(Index) = "BU" Then
Door.m_EdgeTypeList.Add(New EdgeType(m_StaticEdgeTypeList(Index), OptionModule.m_bBevelUp))
Part.m_EdgeTypeList.Add(New EdgeType(m_StaticEdgeTypeList(Index), OptionModule.m_bBevelUp))
ElseIf m_StaticEdgeTypeList(Index) = "BD" Then
Door.m_EdgeTypeList.Add(New EdgeType(m_StaticEdgeTypeList(Index), OptionModule.m_bBevelDown))
Part.m_EdgeTypeList.Add(New EdgeType(m_StaticEdgeTypeList(Index), OptionModule.m_bBevelDown))
Else
Door.m_EdgeTypeList.Add(New EdgeType(m_StaticEdgeTypeList(Index), Visibility.Visible))
Part.m_EdgeTypeList.Add(New EdgeType(m_StaticEdgeTypeList(Index), Visibility.Visible))
End If
Next
End Sub
Sub New(rfMainWindowViewModel As MainWindowViewModel)
m_rfCurrDoor = DirectCast(rfMainWindowViewModel.DoorParameters.DataContext, DoorParametersViewModel).CurrDoor
m_rfMainWindowViewModel = rfMainWindowViewModel
Sub New(rfMainWindowVM As MainWindowVM)
m_rfCurrDoor = Map.refPartPageVM.CurrPart
m_rfMainWindowVM = rfMainWindowVM
End Sub
#Region "COMMANDS"
@@ -755,14 +1112,14 @@ Public Class OptionsViewModel
Public Sub CloseOptions()
' Chiusura finestra
For Each Window In Application.Current.Windows
If TypeOf Window Is OptionsView Then
Dim OptionsWindow As OptionsView = DirectCast(Window, OptionsView)
If TypeOf Window Is OptionsV Then
Dim OptionsWindow As OptionsV = DirectCast(Window, OptionsV)
' se eseguo una modifica prima di avere una porta...controllo bene!!
If Not IsNothing(m_rfCurrDoor) Then
m_rfCurrDoor.VisibilityWeight = Door.IsCheckedWeight
m_rfCurrDoor.NotifyPropertyChanged("Weight")
m_rfCurrDoor.NotifyPropertyChanged("VisibilityWeight")
End If
If Not IsNothing(Map.refPartPageVM.CurrPart) Then
Map.refPartPageVM.CurrPart.VisibilityWeight = Part.IsCheckedWeight
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("Weight")
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("VisibilityWeight")
End If
OptionsWindow.Close()
End If
Next
@@ -800,13 +1157,13 @@ Public Class OptionsViewModel
End Property
Public Sub F1Guide()
Dim rfGuideViewModel As New GuideViewModel
Dim rfGuideVM As New GuideVM
'If String.IsNullOrEmpty(m_Chapter) Then
' GuideViewModel.m_AddressGuide = "option_page"
' GuideVM.m_AddressGuide = "option_page"
'Else
' GuideViewModel.m_AddressGuide = "OptionPage\" & m_Chapter
' GuideVM.m_AddressGuide = "OptionPage\" & m_Chapter
'End If
'm_rfMainWindowViewModel.ProjectManagerViewModel.Guide()
'm_rfMainWindowVM.ProjectManagerVM.Guide()
End Sub
#End Region ' COMMANDS