diff --git a/Assembly/Assembly.vb b/Assembly/Assembly.vb
index b141807..2f8cf83 100644
--- a/Assembly/Assembly.vb
+++ b/Assembly/Assembly.vb
@@ -1267,6 +1267,7 @@ Public Class Assembly
Local_Door.IsActive = True
Local_PartDoor.Door = Local_Door
Local_PartDoor.Door.SwingTypeList = OptionModule.m_SwingTypeList
+ Local_PartDoor.Door.MaterialsList = OptionModule.m_MaterialList
Local_PartDoor.SetIsChecked(Local_Door.IsActive)
ListPartDoor.Add(Local_PartDoor)
Map.refPartPageVM.CurrPart = Local_Door
diff --git a/DdfFile.vb b/DdfFile.vb
index 08176b1..f04c5af 100644
--- a/DdfFile.vb
+++ b/DdfFile.vb
@@ -478,7 +478,12 @@ Friend Module DdfFile
End If
DdfFileContent.Add("")
- '----------------------------------------------------------------------------------------------------------------------------------------------------
+
+ If Not IsNothing(Part.SelectedMaterial) andalso Part.SelectedMaterial.NameDDF <> GENERICMATERIAL then
+ DdfFileContent.Add("" & ConstCompo.S_MATERIAL & ": " & Part.SelectedMaterial.NameDDF)
+ DdfFileContent.Add("")
+ End If
+'----------------------------------------------------------------------------------------------------------------------------------------------------
DdfFileContent.Add("" & ConstCompo.S_PROFILES & ":")
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LOCKEDGE & ": " & SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel))
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
diff --git a/DoorParameters/Compo.vb b/DoorParameters/Compo.vb
index 6936bc2..abfe2fa 100644
--- a/DoorParameters/Compo.vb
+++ b/DoorParameters/Compo.vb
@@ -12,7 +12,9 @@ Module Modified
For Each Compo In Map.refPartPageVM.CurrPart.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)
Compo.BorderThickness = 1
+ Compo.FontBold = FontWeights.Normal
Next
End If
Else
@@ -60,6 +62,17 @@ Public Class Compo
End Set
End Property
+ Private m_Foreground As SolidColorBrush = DirectCast(New BrushConverter().ConvertFrom("#000000"), SolidColorBrush)
+ Public Property Foreground As SolidColorBrush
+ Get
+ Return m_Foreground
+ End Get
+ Set(value As SolidColorBrush)
+ m_Foreground = value
+ NotifyPropertyChanged("Foreground")
+ End Set
+ End Property
+
Private m_BorderThickness As Integer = 1
Public Property BorderThickness As Integer
Get
@@ -71,6 +84,17 @@ Public Class Compo
End Set
End Property
+ Private m_FontBold As FontWeight = FontWeights.Bold
+ Public Property FontBold As FontWeight
+ Get
+ Return m_FontBold
+ End Get
+ Set(value As FontWeight)
+ m_FontBold = value
+ NotifyPropertyChanged("FontBold")
+ End Set
+ End Property
+
Private m_CompoType As CompoType
Public ReadOnly Property CompoType As CompoType
Get
diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb
index 84c6b9f..fc1fbed 100644
--- a/DoorParameters/Part.vb
+++ b/DoorParameters/Part.vb
@@ -180,12 +180,16 @@ Public Class Part
#End Region ' Info generali del ddf
-#Region "PROPERTIES"
+#Region "PROPERTIES and MATERIAL"
' la lista dei materiali è caricta nell'init dell'OptionPage
- Public ReadOnly Property MaterialsList As ObservableCollection(of MaterialType)
+ Friend Shared m_MaterilaList As ObservableCollection(Of MaterialType)
+ Public Property MaterialsList As ObservableCollection(of MaterialType)
Get
- Return OptionModule.m_MaterialList
+ Return m_MaterilaList
End Get
+ Set (value As ObservableCollection(of MaterialType))
+ m_MaterilaList = value
+ End Set
End Property
Private m_SelectedMaterial As MaterialType
@@ -214,6 +218,17 @@ Public Class Part
End Set
End Property
+ Public Sub SetMaterial(ItemMaterial As MaterialType)
+ For Each Item In m_MaterilaList
+ If ItemMaterial.NameDDF = Item.NameDDF then
+ m_SelectedMaterial = Item
+ NotifyPropertyChanged("SelectedMaterial")
+ Exit for
+ End If
+ Next
+
+ End Sub
+
Public ReadOnly Property MaterialIsVisible As Visibility
Get
Return OptionModule.m_MaterialIsVisible
@@ -275,7 +290,7 @@ Public Class Part
End Set
End Property
-#End Region ' Properties
+#End Region ' Properties and Material
#Region "SIZE"
@@ -946,7 +961,9 @@ Public Class Part
For Each Compo In Map.refPartPageVM.CurrPart.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)
Compo.BorderThickness = 1
+ Compo.FontBold = FontWeights.Normal
Next
' creo la stringa che contiene la lista degli errori
Dim ErrorList As String = String.Empty
@@ -1023,10 +1040,15 @@ Public Class Part
NewCompo.ReadDefaultParamLua(FileNameComplete, NewCompo)
End If
' evidenzio il nome della componente appena aggiunto
- NewCompo.BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
- ' #B0D0D2 = Azzurro
- NewCompo.BackGroundColor = DirectCast(New BrushConverter().ConvertFrom("#B0D0D2"), SolidColorBrush)
- NewCompo.BorderThickness = 1
+ '#FF4D84C4 EgaltechBlu1
+ '#FF7096CE EgaltechBlu2
+ '#FF90ABD9 EgaltechBlu3
+ '#FFB2C3E4 EgaltechBlu4
+ NewCompo.BorderColor = DirectCast(New BrushConverter().ConvertFrom("#FF4D84C4"), SolidColorBrush)
+ NewCompo.BackGroundColor = DirectCast(New BrushConverter().ConvertFrom("#FFFFFFFF"), SolidColorBrush)
+ NewCompo.Foreground = DirectCast(New BrushConverter().ConvertFrom("#FF4D84C4"), SolidColorBrush)
+ NewCompo.BorderThickness = 2
+ NewCompo.FontBold = FontWeights.Bold
m_SelCompo=NewCompo
NotifyPropertyChanged("SelCompo")
End If
@@ -2468,6 +2490,7 @@ Public Class Part
End If
End If
' Inserisco il componente in lista
+ m_CurrCompo.FontBold = FontWeights.Normal
m_CompoList.Add(m_CurrCompo)
End While
Return Index
@@ -2834,6 +2857,7 @@ Public Class Part
Me.m_Height = OptionModule.m_Height
Me.m_Thickness = OptionModule.m_ThicknessJamb
Me.SetSwing(OptionModule.m_Swing)
+ Me.SetMaterial(OptionModule.m_MaterialList(0))
Me.m_IsActive = True
Me.m_Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
Me.m_Weight = OptionModule.m_Weight
@@ -2857,6 +2881,7 @@ Public Class Part
Me.m_Height = OptionModule.m_Height
Me.m_Thickness = OptionModule.m_Thickness
Me.SetSwing(OptionModule.m_Swing)
+ Me.SetMaterial(OptionModule.m_MaterialList(0))
Me.m_IsActive = True
Me.m_Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
Me.m_Weight = OptionModule.m_Weight
diff --git a/DoorParameters/PartPageV.xaml b/DoorParameters/PartPageV.xaml
index 6d8b2a0..1a1355e 100644
--- a/DoorParameters/PartPageV.xaml
+++ b/DoorParameters/PartPageV.xaml
@@ -414,6 +414,10 @@
+
+
+
+
@@ -429,6 +433,10 @@
+
+
+
+
diff --git a/EgtDOORCreator.vbproj b/EgtDOORCreator.vbproj
index 67d390d..26f42b0 100644
--- a/EgtDOORCreator.vbproj
+++ b/EgtDOORCreator.vbproj
@@ -169,6 +169,9 @@
HardwareHelpSceneHostV.xaml
+
+ HardwarePartWindowV.xaml
+ LauncherV.xaml
@@ -286,6 +289,10 @@
MSBuild:CompileDesigner
+
+ Designer
+ MSBuild:Compile
+ DesignerMSBuild:Compile
diff --git a/HardwareManager/HardwarePageVM.vb b/HardwareManager/HardwarePageVM.vb
index 4eaaa3f..ce1b519 100644
--- a/HardwareManager/HardwarePageVM.vb
+++ b/HardwareManager/HardwarePageVM.vb
@@ -6,7 +6,8 @@ Imports System.Text.RegularExpressions
Imports EgtWPFLib5
Public Class HardwarePageVM
- Inherits VMBase
+ Implements INotifyPropertyChanged
+ 'Inherits VMBase
Private m_GenericPart As Part
Public Property GenericPart As Part
@@ -322,6 +323,12 @@ Public Class HardwarePageVM
m_CompoPanelPart.DataContext = Map.refCompoPanelHardwareVM
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/HardwarePart/HardwarePartV.xaml b/HardwarePart/HardwarePartV.xaml
index 09429a9..3072cf2 100644
--- a/HardwarePart/HardwarePartV.xaml
+++ b/HardwarePart/HardwarePartV.xaml
@@ -1,15 +1,11 @@
-
+ BorderBrush="{StaticResource EgaltechBlue1}">
+
@@ -22,101 +18,114 @@
-
+
-
+
+
+
-
+ Margin="5,0,30,5"/>
-
+ Margin="5,0,30,5"/>
-
+ Margin="5,0,30,5"/>
-
-
+
+
+
+
+
-
-
-
-
+
+
+
-
-
+ IsCancel="True"/>-->
+
-
-
+
+
diff --git a/HardwarePart/HardwarePartV.xaml.vb b/HardwarePart/HardwarePartV.xaml.vb
index c2d0858..3cd8199 100644
--- a/HardwarePart/HardwarePartV.xaml.vb
+++ b/HardwarePart/HardwarePartV.xaml.vb
@@ -1,17 +1,11 @@
Public Class HardwarePartV
Private WithEvents m_HardwarePartVM As HardwarePartVM
- Sub New(Owner As Window, HardwarePart As HardwarePartVM)
- MyBase.New(Owner)
+ Sub New(HardwarePart As HardwarePartVM)
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Me.DataContext = HardwarePart
m_HardwarePartVM = HardwarePart
End Sub
-
- Private Sub CloseWindow(bDialoResult As Boolean) Handles m_HardwarePartVM.m_CloseWindow
- Me.DialogResult = bDialoResult
- End Sub
-
End Class
diff --git a/HardwarePart/HardwarePartVM.vb b/HardwarePart/HardwarePartVM.vb
index 2a708dd..b873d85 100644
--- a/HardwarePart/HardwarePartVM.vb
+++ b/HardwarePart/HardwarePartVM.vb
@@ -1,10 +1,12 @@
Imports System.Collections.ObjectModel
+Imports System.ComponentModel
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Public Class HardwarePartVM
- Inherits VMBase
+ 'Inherits VMBase
+ Implements INotifyPropertyChanged
Dim m_HardwareTemp As Hardware
@@ -62,6 +64,33 @@ Public Class HardwarePartVM
End Set
End Property
+ Private m_MaterialListIsVisble As Visibility = Visibility.Collapsed
+ Public ReadOnly Property MaterialListIsVisible As Visibility
+ Get
+ Return m_MaterialListIsVisble
+ End Get
+ End Property
+
+ Private m_MaterialList As ObservableCollection(Of MaterialType)
+ Public Property MaterialList As ObservableCollection(Of MaterialType)
+ Get
+ Return m_MaterialList
+ End Get
+ Set(value As ObservableCollection(Of MaterialType))
+ m_MaterialList = value
+ End Set
+ End Property
+
+ Private m_SelectedMaterial As MaterialType
+ Public Property SelectedMaterial As MaterialType
+ Get
+ Return m_SelectedMaterial
+ End Get
+ Set(value As MaterialType)
+ m_SelectedMaterial = value
+ End Set
+ End Property
+
Private m_LockEdgeProfile As ObservableCollection(Of EdgeType)
Public Property LockEdgeProfile As ObservableCollection(Of EdgeType)
Get
@@ -142,6 +171,16 @@ Public Class HardwarePartVM
#Region "MESSAGES"
+ Public ReadOnly Property General As String
+ Get
+ Return EgtMsg(50040)
+ End Get
+ End Property
+ Public ReadOnly Property EdgeTypeMsg As String
+ Get
+ Return EgtMsg(50044)
+ End Get
+ End Property
Public ReadOnly Property Title As String
Get
Return "Part Dimension"
@@ -188,10 +227,14 @@ Public Class HardwarePartVM
Return EgtMsg(50008)
End Get
End Property
-
+ Public ReadOnly Property MaterialMsg As String
+ Get
+ Return "Material"
+ End Get
+ End Property
Public ReadOnly Property OkMsg As String
Get
- Return "Ok"
+ Return "Apply"
End Get
End Property
@@ -229,6 +272,7 @@ Public Class HardwarePartVM
Map.refHardwarePageVM.GenericPart.SetHingeEdgeType( m_SelectedHingeEdgeProfile)
Map.refHardwarePageVM.GenericPart.SetTopType( m_SelectedTopEdgeProfile)
Map.refHardwarePageVM.GenericPart.SetBottomType( m_SelectedBottomEdgeProfile)
+ Map.refHardwarePageVM.GenericPart.SetMaterial( m_SelectedMaterial)
Map.refHardwarePageVM.GenericPart.NotifyPropertyChanged("GenericPart")
Map.refSceneManagerVM.RefreshBtn()
End If
@@ -261,6 +305,21 @@ Public Class HardwarePartVM
m_Width = Map.refHardwarePageVM.GenericPart.Width
m_Thickness = Map.refHardwarePageVM.GenericPart.Thickness
m_SwingList = OptionModule.m_SwingTypeList
+
+ If Not IsNothing(OptionModule.m_MaterialList) andalso OptionModule.m_MaterialList.Count > 0 then
+ m_MaterialList= Map.refHardwarePageVM.GenericPart.MaterialsList
+ Try
+ m_SelectedMaterial = m_MaterialList.First(Function(x) x.Name = Trim(Map.refHardwarePageVM.GenericPart.SelectedMaterial.Name))
+ Catch ex As Exception
+ m_SelectedMaterial = m_MaterialList(0)
+ Map.refHardwarePageVM.GenericPart.SetMaterial( m_SelectedMaterial )
+ End Try
+ If OptionModule.m_MaterialList.Count > 1 then
+ m_MaterialIsVisible = Visibility.Visible
+ NotifyPropertyChanged("MaterialListIsVisible")
+ End If
+ End If
+
For Each Item In m_SwingList
If Trim(Item) = Trim(Map.refHardwarePageVM.GenericPart.Swing) Then
m_SelectedItem = Item
@@ -296,10 +355,15 @@ Public Class HardwarePartVM
End If
Next
Else
- MessageBox.Show("The current part has not been generated correctly.", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
+ MessageBox.Show("The hardware part has not been generated correctly.", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Ok()
End If
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/HardwarePart/HardwarePartWindowV.xaml b/HardwarePart/HardwarePartWindowV.xaml
new file mode 100644
index 0000000..3d01427
--- /dev/null
+++ b/HardwarePart/HardwarePartWindowV.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/HardwarePart/HardwarePartWindowV.xaml.vb b/HardwarePart/HardwarePartWindowV.xaml.vb
new file mode 100644
index 0000000..ef70fcb
--- /dev/null
+++ b/HardwarePart/HardwarePartWindowV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class HardwarePartWindow
+
+End Class
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index 091ced2..b421cfc 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 ecad7a9..8580730 100644
--- a/OptionsWindow/OptionModule.vb
+++ b/OptionsWindow/OptionModule.vb
@@ -306,6 +306,7 @@ Friend Module OptionModule
DefaultGetPrivateProfileObservableCollection(ConstIni.S_PROPERTIES_INI, ConstIni.K_PROPRTIESLISTJAMB_INI, PropertyList)
If PropertyList.Count > 0 Then LoadPropertiesList(PropertyList, m_PropertListJamb)
End If
+ Part.m_MaterilaList = m_MaterialList
'-------------------------------------------------------------------------------------------------------------------------------
' carico la lista delle proprietà
'Dim PropertyList As New ObservableCollection(Of String)
diff --git a/OptionsWindow/OptionsV.xaml b/OptionsWindow/OptionsV.xaml
index 562193e..bf9f3b6 100644
--- a/OptionsWindow/OptionsV.xaml
+++ b/OptionsWindow/OptionsV.xaml
@@ -149,7 +149,7 @@
-
+
@@ -296,6 +296,99 @@
+
+
+
diff --git a/OptionsWindow/OptionsViewModel.vb b/OptionsWindow/OptionsViewModel.vb
index 8fd1c44..4109451 100644
--- a/OptionsWindow/OptionsViewModel.vb
+++ b/OptionsWindow/OptionsViewModel.vb
@@ -9,6 +9,42 @@ Public Class OptionsVM
' serve per definire l'indirizzo per la guida (senza aggiungere l'estenzione!)
Dim m_Chapter As String
+ Private m_HardwarePartV As HardwarePartV
+ Private m_HardwarePartVM As HardwarePartVM
+
+ Public ReadOnly Property HardwarePart As ContentControl
+ Get
+ Return m_HardwarePartV
+ End Get
+ End Property
+
+ ' se sono nel DOORCreator disabilito il tab dell'HardwarePart
+ Public Readonly Property IsEnableHarwarePart As Boolean
+ Get
+ If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage then
+ Return true
+ End If
+ Return false
+ End Get
+ End Property
+
+ ' suggerisco il tabcontrol in funzione della schermata in lettura
+ Private m_SelectedTab As Integer = 0
+ Public Property SelectedTab As Integer
+ Get
+ If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage then
+ Return 2
+ ElseIf Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage then
+ Return 1
+ Else
+ Return 0
+ End If
+ End Get
+ Set (value as integer)
+ m_SelectedTab = value
+ End Set
+ End Property
+
Public ReadOnly Property LanguageList As ObservableCollection(Of Language)
Get
Return OptionModule.m_LanguageList
@@ -948,6 +984,13 @@ Public Class OptionsVM
End Get
End Property
+ Public ReadOnly Property HardwarePartMsg As String
+ Get
+ 'HardwarePart
+ Return "HardwarePart"
+ End Get
+ End Property
+
Public ReadOnly Property WidthMsg As String
Get
Return EgtMsg(MSG_MAINWINDOW + 1)
@@ -1434,6 +1477,10 @@ Public Class OptionsVM
Sub New()
Map.SetRefOptionsVM(Me)
+ If IsEnableHarwarePart then
+ m_HardwarePartVM = New HardwarePartVM
+ m_HardwarePartV = New HardwarePartV(m_HardwarePartVM)
+ End if
End Sub
#Region "COMMANDS"
diff --git a/ProjectManager/ProjectManagerHardwareV.xaml b/ProjectManager/ProjectManagerHardwareV.xaml
index a14c68b..be65047 100644
--- a/ProjectManager/ProjectManagerHardwareV.xaml
+++ b/ProjectManager/ProjectManagerHardwareV.xaml
@@ -33,11 +33,11 @@
-