diff --git a/Constants/ConstMsg.vb b/Constants/ConstMsg.vb
index ccfdf11..c8c9761 100644
--- a/Constants/ConstMsg.vb
+++ b/Constants/ConstMsg.vb
@@ -14,6 +14,7 @@
Public Const MSG_TOOLSDBPAGE As Integer = MSG_EGTCAM5 + 1000
Public Const MSG_TOOLSERRORS As Integer = MSG_EGTCAM5 + 1100
Public Const MSG_MACHININGSDBPAGE As Integer = MSG_EGTCAM5 + 1200
+ Public Const MSG_MACHININGDB As Integer = MSG_EGTWPFLIB5 + 1200
Public Const MSG_MACHININGSERRORS As Integer = MSG_EGTCAM5 + 1370
Public Const MSG_MACHININGOPTIONPAGE As Integer = MSG_EGTCAM5 + 1400
Public Const MSG_SETUP As Integer = MSG_EGTCAM5 + 1450
diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj
index f4c49c0..10796fd 100644
--- a/EgtCAM5.vbproj
+++ b/EgtCAM5.vbproj
@@ -155,6 +155,45 @@
CurrSetUpV.xaml
+
+ StoneMillingParameterExpanderV.xaml
+
+
+ ChiselingParameterExpanderV.xaml
+
+
+ StoneSawRoughingParameterExpanderV.xaml
+
+
+ StoneSawFinishingParameterExpanderV.xaml
+
+
+ StoneDrillingParameterExpanderV.xaml
+
+
+ WoodDrillingParameterExpanderV.xaml
+
+
+ PocketingParameterExpanderV.xaml
+
+
+ MortisingParameterExpanderV.xaml
+
+
+ BeamMillingParameterExpanderV.xaml
+
+
+ WaterjettingParameterExpanderV.xaml
+
+
+ WoodMillingParameterExpanderV.xaml
+
+
+ WoodSawingParameterExpanderV.xaml
+
+
+ StoneSawingParameterExpanderV.xaml
+ MachineBox.xaml
@@ -374,6 +413,58 @@
DesignerMSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+ MSBuild:CompileDesigner
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index 6120414..b55fcf3 100644
--- a/My Project/AssemblyInfo.vb
+++ b/My Project/AssemblyInfo.vb
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
'
-
-
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml
new file mode 100644
index 0000000..b27474c
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml
@@ -0,0 +1,322 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..bab97ca
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class BeamMillingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml
new file mode 100644
index 0000000..f627324
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml
@@ -0,0 +1,232 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..a89818a
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class ChiselingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml
index b027228..61333e7 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml
@@ -75,490 +75,24 @@
63
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb
index a0bacea..5b63919 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb
@@ -3,81 +3,81 @@ Imports EgtWPFLib5.EgtFloating
Public Class MachiningParameterExpanderV
- Private EgtFloatingTray As EgtFloatingTray
- Private EgtFloatingPanel As EgtFloatingPanel
+ 'Private EgtFloatingTray As EgtFloatingTray
+ 'Private EgtFloatingPanel As EgtFloatingPanel
- Private m_bFirst As Boolean = True
+ 'Private m_bFirst As Boolean = True
- Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
- If m_bFirst Then
- EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
- EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
- AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
- PanelHeight = EgtFloatingPanel.ActualHeight
- Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
- m_bFirst = False
- End If
- CalculateOperationParametersStackPanelMaxHeight()
- End Sub
+ 'Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ ' If m_bFirst Then
+ ' EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ ' EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ ' AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ ' PanelHeight = EgtFloatingPanel.ActualHeight
+ ' Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ ' m_bFirst = False
+ ' End If
+ ' CalculateOperationParametersStackPanelMaxHeight()
+ 'End Sub
- Dim m_bSizeChanging As Boolean = False
+ 'Dim m_bSizeChanging As Boolean = False
- Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
- If m_bSizeChanging Then Return
- m_bSizeChanging = True
- CalculateOperationParametersStackPanelMaxHeight()
- m_bSizeChanging = False
- End Sub
+ 'Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ ' If m_bSizeChanging Then Return
+ ' m_bSizeChanging = True
+ ' CalculateOperationParametersStackPanelMaxHeight()
+ ' m_bSizeChanging = False
+ 'End Sub
- Dim PanelHeight As Double = 0
- Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ 'Dim PanelHeight As Double = 0
+ 'Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
- Private Sub CalculateOperationParametersStackPanelMaxHeight()
- Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
- Dim OpenedExpanderList As New List(Of Boolean)
- For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
- If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
- Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
- If IndexedExpander.IsExpanded Then
- OpenedExpanderList.Add(True)
- IndexedExpander.IsExpanded = False
- Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
- CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
- ' Sottraggo anche i padding
- AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
- Else
- OpenedExpanderList.Add(False)
- End If
- Else
- OpenedExpanderList.Add(False)
- End If
- Next
- Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
- AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
- For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
- If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
- Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
- If OpenedExpanderList(Index) Then
- IndexedExpander.IsExpanded = True
- End If
- End If
- Next
- End Sub
+ 'Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ ' Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ ' Dim OpenedExpanderList As New List(Of Boolean)
+ ' For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ ' If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ ' Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ ' If IndexedExpander.IsExpanded Then
+ ' OpenedExpanderList.Add(True)
+ ' IndexedExpander.IsExpanded = False
+ ' Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ ' CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ ' AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' ' Sottraggo anche i padding
+ ' AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ ' Else
+ ' OpenedExpanderList.Add(False)
+ ' End If
+ ' Else
+ ' OpenedExpanderList.Add(False)
+ ' End If
+ ' Next
+ ' Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ ' AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ ' For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ ' If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ ' Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ ' If OpenedExpanderList(Index) Then
+ ' IndexedExpander.IsExpanded = True
+ ' End If
+ ' End If
+ ' Next
+ 'End Sub
- ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
- Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
- Dim target As DependencyObject = dependencyObject
- Do
- target = LogicalTreeHelper.GetParent(target)
- Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
- If IsNothing(target) Then
- target = dependencyObject
- Do
- target = VisualTreeHelper.GetParent(target)
- Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
- End If
- Return TryCast(target, T)
- End Function
+ '' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ 'Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ ' Dim target As DependencyObject = dependencyObject
+ ' Do
+ ' target = LogicalTreeHelper.GetParent(target)
+ ' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ ' If IsNothing(target) Then
+ ' target = dependencyObject
+ ' Do
+ ' target = VisualTreeHelper.GetParent(target)
+ ' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ ' End If
+ ' Return TryCast(target, T)
+ 'End Function
End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
index 8d30520..cc08cf2 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
@@ -1,1596 +1,35 @@
Imports System.ComponentModel
Imports System.Collections.ObjectModel
Imports EgtUILib
+Imports EgtWPFLib5
Public Class MachiningParameterExpanderVM
- Implements INotifyPropertyChanged
+ Inherits VMBase
- Private m_bUpdating As Boolean = True
-
- Private m_Tool As String
- Public ReadOnly Property Tool As String
+ Private WithEvents m_CurrOperation As MachiningTreeViewItem
+ Public Property CurrOpeartion As MachiningTreeViewItem
Get
- Return m_Tool
+ Return m_CurrOperation
End Get
+ Set(value As MachiningTreeViewItem)
+ m_CurrOperation = value
+ End Set
End Property
- Private m_IsModifiedInvert As Boolean = False
- Private m_Invert As Boolean
- '''
- ''' Property that read and write to the Machining's database the Invert
- '''
- Public Property Invert As Boolean
+ Private m_CurrOperation_IsModified As Boolean
+ Public Property CurrOpeartion_IsModified As Boolean
Get
- Return m_Invert
+ Return m_CurrOperation_IsModified
End Get
Set(value As Boolean)
- If value <> m_Invert Then
- m_Invert = value
- Dim OrigInvert As Boolean = False
- EgtGetMachiningParam(MCH_MP.INVERT, OrigInvert)
- m_IsModifiedInvert = If(value <> OrigInvert, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLeaveTab As Boolean = False
- Private m_LeaveTab As Boolean
- '''
- ''' Property that read and write to the Machining's database the Leave Tab
- '''
- Public Property LeaveTab As Boolean
- Get
- Return m_LeaveTab
- End Get
- Set(value As Boolean)
- If value <> m_LeaveTab Then
- m_LeaveTab = value
- Dim OrigLeaveTab As Boolean = False
- EgtGetMachiningParam(MCH_MP.LEAVETAB, OrigLeaveTab)
- m_IsModifiedLeaveTab = If(value <> OrigLeaveTab, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedToolInvert As Boolean = False
- Private m_ToolInvert As Boolean = False
- '''
- ''' Property that read and write to the Machining's database the Invert
- '''
- Public Property ToolInvert As Boolean
- Get
- Return m_ToolInvert
- End Get
- Set(value As Boolean)
- If value <> m_ToolInvert Then
- m_ToolInvert = value
- Dim OrigToolInvert As Boolean = False
- EgtGetMachiningParam(MCH_MP.TOOLINVERT, OrigToolInvert)
- m_IsModifiedToolInvert = If(value <> OrigToolInvert, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedOscEnable As Boolean = False
- Private m_OscEnable As Boolean
- '''
- ''' Property that read and write to the Machining's database the Oscillation Enable
- '''
- Public Property OscEnable As Boolean
- Get
- Return m_OscEnable
- End Get
- Set(value As Boolean)
- If value <> m_OscEnable Then
- m_OscEnable = value
- Dim OrigOscEnable As Boolean = False
- EgtGetMachiningParam(MCH_MP.OSCENABLE, OrigOscEnable)
- m_IsModifiedOscEnable = If(value <> OrigOscEnable, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_Type As Integer
- '''
- ''' Property that read from the Machining's database the Type
- '''
- Public ReadOnly Property Type As Integer
- Get
- Return m_Type
- End Get
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox WorkSide
- Private m_WorkSideList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property WorkSideList As ObservableCollection(Of IdNameStruct)
- Get
- Select Case m_Type
- Case MCH_MY.MORTISING
- m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_MORTISE_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
- New IdNameStruct(MCH_MORTISE_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
- Case MCH_MY.CHISELING
- m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_CHISEL_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
- New IdNameStruct(MCH_CHISEL_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
- Case Else
- m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAW_WS.CENTER, EgtMsg(MSG_MACHININGSDBPAGE + 120)),
- New IdNameStruct(MCH_SAW_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
- New IdNameStruct(MCH_SAW_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
- End Select
- Return m_WorkSideList
- End Get
- End Property
-
- Private m_IsModifiedSelectedWorkSide As Boolean = False
- Private m_SelectedWorkSide As Integer
- ' Proprietà che indica il WorkSide (MCH_SAW_WS)
- Public Property SelectedWorkSide As Integer
- Get
- If IsNothing(WorkSideList) Then Return Nothing
- Return m_SelectedWorkSide
- End Get
- Set(value As Integer)
- If value <> m_SelectedWorkSide Then
- If Not IsNothing(WorkSideList) Then
- m_SelectedWorkSide = value
- Dim OrigWorkSide As Integer = 0
- EgtGetMachiningParam(MCH_MP.WORKSIDE, OrigWorkSide)
- OrigWorkSide = IdNameStruct.IndFromId(OrigWorkSide, WorkSideList)
- m_IsModifiedSelectedWorkSide = (value <> OrigWorkSide)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox HeadSide
- Private m_HeadSideList As New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAW_HS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
- New IdNameStruct(MCH_SAW_HS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
- Public ReadOnly Property HeadSideList As ObservableCollection(Of IdNameStruct)
- Get
- Return m_HeadSideList
- End Get
- End Property
-
- Private m_IsModifiedSelectedHeadSide As Boolean = False
- Private m_SelectedHeadSide As Integer
- ' Proprietà che indica il HeadSide (MCH_SAW_HS)
- Public Property SelectedHeadSide As Integer
- Get
- If IsNothing(HeadSideList) Then Return Nothing
- Return m_SelectedHeadSide
- End Get
- Set(value As Integer)
- If value <> m_SelectedHeadSide Then
- If Not IsNothing(HeadSideList) Then
- m_SelectedHeadSide = value
- Dim OrigHeadSide As Integer = 0
- EgtGetMachiningParam(MCH_MP.HEADSIDE, OrigHeadSide)
- OrigHeadSide = IdNameStruct.IndFromId(OrigHeadSide, HeadSideList)
- m_IsModifiedSelectedHeadSide = If(value <> OrigHeadSide, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox LeadInType
- Private m_LeadInTypeList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property LeadInTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Select Case m_Type
- Case MCH_MY.SAWING
- m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAW_LI.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)),
- New IdNameStruct(MCH_SAW_LI.STRICT, EgtMsg(MSG_MACHININGSDBPAGE + 125)),
- New IdNameStruct(MCH_SAW_LI.OUT, EgtMsg(MSG_MACHININGSDBPAGE + 126)),
- New IdNameStruct(MCH_SAW_LI.EXT_CENT, EgtMsg(MSG_MACHININGSDBPAGE + 127)),
- New IdNameStruct(MCH_SAW_LI.EXT_OUT, EgtMsg(MSG_MACHININGSDBPAGE + 128))})
- Case MCH_MY.MILLING
- m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)),
- New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131)),
- New IdNameStruct(MCH_MIL_LI.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132)),
- New IdNameStruct(MCH_MIL_LI.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_MIL_LI.HELIX, EgtMsg(MSG_MACHININGSDBPAGE + 133))})
- Case MCH_MY.POCKETING
- m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_POCK_LI.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132)),
- New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_MACHININGSDBPAGE + 133))})
- Case MCH_MY.SURFFINISHING
- m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SURFFIN_LI.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_SURFFIN_LI.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)),
- New IdNameStruct(MCH_SURFFIN_LI.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131))})
- Case MCH_MY.WATERJETTING
- m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_WATERJET_LI.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_WATERJET_LI.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)),
- New IdNameStruct(MCH_WATERJET_LI.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131))})
- Case Else
- m_LeadInTypeList = Nothing
- End Select
- Return m_LeadInTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedLeadInType As Boolean = False
- Private m_SelectedLeadInType As Integer
- ' Proprietà che indica il LeadInType
- Public Property SelectedLeadInType As Integer
- Get
- If IsNothing(LeadInTypeList) Then Return Nothing
- Return IdNameStruct.IdFromInd(m_SelectedLeadInType, LeadInTypeList)
- End Get
- Set(value As Integer)
- If value <> m_SelectedLeadInType Then
- If Not IsNothing(LeadInTypeList) Then
- m_SelectedLeadInType = IdNameStruct.IndFromId(value, LeadInTypeList)
- Dim OrigLeadInType As Integer = 0
- EgtGetMachiningParam(MCH_MP.LEADINTYPE, OrigLeadInType)
- m_IsModifiedSelectedLeadInType = If(value <> OrigLeadInType, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox ExtLinkType
- Private m_ExtLinkTypeList As New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAW_EL.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)),
- New IdNameStruct(MCH_SAW_EL.EXT_PREV, EgtMsg(MSG_MACHININGSDBPAGE + 134)),
- New IdNameStruct(MCH_SAW_EL.EXT_NEXT, EgtMsg(MSG_MACHININGSDBPAGE + 135)),
- New IdNameStruct(MCH_SAW_EL.EXT_BOTH, EgtMsg(MSG_MACHININGSDBPAGE + 136))})
- Public ReadOnly Property ExtLinkTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Return m_ExtLinkTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedExtLinkType As Boolean = False
- Private m_SelectedExtLinkType As Integer
- ' Proprietà che indica il ExtLinkType (MCH_SAW_EL)
- Public Property SelectedExtLinkType As Integer
- Get
- If IsNothing(ExtLinkTypeList) Then Return Nothing
- Return IdNameStruct.IdFromInd(m_SelectedExtLinkType, ExtLinkTypeList)
- End Get
- Set(value As Integer)
- If value <> m_SelectedExtLinkType Then
- If Not IsNothing(ExtLinkTypeList) Then
- m_SelectedExtLinkType = IdNameStruct.IndFromId(value, ExtLinkTypeList)
- Dim OrigExtLinkType As Integer = 0
- EgtGetMachiningParam(MCH_MP.EXTLINKTYPE, OrigExtLinkType)
- m_IsModifiedSelectedExtLinkType = If(value <> OrigExtLinkType, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox LeadOutType
- Private m_LeadOutTypeList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property LeadOutTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Select Case m_Type
- Case MCH_MY.SAWING
- m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAW_LO.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)),
- New IdNameStruct(MCH_SAW_LO.STRICT, EgtMsg(MSG_MACHININGSDBPAGE + 125)),
- New IdNameStruct(MCH_SAW_LO.EXT_CENT, EgtMsg(MSG_MACHININGSDBPAGE + 127)),
- New IdNameStruct(MCH_SAW_LO.OUT, EgtMsg(MSG_MACHININGSDBPAGE + 126)),
- New IdNameStruct(MCH_SAW_LO.EXT_OUT, EgtMsg(MSG_MACHININGSDBPAGE + 128))})
- Case MCH_MY.MILLING
- m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)),
- New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131)),
- New IdNameStruct(MCH_MIL_LO.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132)),
- New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(MSG_MACHININGSDBPAGE + 137))})
- Case MCH_MY.POCKETING
- m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_POCK_LO.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_POCK_LO.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132))})
- Case MCH_MY.SURFFINISHING
- m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SURFFIN_LO.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_SURFFIN_LO.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)),
- New IdNameStruct(MCH_SURFFIN_LO.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131)),
- New IdNameStruct(MCH_SURFFIN_LO.AS_LI, EgtMsg(MSG_MACHININGSDBPAGE + 137))})
- Case MCH_MY.WATERJETTING
- m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_WATERJET_LO.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
- New IdNameStruct(MCH_WATERJET_LO.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)),
- New IdNameStruct(MCH_WATERJET_LO.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131)),
- New IdNameStruct(MCH_WATERJET_LO.AS_LI, EgtMsg(MSG_MACHININGSDBPAGE + 137))})
- Case Else
- m_LeadOutTypeList = Nothing
- End Select
- Return m_LeadOutTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedLeadOutType As Boolean = False
- Private m_SelectedLeadOutType As Integer
- ' Proprietà che indica il LeadOutType
- Public Property SelectedLeadOutType As Integer
- Get
- If IsNothing(LeadOutTypeList) Then Return Nothing
- Return IdNameStruct.IdFromInd(m_SelectedLeadOutType, LeadOutTypeList)
- End Get
- Set(value As Integer)
- If value <> m_SelectedLeadOutType Then
- If Not IsNothing(LeadOutTypeList) Then
- m_SelectedLeadOutType = IdNameStruct.IndFromId(value, LeadOutTypeList)
- Dim OrigLeadOutType As Integer = 0
- EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, OrigLeadOutType)
- m_IsModifiedSelectedLeadOutType = If(value <> OrigLeadOutType, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox CurveUse
- Private m_CurveUseList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property CurveUseList As ObservableCollection(Of IdNameStruct)
- Get
- If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWINGONARCS, 0, IniFile.m_sCurrMachIniFilePath) <> 0 Then
- m_CurveUseList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAW_CU.SKIP, EgtMsg(MSG_MACHININGSDBPAGE + 138)),
- New IdNameStruct(MCH_SAW_CU.APPROX, EgtMsg(MSG_MACHININGSDBPAGE + 139)),
- New IdNameStruct(MCH_SAW_CU.CONVEX, EgtMsg(MSG_MACHININGSDBPAGE + 140)),
- New IdNameStruct(MCH_SAW_CU.KEEP, EgtMsg(MSG_MACHININGSDBPAGE + 141))})
- Else
- m_CurveUseList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAW_CU.SKIP, EgtMsg(MSG_MACHININGSDBPAGE + 138)),
- New IdNameStruct(MCH_SAW_CU.APPROX, EgtMsg(MSG_MACHININGSDBPAGE + 139)),
- New IdNameStruct(MCH_SAW_CU.CONVEX, EgtMsg(MSG_MACHININGSDBPAGE + 140))})
- End If
- Return m_CurveUseList
- End Get
- End Property
-
- Private m_IsModifiedSelectedCurveUse As Boolean = False
- Private m_SelectedCurveUse As Integer
- ' Proprietà che indica il CurveUse (MCH_SAW_CU)
- Public Property SelectedCurveUse As Integer
- Get
- If IsNothing(CurveUseList) Then Return Nothing
- Return IdNameStruct.IdFromInd(m_SelectedCurveUse, CurveUseList)
- End Get
- Set(value As Integer)
- If value <> m_SelectedCurveUse Then
- If Not IsNothing(CurveUseList) Then
- m_SelectedCurveUse = IdNameStruct.IndFromId(value, CurveUseList)
- Dim OrigCurveUse As Integer = 0
- EgtGetMachiningParam(MCH_MP.CURVEUSE, OrigCurveUse)
- m_IsModifiedSelectedCurveUse = If(value <> OrigCurveUse, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox StepType
- Private m_StepTypeList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property StepTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Select Case m_Type
- Case MCH_MY.SAWING
- m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_SAW_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143)),
- New IdNameStruct(MCH_SAW_ST.TOANDFROM, EgtMsg(MSG_MACHININGSDBPAGE + 145))})
- Case MCH_MY.MILLING
- m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_MIL_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_MIL_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143)),
- New IdNameStruct(MCH_MIL_ST.SPIRAL, EgtMsg(MSG_MACHININGSDBPAGE + 144))})
- Case MCH_MY.MORTISING
- m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_MORTISE_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_MORTISE_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143))})
- Case MCH_MY.SAWROUGHING, MCH_MY.SAWFINISHING
- m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWROU_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_SAWROU_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143))})
- Case Else
- m_StepTypeList = Nothing
- End Select
- Return m_StepTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedStepType As Boolean = False
- Private m_SelectedStepType As Integer
- ' Proprietà che indica lo StepType
- Public Property SelectedStepType As Integer
- Get
- If IsNothing(StepTypeList) Then Return Nothing
- Return IdNameStruct.IdFromInd(m_SelectedStepType, StepTypeList)
- End Get
- Set(value As Integer)
- If value <> m_SelectedStepType Then
- If Not IsNothing(StepTypeList) Then
- m_SelectedStepType = value
- Dim OrigStepType As Integer = 0
- EgtGetMachiningParam(MCH_MP.STEPTYPE, OrigStepType)
- OrigStepType = IdNameStruct.IndFromId(OrigStepType, StepTypeList)
- m_IsModifiedSelectedStepType = (value <> OrigStepType)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox SubType
- Private m_SubTypeList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property SubTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Select Case m_Type
- Case MCH_MY.POCKETING
- m_SubTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_POCK_SUB.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_POCK_SUB.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143)),
- New IdNameStruct(MCH_POCK_SUB.SPIRALIN, EgtMsg(MSG_MACHININGSDBPAGE + 148)),
- New IdNameStruct(MCH_POCK_SUB.SPIRALOUT, EgtMsg(MSG_MACHININGSDBPAGE + 149))})
- Case MCH_MY.SAWFINISHING
- m_SubTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAWFIN_SUB.ALONG, EgtMsg(MSG_MACHININGSDBPAGE + 146)),
- New IdNameStruct(MCH_SAWFIN_SUB.ACROSS, EgtMsg(MSG_MACHININGSDBPAGE + 147))})
- Case MCH_MY.GENMACHINING
- Dim Index = 1
- Dim sGenScript As String = String.Empty
- m_SubTypeList = New ObservableCollection(Of IdNameStruct)
- While EgtUILib.GetPrivateProfileString(S_GENMACHINING, K_GENSCRIPT & Index, "", sGenScript, IniFile.m_sCurrMachIniFilePath) > 0
- m_SubTypeList.Add(New IdNameStruct(Index, sGenScript))
- Index += 1
- End While
- If m_SubTypeList.Count = 0 Then
- m_SubTypeList.Add(New IdNameStruct(0, ""))
- End If
- Case MCH_MY.SURFFINISHING
- m_SubTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SURFFIN_SUB.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
- New IdNameStruct(MCH_SURFFIN_SUB.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143)),
- New IdNameStruct(MCH_SURFFIN_SUB.SPIRALIN, EgtMsg(MSG_MACHININGSDBPAGE + 148)),
- New IdNameStruct(MCH_SURFFIN_SUB.SPIRALOUT, EgtMsg(MSG_MACHININGSDBPAGE + 149))})
- Case Else
- m_SubTypeList = Nothing
- End Select
- Return m_SubTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedSubType As Boolean = False
- Private m_SelectedSubType As Integer
- ' Proprietà che indica il SubType
- Public Property SelectedSubType As Integer
- Get
- If IsNothing(SubTypeList) Then Return Nothing
- Return m_SelectedSubType
- End Get
- Set(value As Integer)
- If value <> m_SelectedSubType Then
- If Not IsNothing(SubTypeList) Then
- m_SelectedSubType = value
- Dim OrigSubType As Integer = 0
- EgtGetMachiningParam(MCH_MP.SUBTYPE, OrigSubType)
- OrigSubType = IdNameStruct.IndFromId(OrigSubType, SubTypeList)
- m_IsModifiedSelectedSubType = If(value <> OrigSubType, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox LeadLinkType
- Private m_LeadLinkTypeList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property LeadLinkTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Select Case m_Type
- Case MCH_MY.SAWROUGHING
- m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAWROU_LL.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)),
- New IdNameStruct(MCH_SAWROU_LL.EXT, EgtMsg(MSG_MACHININGSDBPAGE + 123))})
- Case MCH_MY.SAWFINISHING
- m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SAWFIN_LL.STD, EgtMsg(MSG_MACHININGSDBPAGE + 124)),
- New IdNameStruct(MCH_SAWFIN_LL.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)),
- New IdNameStruct(MCH_SAWFIN_LL.EXT, EgtMsg(MSG_MACHININGSDBPAGE + 123))})
- Case MCH_MY.SURFFINISHING
- m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SURFFIN_LL.STD, EgtMsg(MSG_MACHININGSDBPAGE + 124)),
- New IdNameStruct(MCH_SURFFIN_LL.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120))})
- Case Else
- m_LeadLinkTypeList = Nothing
- End Select
- Return m_LeadLinkTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedLeadLinkType As Boolean = False
- Private m_SelectedLeadLinkType As Integer
- ' Proprietà che indica il LeadLinkType
- Public Property SelectedLeadLinkType As Integer
- Get
- If IsNothing(LeadLinkTypeList) Then Return Nothing
- Return IdNameStruct.IdFromInd(m_SelectedLeadLinkType, LeadLinkTypeList)
- End Get
- Set(value As Integer)
- If value <> m_SelectedLeadLinkType Then
- If Not IsNothing(LeadLinkTypeList) Then
- m_SelectedLeadLinkType = IdNameStruct.IndFromId(value, LeadLinkTypeList)
- Dim OrigLeadLinkType As Integer = 0
- EgtGetMachiningParam(MCH_MP.LEADLINKTYPE, OrigLeadLinkType)
- m_IsModifiedSelectedLeadLinkType = If(value <> OrigLeadLinkType, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox FaceUseType
- Private m_FaceUseTypeList As ObservableCollection(Of IdNameStruct)
- Public ReadOnly Property FaceUseTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Select Case m_Type
- Case MCH_MY.MORTISING
- m_FaceUseTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_MIL_FU.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 153)),
- New IdNameStruct(MCH_MIL_FU.PARAL_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 154))})
- Case Else
- m_FaceUseTypeList = New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_MIL_FU.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 153)),
- New IdNameStruct(MCH_MIL_FU.PARAL_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.PARAL_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
- New IdNameStruct(MCH_MIL_FU.ORTHO_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
- New IdNameStruct(MCH_MIL_FU.ORTHO_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
- New IdNameStruct(MCH_MIL_FU.ORTHO_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
- New IdNameStruct(MCH_MIL_FU.ORTHO_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
- New IdNameStruct(MCH_MIL_FU.ORTHO_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
- New IdNameStruct(MCH_MIL_FU.ORTHO_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
- New IdNameStruct(MCH_MIL_FU.ORTHO_CONT, EgtMsg(MSG_MACHININGSDBPAGE + 163) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
- New IdNameStruct(MCH_MIL_FU.ORTUP_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
- New IdNameStruct(MCH_MIL_FU.ORTUP_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
- New IdNameStruct(MCH_MIL_FU.ORTUP_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
- New IdNameStruct(MCH_MIL_FU.ORTUP_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
- New IdNameStruct(MCH_MIL_FU.ORTUP_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
- New IdNameStruct(MCH_MIL_FU.ORTUP_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
- New IdNameStruct(MCH_MIL_FU.ORTUP_CONT, EgtMsg(MSG_MACHININGSDBPAGE + 163) & EgtMsg(MSG_MACHININGSDBPAGE + 156))})
- End Select
- Return m_FaceUseTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedFaceUseType As Boolean = False
- Private m_SelectedFaceUseType As Integer = 0
-
- ' Proprietà che indica il FaceUseType (MCH_MIL_FU)
- Public Property SelectedFaceUseType As Integer
- Get
- If IsNothing(FaceUseTypeList) Then Return Nothing
- Return m_SelectedFaceUseType
- End Get
- Set(value As Integer)
- If value <> m_SelectedFaceUseType Then
- If Not IsNothing(FaceUseTypeList) Then
- m_SelectedFaceUseType = value
- Dim OrigFaceUseType As Integer = 0
- EgtGetMachiningParam(MCH_MP.FACEUSE, OrigFaceUseType)
- OrigFaceUseType = IdNameStruct.IndFromId(OrigFaceUseType, FaceUseTypeList)
- m_IsModifiedSelectedFaceUseType = If(value <> OrigFaceUseType, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- 'ObservableCollection che contiene le variabili per il combobox SolChoiceType
- Private m_SolChoiceTypeList As New ObservableCollection(Of IdNameStruct)(
- {New IdNameStruct(MCH_SCC.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 105)),
- New IdNameStruct(MCH_SCC.STD, EgtMsg(MSG_MACHININGSDBPAGE + 106)),
- New IdNameStruct(MCH_SCC.OPPOSITE, EgtMsg(MSG_MACHININGSDBPAGE + 107)),
- New IdNameStruct(MCH_SCC.ADIR_XP, EgtMsg(MSG_MACHININGSDBPAGE + 108)),
- New IdNameStruct(MCH_SCC.ADIR_XM, EgtMsg(MSG_MACHININGSDBPAGE + 109)),
- New IdNameStruct(MCH_SCC.ADIR_YP, EgtMsg(MSG_MACHININGSDBPAGE + 110)),
- New IdNameStruct(MCH_SCC.ADIR_YM, EgtMsg(MSG_MACHININGSDBPAGE + 111)),
- New IdNameStruct(MCH_SCC.ADIR_ZP, EgtMsg(MSG_MACHININGSDBPAGE + 112)),
- New IdNameStruct(MCH_SCC.ADIR_ZM, EgtMsg(MSG_MACHININGSDBPAGE + 113)),
- New IdNameStruct(MCH_SCC.ADIR_NEAR, EgtMsg(MSG_MACHININGSDBPAGE + 114)),
- New IdNameStruct(MCH_SCC.ADIR_FAR, EgtMsg(MSG_MACHININGSDBPAGE + 115))})
- Public ReadOnly Property SolChoiceTypeList As ObservableCollection(Of IdNameStruct)
- Get
- Return m_SolChoiceTypeList
- End Get
- End Property
-
- Private m_IsModifiedSelectedSolChoiceType As Boolean = False
- Private m_SelectedSolChoiceType As Integer
- ' Proprietà che indica il SolChoiceType (MCH_SCC)
- Public Property SelectedSolChoiceType As Integer
- Get
- If IsNothing(SolChoiceTypeList) Then Return Nothing
- Return m_SelectedSolChoiceType
- End Get
- Set(value As Integer)
- If value <> m_SelectedSolChoiceType Then
- If Not IsNothing(SolChoiceTypeList) Then
- m_SelectedSolChoiceType = value
- Dim OrigSolChoiceType As Integer = 0
- EgtGetMachiningParam(MCH_MP.SOLCHOICETYPE, OrigSolChoiceType)
- OrigSolChoiceType = IdNameStruct.IndFromId(OrigSolChoiceType, SolChoiceTypeList)
- m_IsModifiedSelectedSolChoiceType = If(value <> OrigSolChoiceType, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End If
- End Set
- End Property
-
- Private m_IsModifiedSpeed As Boolean = False
- Private m_Speed As String
- '''
- ''' Property that read and write to the Machining's database the Speed
- '''
- Public Property Speed As String
- Get
- Return m_Speed
- End Get
- Set(value As String)
- If value <> m_Speed Then
- m_Speed = value
- Dim OrigSpeed As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.SPEED, OrigSpeed)
- StringToDouble(value, dValue)
- m_IsModifiedSpeed = Math.Abs(dValue - OrigSpeed) > 10 * EPS_ANG_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedFeed As Boolean = False
- Private m_Feed As String
- '''
- ''' Property that read and write to the Machining's database the Feed
- '''
- Public Property Feed As String
- Get
- Return m_Feed
- End Get
- Set(value As String)
- If value <> m_Feed Then
- m_Feed = value
- Dim OrigFeed As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.FEED, OrigFeed)
- StringToLen(value, dValue)
- m_IsModifiedFeed = Math.Abs(dValue - OrigFeed) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedStartFeed As Boolean = False
- Private m_StartFeed As String
- '''
- ''' Property that read and write to the Machining's database the Start Feed
- '''
- Public Property StartFeed As String
- Get
- Return m_StartFeed
- End Get
- Set(value As String)
- If value <> m_StartFeed Then
- m_StartFeed = value
- Dim OrigStartFeed As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.STARTFEED, OrigStartFeed)
- StringToLen(value, dValue)
- m_IsModifiedStartFeed = Math.Abs(dValue - OrigStartFeed) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedEndFeed As Boolean = False
- Private m_EndFeed As String
- '''
- ''' Property that read and write to the Machining's database the End Feed
- '''
- Public Property EndFeed As String
- Get
- Return m_EndFeed
- End Get
- Set(value As String)
- If value <> m_EndFeed Then
- m_EndFeed = value
- Dim OrigEndFeed As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.ENDFEED, OrigEndFeed)
- StringToLen(value, dValue)
- m_IsModifiedEndFeed = Math.Abs(dValue - OrigEndFeed) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedTipFeed As Boolean = False
- Private m_TipFeed As String
- '''
- ''' Property that read and write to the Machining's database the Tip Feed
- '''
- Public Property TipFeed As String
- Get
- Return m_TipFeed
- End Get
- Set(value As String)
- If value <> m_TipFeed Then
- m_TipFeed = value
- Dim OrigTipFeed As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.TIPFEED, OrigTipFeed)
- StringToLen(value, dValue)
- m_IsModifiedTipFeed = Math.Abs(dValue - OrigTipFeed) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedOffSr As Boolean = False
- Private m_OffSr As String
- '''
- ''' Property that read and write to the Machining's database the Offset Sr
- '''
- Public Property OffSr As String
- Get
- Return m_OffSr
- End Get
- Set(value As String)
- If value <> m_OffSr Then
- m_OffSr = value
- Dim OrigOffSr As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.OFFSR, OrigOffSr)
- StringToLen(value, dValue)
- m_IsModifiedOffSr = Math.Abs(dValue - OrigOffSr) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedOffSl As Boolean = False
- Private m_OffSl As String
- '''
- ''' Property that read and write to the Machining's database the Offset Sl
- '''
- Public Property OffSl As String
- Get
- Return m_OffSl
- End Get
- Set(value As String)
- If value <> m_OffSl Then
- m_OffSl = value
- Dim OrigOffSl As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.OFFSL, OrigOffSl)
- StringToLen(value, dValue)
- m_IsModifiedOffSl = Math.Abs(dValue - OrigOffSl) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedSideAngle As Boolean = False
- Private m_SideAngle As String
- '''
- ''' Property that read and write to the Machining's database the Side Angle
- '''
- Public Property SideAngle As String
- Get
- Return m_SideAngle
- End Get
- Set(value As String)
- If value <> m_SideAngle Then
- m_SideAngle = value
- Dim OrigSideAngle As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.SIDEANGLE, OrigSideAngle)
- StringToLen(value, dValue)
- m_IsModifiedSideAngle = Math.Abs(dValue - OrigSideAngle) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedApprox As Boolean = False
- Private m_Approx As String
- '''
- ''' Property that read and write to the Machining's database the Approx
- '''
- Public Property Approx As String
- Get
- Return m_Approx
- End Get
- Set(value As String)
- If value <> m_Approx Then
- m_Approx = value
- Dim OrigApprox As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.APPROX, OrigApprox)
- StringToLen(value, dValue)
- m_IsModifiedApprox = Math.Abs(dValue - OrigApprox) > EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedStartPos As Boolean = False
- Private m_StartPos As String
- '''
- ''' Property that read and write to the Machining's database the Start Position
- '''
- Public Property StartPos As String
- Get
- Return m_StartPos
- End Get
- Set(value As String)
- If value <> m_StartPos Then
- m_StartPos = value
- Dim OrigStartPos As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.STARTPOS, OrigStartPos)
- StringToLen(value, dValue)
- m_IsModifiedStartPos = Math.Abs(dValue - OrigStartPos) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedStartSlowLen As Boolean = False
- Private m_StartSlowLen As String
- '''
- ''' Property that read and write to the Machining's database the Start Slow Len
- '''
- Public Property StartSlowLen As String
- Get
- Return m_StartSlowLen
- End Get
- Set(value As String)
- If value <> m_StartSlowLen Then
- m_StartSlowLen = value
- Dim OrigStartSlowLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.STARTSLOWLEN, OrigStartSlowLen)
- StringToLen(value, dValue)
- m_IsModifiedStartSlowLen = Math.Abs(dValue - OrigStartSlowLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedEndSlowLen As Boolean = False
- Private m_EndSlowLen As String
- '''
- ''' Property that read and write to the Machining's database the End Slow Len
- '''
- Public Property EndSlowLen As String
- Get
- Return m_EndSlowLen
- End Get
- Set(value As String)
- If value <> m_EndSlowLen Then
- m_EndSlowLen = value
- Dim OrigEndSlowLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.ENDSLOWLEN, OrigEndSlowLen)
- StringToLen(value, dValue)
- m_IsModifiedEndSlowLen = Math.Abs(dValue - OrigEndSlowLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedThrouAddLen As Boolean = False
- Private m_ThrouAddLen As String
- '''
- ''' Property that read and write to the Machining's database the Throu Add Len
- '''
- Public Property ThrouAddLen As String
- Get
- Return m_ThrouAddLen
- End Get
- Set(value As String)
- If value <> m_ThrouAddLen Then
- m_ThrouAddLen = value
- Dim OrigThrouAddLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.THROUADDLEN, OrigThrouAddLen)
- StringToLen(value, dValue)
- m_IsModifiedThrouAddLen = Math.Abs(dValue - OrigThrouAddLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedStepPar As Boolean = False
- Private m_StepPar As String
- '''
- ''' Property that read and write to the Machining's database the Step Par
- '''
- Public Property StepPar As String
- Get
- Return m_StepPar
- End Get
- Set(value As String)
- If value <> m_StepPar Then
- m_StepPar = value
- Dim OrigStepPar As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.STEP_, OrigStepPar)
- StringToLen(value, dValue)
- m_IsModifiedStepPar = Math.Abs(dValue - OrigStepPar) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedReturnPos As Boolean = False
- Private m_ReturnPos As String
- '''
- ''' Property that read and write to the Machining's database the Return Position
- '''
- Public Property ReturnPos As String
- Get
- Return m_ReturnPos
- End Get
- Set(value As String)
- If value <> m_ReturnPos Then
- m_ReturnPos = value
- Dim OrigReturnPos As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.RETURNPOS, OrigReturnPos)
- StringToLen(value, dValue)
- m_IsModifiedReturnPos = Math.Abs(dValue - OrigReturnPos) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedOverLap As Boolean = False
- Private m_OverLap As String
- '''
- ''' Property that read and write to the Machining's database the Over Lap Str
- '''
- Public Property OverLap As String
- Get
- Return m_OverLap
- End Get
- Set(value As String)
- If value = String.Empty Or value <> m_OverLap Then
- m_OverLap = value
- Dim OrigOverLap As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.OVERL, OrigOverLap)
- StringToLen(value, dValue)
- m_IsModifiedOverLap = Math.Abs(dValue - OrigOverLap) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedTabLen As Boolean = False
- Private m_TabLen As String
- '''
- ''' Property that read and write to the Machining's database the Tab Len
- '''
- Public Property TabLen As String
- Get
- Return m_TabLen
- End Get
- Set(value As String)
- If value <> m_TabLen Then
- m_TabLen = value
- Dim OrigTabLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.TABLEN, OrigTabLen)
- StringToLen(value, dValue)
- m_IsModifiedTabLen = Math.Abs(dValue - OrigTabLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedTabDist As Boolean = False
- Private m_TabDist As String
- '''
- ''' Property that read and write to the Machining's database the Tab Dist
- '''
- Public Property TabDist As String
- Get
- Return m_TabDist
- End Get
- Set(value As String)
- If value <> m_TabDist Then
- m_TabDist = value
- Dim OrigTabDist As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.TABDIST, OrigTabDist)
- StringToLen(value, dValue)
- m_IsModifiedTabDist = Math.Abs(dValue - OrigTabDist) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedTabHeight As Boolean = False
- Private m_TabHeight As String
- '''
- ''' Property that read and write to the Machining's database the Tab Height
- '''
- Public Property TabHeight As String
- Get
- Return m_TabHeight
- End Get
- Set(value As String)
- If value <> m_TabHeight Then
- m_TabHeight = value
- Dim OrigTabHeight As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.TABHEIGHT, OrigTabHeight)
- StringToLen(value, dValue)
- m_IsModifiedTabHeight = Math.Abs(dValue - OrigTabHeight) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedTabAngle As Boolean = False
- Private m_TabAngle As String
- '''
- ''' Property that read and write to the Machining's database the Tab Angle
- '''
- Public Property TabAngle As String
- Get
- Return m_TabAngle
- End Get
- Set(value As String)
- If value <> m_TabAngle Then
- m_TabAngle = value
- Dim OrigTabAngle As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.TABANGLE, OrigTabAngle)
- StringToDouble(value, dValue)
- m_IsModifiedTabAngle = Math.Abs(dValue - OrigTabAngle) > 10 * EPS_ANG_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedTabMax As Boolean = False
- Private m_TabMax As String
- '''
- ''' Property that read and write to the Machining's database the Tab Max
- '''
- Public Property TabMax As String
- Get
- Return m_TabMax
- End Get
- Set(value As String)
- If value <> m_TabMax Then
- m_TabMax = value
- Dim OrigTabMax As Integer = 0
- Dim nValue As Integer = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.TABMAX, OrigTabMax)
- Int32.TryParse(value, nValue)
- m_IsModifiedTabMax = Math.Abs(nValue - OrigTabMax) > 10 * EPS_ANG_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedTabMin As Boolean = False
- Private m_TabMin As String
- '''
- ''' Property that read and write to the Machining's database the Tab Min
- '''
- Public Property TabMin As String
- Get
- Return m_TabMin
- End Get
- Set(value As String)
- If value <> m_TabMin Then
- m_TabMin = value
- Dim OrigTabMin As Integer = 0
- Dim nValue As Integer = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.TABMIN, OrigTabMin)
- Int32.TryParse(value, nValue)
- m_IsModifiedTabMin = Math.Abs(nValue - OrigTabMin) > 10 * EPS_ANG_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLiTang As Boolean = False
- Private m_LiTang As String
- '''
- ''' Property that read and write to the Machining's database the Li Tang
- '''
- Public Property LiTang As String
- Get
- Return m_LiTang
- End Get
- Set(value As String)
- If value <> m_LiTang Then
- m_LiTang = value
- Dim OrigLiTang As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LITANG, OrigLiTang)
- StringToLen(value, dValue)
- m_IsModifiedLiTang = Math.Abs(dValue - OrigLiTang) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLiPerp As Boolean = False
- Private m_LiPerp As String
- '''
- ''' Property that read and write to the Machining's database the Li Perp
- '''
- Public Property LiPerp As String
- Get
- Return m_LiPerp
- End Get
- Set(value As String)
- If value <> m_LiPerp Then
- m_LiPerp = value
- Dim OrigLiPerp As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LIPERP, OrigLiPerp)
- StringToLen(value, dValue)
- m_IsModifiedLiPerp = Math.Abs(dValue - OrigLiPerp) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLiElev As Boolean = False
- Private m_LiElev As String
- '''
- ''' Property that read and write to the Machining's database the Li Elev
- '''
- Public Property LiElev As String
- Get
- Return m_LiElev
- End Get
- Set(value As String)
- If value <> m_LiElev Then
- m_LiElev = value
- Dim OrigLiElev As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LIELEV, OrigLiElev)
- StringToLen(value, dValue)
- m_IsModifiedLiElev = Math.Abs(dValue - OrigLiElev) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLiCompLen As Boolean = False
- Private m_LiCompLen As String
- '''
- ''' Property that read and write to the Machining's database the Li Comp Len
- '''
- Public Property LiCompLen As String
- Get
- Return m_LiCompLen
- End Get
- Set(value As String)
- If value <> m_LiCompLen Then
- m_LiCompLen = value
- Dim OrigLiCompLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LICOMPLEN, OrigLiCompLen)
- StringToLen(value, dValue)
- m_IsModifiedLiCompLen = Math.Abs(dValue - OrigLiCompLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLoTang As Boolean = False
- Private m_LoTang As String
- '''
- ''' Property that read and write to the Machining's database the Lo Tang
- '''
- Public Property LoTang As String
- Get
- Return m_LoTang
- End Get
- Set(value As String)
- If value <> m_LoTang Then
- m_LoTang = value
- Dim OrigLoTang As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LOTANG, OrigLoTang)
- StringToLen(value, dValue)
- m_IsModifiedLoTang = Math.Abs(dValue - OrigLoTang) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLoPerp As Boolean = False
- Private m_LoPerp As String
- '''
- ''' Property that read and write to the Machining's database the Lo Perp
- '''
- Public Property LoPerp As String
- Get
- Return m_LoPerp
- End Get
- Set(value As String)
- If value <> m_LoPerp Then
- m_LoPerp = value
- Dim OrigLoPerp As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LOPERP, OrigLoPerp)
- StringToLen(value, dValue)
- m_IsModifiedLoPerp = Math.Abs(dValue - OrigLoPerp) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLoElev As Boolean = False
- Private m_LoElev As String
- '''
- ''' Property that read and write to the Machining's database the Lo Elev
- '''
- Public Property LoElev As String
- Get
- Return m_LoElev
- End Get
- Set(value As String)
- If value <> m_LoElev Then
- m_LoElev = value
- Dim OrigLoElev As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LOELEV, OrigLoElev)
- StringToLen(value, dValue)
- m_IsModifiedLoElev = Math.Abs(dValue - OrigLoElev) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedLoCompLen As Boolean = False
- Private m_LoCompLen As String
- '''
- ''' Property that read and write to the Machining's database the Lo Comp Len
- '''
- Public Property LoCompLen As String
- Get
- Return m_LoCompLen
- End Get
- Set(value As String)
- If value <> m_LoCompLen Then
- m_LoCompLen = value
- Dim OrigLoCompLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.LOCOMPLEN, OrigLoCompLen)
- StringToLen(value, dValue)
- m_IsModifiedLoCompLen = Math.Abs(dValue - OrigLoCompLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedStartAddLen As Boolean = False
- Private m_StartAddLen As String
- '''
- ''' Property that read and write to the Machining's database the Start Add Len
- '''
- Public Property StartAddLen As String
- Get
- Return m_StartAddLen
- End Get
- Set(value As String)
- If value <> m_StartAddLen Then
- m_StartAddLen = value
- Dim OrigStartAddLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.STARTADDLEN, OrigStartAddLen)
- StringToLen(value, dValue)
- m_IsModifiedStartAddLen = Math.Abs(dValue - OrigStartAddLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedEndAddLen As Boolean = False
- Private m_EndAddLen As String
- '''
- ''' Property that read and write to the Machining's database the End Add Len
- '''
- Public Property EndAddLen As String
- Get
- Return m_EndAddLen
- End Get
- Set(value As String)
- If value <> m_EndAddLen Then
- m_EndAddLen = value
- Dim OrigEndAddLen As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.ENDADDLEN, OrigEndAddLen)
- StringToLen(value, dValue)
- m_IsModifiedEndAddLen = Math.Abs(dValue - OrigEndAddLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedStepExtArc As Boolean = False
- Private m_StepExtArc As String
- '''
- ''' Property that read and write to the Machining's database the Step Ext Arc
- '''
- Public Property StepExtArc As String
- Get
- Return m_StepExtArc
- End Get
- Set(value As String)
- If value <> m_StepExtArc Then
- m_StepExtArc = value
- Dim OrigStepExtArc As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.STEPEXTARC, OrigStepExtArc)
- StringToLen(value, dValue)
- m_IsModifiedStepExtArc = Math.Abs(dValue - OrigStepExtArc) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedStepIntArc As Boolean = False
- Private m_StepIntArc As String
- '''
- ''' Property that read and write to the Machining's database the Step Int Arc
- '''
- Public Property StepIntArc As String
- Get
- Return m_StepIntArc
- End Get
- Set(value As String)
- If value <> m_StepIntArc Then
- m_StepIntArc = value
- Dim OrigStepIntArc As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.STEPINTARC, OrigStepIntArc)
- StringToLen(value, dValue)
- m_IsModifiedStepIntArc = Math.Abs(dValue - OrigStepIntArc) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedSideStep As Boolean = False
- Private m_SideStep As String
- '''
- ''' Property that read and write to the Machining's database the Side Step
- '''
- Public Property SideStep As String
- Get
- Return m_SideStep
- End Get
- Set(value As String)
- If value <> m_SideStep Then
- m_SideStep = value
- Dim OrigSideStep As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.SIDESTEP, OrigSideStep)
- StringToLen(value, dValue)
- m_IsModifiedSideStep = Math.Abs(dValue - OrigSideStep) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedVertFeed As Boolean = False
- Private m_VertFeed As String
- '''
- ''' Property that read and write to the Machining's database the Vert Feed
- '''
- Public Property VertFeed As String
- Get
- Return m_VertFeed
- End Get
- Set(value As String)
- If value <> m_VertFeed Then
- m_VertFeed = value
- Dim OrigVertFeed As Double = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.VERTFEED, OrigVertFeed)
- StringToLen(value, dValue)
- m_IsModifiedVertFeed = Math.Abs(dValue - OrigVertFeed) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedOscHeight As Boolean = False
- Private m_OscHeight As String
- '''
- ''' Property that read and write to the Machining's database the Oscillation Height
- '''
- Public Property OscHeight As String
- Get
- Return m_OscHeight
- End Get
- Set(value As String)
- If value <> m_OscHeight Then
- m_OscHeight = value
- Dim OrigOscHeight As Double = 0
- Dim dValue As Double = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.OSCHEIGHT, OrigOscHeight)
- StringToLen(value, dValue)
- m_IsModifiedOscHeight = Math.Abs(dValue - OrigOscHeight) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedOscRampLen As Boolean = False
- Private m_OscRampLen As String
- '''
- ''' Property that read and write to the Machining's database the Oscillation Ramp Length
- '''
- Public Property OscRampLen As String
- Get
- Return m_OscRampLen
- End Get
- Set(value As String)
- If value <> m_OscRampLen Then
- m_OscRampLen = value
- Dim OrigOscRampLen As Double = 0
- Dim dValue As Double = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.OSCRAMPLEN, OrigOscRampLen)
- StringToLen(value, dValue)
- m_IsModifiedOscRampLen = Math.Abs(dValue - OrigOscRampLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedOscFlatLen As Boolean = False
- Private m_OscFlatLen As String
- '''
- ''' Property that read and write to the Machining's database the Oscillation Flat Length
- '''
- Public Property OscFlatLen As String
- Get
- Return m_OscFlatLen
- End Get
- Set(value As String)
- If value <> m_OscFlatLen Then
- m_OscFlatLen = value
- Dim OrigOscFlatLen As Double = 0
- Dim dValue As Double = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.OSCFLATLEN, OrigOscFlatLen)
- StringToLen(value, dValue)
- m_IsModifiedOscFlatLen = Math.Abs(dValue - OrigOscFlatLen) > 10 * EPS_SMALL
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedDepthStr As Boolean = False
- Private m_DepthStr As String
- '''
- ''' Property that read and write to the Machining's database the Depth Str
- '''
- Public Property DepthStr As String
- Get
- Return m_DepthStr
- End Get
- Set(value As String)
- If value = String.Empty Or value <> m_DepthStr Then
- m_DepthStr = value
- Dim DbDepthStr As String = String.Empty
- EgtGetMachiningParam(MCH_MP.DEPTH_STR, DbDepthStr)
- m_IsModifiedDepthStr = If(value <> DbDepthStr, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedUserNotes As Boolean = False
- Private m_UserNotes As String
- '''
- ''' Property that read and write to the Machining's database the User Notes
- '''
- Public Property UserNotes As String
- Get
- Return m_UserNotes
- End Get
- Set(value As String)
- If value = String.Empty Or value <> m_UserNotes Then
- m_UserNotes = value
- Dim OrigUserNotes As String = String.Empty
- EgtGetMachiningParam(MCH_MP.USERNOTES, OrigUserNotes)
- m_IsModifiedUserNotes = If(value <> OrigUserNotes, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedInitAngs As Boolean = False
- Private m_InitAngs As String
- '''
- ''' Property that read and write to the Machining's database the Initial Angles
- '''
- Public Property InitAngs As String
- Get
- Return m_InitAngs
- End Get
- Set(value As String)
- If value = String.Empty Or value <> m_InitAngs Then
- m_InitAngs = value
- Dim OrigInitAngs As String = String.Empty
- EgtGetMachiningParam(MCH_MP.INITANGS, OrigInitAngs)
- m_IsModifiedInitAngs = If(value <> OrigInitAngs, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
- End Set
- End Property
-
- Private m_IsModifiedBlockedAxis As Boolean = False
- Private m_BlockedAxis As String
- '''
- ''' Property that read and write to the Machining's database the Initial Angles
- '''
- Public Property BlockedAxis As String
- Get
- Return m_BlockedAxis
- End Get
- Set(value As String)
- If value = String.Empty Or value <> m_BlockedAxis Then
- m_BlockedAxis = value
- Dim OrigBlockedAxis As String = String.Empty
- EgtGetMachiningParam(MCH_MP.BLOCKEDAXIS, OrigBlockedAxis)
- m_IsModifiedBlockedAxis = If(value <> OrigBlockedAxis, True, False)
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End If
+ m_CurrOperation_IsModified = value
End Set
End Property
+ Private m_UpdateMachiningBtn_Background As SolidColorBrush = Brushes.LightGray
Public ReadOnly Property UpdateMachiningBtn_Background As SolidColorBrush
Get
- If m_IsModifiedInvert OrElse m_IsModifiedSelectedWorkSide OrElse m_IsModifiedSelectedHeadSide OrElse m_IsModifiedSelectedLeadInType OrElse m_IsModifiedSelectedExtLinkType _
- OrElse m_IsModifiedSelectedLeadOutType OrElse m_IsModifiedSelectedCurveUse OrElse m_IsModifiedSelectedStepType OrElse m_IsModifiedSelectedSubType OrElse m_IsModifiedSelectedLeadLinkType _
- OrElse m_IsModifiedSpeed OrElse m_IsModifiedFeed OrElse m_IsModifiedStartFeed OrElse m_IsModifiedEndFeed OrElse m_IsModifiedTipFeed OrElse m_IsModifiedOffSr OrElse m_IsModifiedOffSl _
- OrElse m_IsModifiedSideAngle OrElse m_IsModifiedApprox OrElse m_IsModifiedStartPos OrElse m_IsModifiedStartSlowLen OrElse m_IsModifiedEndSlowLen OrElse m_IsModifiedThrouAddLen _
- OrElse m_IsModifiedStepPar OrElse m_IsModifiedReturnPos OrElse m_IsModifiedOverLap OrElse m_IsModifiedTabLen OrElse m_IsModifiedTabDist OrElse m_IsModifiedTabHeight _
- OrElse m_IsModifiedTabAngle OrElse m_IsModifiedLiTang OrElse m_IsModifiedLiPerp OrElse m_IsModifiedLiElev OrElse m_IsModifiedLiCompLen OrElse m_IsModifiedLoTang OrElse m_IsModifiedLoPerp _
- OrElse m_IsModifiedLoElev OrElse m_IsModifiedLoCompLen OrElse m_IsModifiedStartAddLen OrElse m_IsModifiedEndAddLen OrElse m_IsModifiedStepExtArc OrElse m_IsModifiedStepIntArc _
- OrElse m_IsModifiedSideStep OrElse m_IsModifiedVertFeed OrElse m_IsModifiedDepthStr OrElse m_IsModifiedUserNotes OrElse m_IsModifiedTabMax OrElse m_IsModifiedTabMin Then
+ If m_CurrOperation_IsModified Then
Return Brushes.Gold
Else
Return Brushes.LightGray
@@ -1618,351 +57,114 @@ Public Class MachiningParameterExpanderVM
End Set
End Property
+ Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
+ Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
+ Dim WoodMillParamExpanderV As WoodMillingParameterExpanderV
+ Dim BeamMillParamExpanderV As BeamMillingParameterExpanderV
+ Dim PocketParamExpanderV As PocketingParameterExpanderV
+ Dim MortiseParamExpanderV As MortisingParameterExpanderV
+ Dim ChiselParamExpanderV As ChiselingParameterExpanderV
+ Dim StoneSawParamExpanderV As StoneSawingParameterExpanderV
+ Dim StoneSawFinishParamExpanderV As StoneSawFinishingParameterExpanderV
+ Dim StoneSawRoughParamExpanderV As StoneSawRoughingParameterExpanderV
+ Dim StoneMillParamExpanderV As StoneMillingParameterExpanderV
+ Dim StoneDrillParamExpanderV As StoneDrillingParameterExpanderV
+ Dim WjParamExpanderV As WaterjettingParameterExpanderV
+
+ Public ReadOnly Property ParamExpanderPageV As ContentControl
+ Get
+
+ Dim sName = String.Empty
+ Dim nType As Integer
+ EgtGetMachiningParam(MCH_MP.NAME, sName)
+ EgtGetMachiningParam(MCH_MP.TYPE, nType)
+ m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY))
+
+ WoodDrillParamExpanderV.DataContext = Nothing
+ WoodSawParamExpanderV.DataContext = Nothing
+ WoodMillParamExpanderV.DataContext = Nothing
+ BeamMillParamExpanderV.DataContext = Nothing
+ PocketParamExpanderV.DataContext = Nothing
+ MortiseParamExpanderV.DataContext = Nothing
+ ChiselParamExpanderV.DataContext = Nothing
+ StoneSawParamExpanderV.DataContext = Nothing
+ StoneSawFinishParamExpanderV.DataContext = Nothing
+ StoneSawRoughParamExpanderV.DataContext = Nothing
+ StoneMillParamExpanderV.DataContext = Nothing
+ StoneDrillParamExpanderV.DataContext = Nothing
+ WjParamExpanderV.DataContext = Nothing
+
+ m_CurrOperation.ReadOperationParam()
+
+ IsModified(False)
+
+ ' EgtGetMachiningParam(MCH_MP.TYPE, m_Type)
+ If IsNothing(nType) Then Return Nothing
+
+ Dim MatType As MaterialType = OperationExpanderVM.m_MatType
+
+ Select Case nType
+ Case MCH_OY.DRILLING
+ If MatType = MaterialType.STONE Then
+ StoneDrillParamExpanderV.DataContext = m_CurrOperation
+ Return StoneDrillParamExpanderV
+ Else
+ WoodDrillParamExpanderV.DataContext = m_CurrOperation
+ Return WoodDrillParamExpanderV
+ End If
+ Case MCH_OY.SAWING
+ If MatType = MaterialType.STONE Then
+ StoneSawParamExpanderV.DataContext = m_CurrOperation
+ Return StoneSawParamExpanderV
+ Else
+ WoodSawParamExpanderV.DataContext = m_CurrOperation
+ Return WoodSawParamExpanderV
+ End If
+ Case MCH_OY.MILLING
+ If MatType = MaterialType.BEAM Then
+ BeamMillParamExpanderV.DataContext = m_CurrOperation
+ Return BeamMillParamExpanderV
+ ElseIf MatType = MaterialType.STONE Then
+ StoneMillParamExpanderV.DataContext = m_CurrOperation
+ Return StoneMillParamExpanderV
+ Else
+ WoodMillParamExpanderV.DataContext = m_CurrOperation
+ Return WoodMillParamExpanderV
+ End If
+ Case MCH_OY.SAWROUGHING
+ StoneSawRoughParamExpanderV.DataContext = m_CurrOperation
+ Return StoneSawRoughParamExpanderV
+ Case MCH_OY.SAWFINISHING
+ StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
+ Return StoneSawFinishParamExpanderV
+ Case MCH_OY.POCKETING
+ PocketParamExpanderV.DataContext = m_CurrOperation
+ Return PocketParamExpanderV
+ Case MCH_OY.MORTISING
+ MortiseParamExpanderV.DataContext = m_CurrOperation
+ Return MortiseParamExpanderV
+ Case MCH_OY.CHISELING
+ ChiselParamExpanderV.DataContext = m_CurrOperation
+ Return ChiselParamExpanderV
+ Case MCH_OY.WATERJETTING
+ WjParamExpanderV.DataContext = m_CurrOperation
+ Return WjParamExpanderV
+ End Select
+
+ 'MachiningParameterExpanderItem.ReadOperationParam()
+
+ Return Nothing
+ End Get
+ End Property
+
#Region "Messages"
- Public ReadOnly Property InvertMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 51)
- End Get
- End Property
-
- Public ReadOnly Property DepthMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 99)
- End Get
- End Property
-
- Public ReadOnly Property HeadSideMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 55)
- End Get
- End Property
-
- Public ReadOnly Property WorkSideMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 54)
- End Get
- End Property
-
- Public ReadOnly Property UserNotesMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 100)
- End Get
- End Property
-
- Private m_UserNotesTooltip As String
- Public ReadOnly Property UserNotesTooltip As String
- Get
- Return UserNotes
- End Get
- End Property
-
- Public ReadOnly Property StartPosMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 73)
- End Get
- End Property
-
- Public ReadOnly Property ReturnPosMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 78)
- End Get
- End Property
-
- Public ReadOnly Property OverLapMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 101)
- End Get
- End Property
-
- Public ReadOnly Property ThrouAddLenMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 76)
- End Get
- End Property
-
- Public ReadOnly Property StepTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 60)
- End Get
- End Property
-
- Public ReadOnly Property SubTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 103)
- End Get
- End Property
-
- Public ReadOnly Property LeadLinkTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 62)
- End Get
- End Property
-
- Public ReadOnly Property StepParMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 77)
- End Get
- End Property
-
- Public ReadOnly Property SideStepMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 95)
- End Get
- End Property
-
- Public ReadOnly Property StartSlowLenMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 74)
- End Get
- End Property
-
- Public ReadOnly Property EndSlowLenMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 75)
- End Get
- End Property
-
- Public ReadOnly Property SideAngleMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 71)
- End Get
- End Property
-
- Public ReadOnly Property OffsetSrMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 68)
- End Get
- End Property
-
- Public ReadOnly Property OffsetSlMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 69)
- End Get
- End Property
-
- Public ReadOnly Property AdvancedParamMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 150)
- End Get
- End Property
-
- Public ReadOnly Property InvertToolDirMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 151)
- End Get
- End Property
-
- Public ReadOnly Property FaceUseTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 152)
- End Get
- End Property
-
- Public ReadOnly Property InitAngsMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 164)
- End Get
- End Property
-
- Public ReadOnly Property BlockedAxisMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 165)
- End Get
- End Property
-
- Public ReadOnly Property SolChoiceTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 104)
- End Get
- End Property
-
- Public ReadOnly Property LeadInTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 56)
- End Get
- End Property
-
- Public ReadOnly Property StartAddLenMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 91)
- End Get
- End Property
-
- Public ReadOnly Property LiTangMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 83)
- End Get
- End Property
-
- Public ReadOnly Property LiPerpMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 84)
- End Get
- End Property
-
- Public ReadOnly Property LiElevMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 85)
- End Get
- End Property
-
- Public ReadOnly Property LiCompLenMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 86)
- End Get
- End Property
-
- Public ReadOnly Property LeadOutTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 58)
- End Get
- End Property
-
- Public ReadOnly Property EndAddLenMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 92)
- End Get
- End Property
-
- Public ReadOnly Property LoTangMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 87)
- End Get
- End Property
-
- Public ReadOnly Property LoPerpMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 88)
- End Get
- End Property
-
- Public ReadOnly Property LoElevMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 89)
- End Get
- End Property
-
- Public ReadOnly Property LoCompLenMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 90)
- End Get
- End Property
-
- Public ReadOnly Property ExtLinkTypeMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 57)
- End Get
- End Property
-
- Public ReadOnly Property LeaveTabMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 52)
- End Get
- End Property
-
- Public ReadOnly Property TabLenMsg As String
- Get
- Return EgtMsg( 31279)
- End Get
- End Property
-
- Public ReadOnly Property TabHeightMsg As String
- Get
- Return EgtMsg( 31280)
- End Get
- End Property
-
- Public ReadOnly Property TabAngleMsg As String
- Get
- Return EgtMsg( 31281)
- End Get
- End Property
-
- Public ReadOnly Property TabDistMsg As String
- Get
- Return EgtMsg( 31282)
- End Get
- End Property
-
- Public ReadOnly Property CurveUseMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 59)
- End Get
- End Property
-
- Public ReadOnly Property ApproxMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 72)
- End Get
- End Property
-
- Public ReadOnly Property StepExtArcMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 93)
- End Get
- End Property
-
- Public ReadOnly Property StepIntArcMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 94)
- End Get
- End Property
-
- Public ReadOnly Property SpeedMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 63)
- End Get
- End Property
-
- Public ReadOnly Property FeedMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 64)
- End Get
- End Property
-
- Public ReadOnly Property TipFeedMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 67)
- End Get
- End Property
-
- Public ReadOnly Property StartFeedMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 65)
- End Get
- End Property
-
- Public ReadOnly Property EndFeedMsg As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 66)
- End Get
- End Property
-
- Public ReadOnly Property OperationListHeader As String
- Get
- Return EgtMsg(MSG_OPERATION + 1) 'Lista Operazioni
- End Get
- End Property
-
Public ReadOnly Property UpdateMachiningBtnMsg As String
Get
Return EgtMsg(MSG_OPERATION + 3) 'Applica Lavorazione
End Get
End Property
- Public ReadOnly Property GenericExpanderHeader As String
- Get
- Return EgtMsg(MSG_OPERATION + 7) 'Generici
- End Get
- End Property
-
- Public ReadOnly Property ToolExpanderHeader As String
- Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 98) & " (" & m_Tool & ")"
- End Get
- End Property
-
Public ReadOnly Property ViewToolBtnMsg As String
Get
Return EgtMsg(MSG_OPERATION + 13) 'Anteprima Utensile
@@ -1981,630 +183,8 @@ Public Class MachiningParameterExpanderVM
End Get
End Property
- Public ReadOnly Property OscEnableMsg As String
- Get
- Return EgtMsg(6378) ' Oscillazione
- End Get
- End Property
-
- Public ReadOnly Property OscHeightMsg As String
- Get
- Return EgtMsg(6379) ' Ampiezza di oscillazione
- End Get
- End Property
-
- Public ReadOnly Property OscRampLenMsg As String
- Get
- Return EgtMsg(6380) ' Lunghezza rampa di oscillazione
- End Get
- End Property
-
- Public ReadOnly Property OscFlatLenMsg As String
- Get
- Return EgtMsg(6381) ' Lunghezza cresta di oscillazione
- End Get
- End Property
-
- Public ReadOnly Property TabMaxMsg As String
- Get
- Return EgtMsg(6366)
- End Get
- End Property
-
- Public ReadOnly Property TabMinMsg As String
- Get
- Return EgtMsg(6367)
- End Get
- End Property
-
#End Region ' Messages
-#Region "METHODS"
-
- Private Sub ReadMachiningParam()
- Dim nValue As Integer = 0
- Dim dValue As Double = 0
- EgtGetMachiningParam(MCH_MP.TYPE, m_Type)
- NotifyPropertyChanged("Type")
- EgtGetMachiningParam(MCH_MP.INVERT, m_Invert)
- NotifyPropertyChanged("Invert")
- m_IsModifiedInvert = False
- EgtGetMachiningParam(MCH_MP.LEAVETAB, m_LeaveTab)
- NotifyPropertyChanged("LeaveTab")
- m_IsModifiedLeaveTab = False
- EgtGetMachiningParam(MCH_MP.TOOLINVERT, m_ToolInvert)
- NotifyPropertyChanged("ToolInvert")
- m_IsModifiedToolInvert = False
- EgtGetMachiningParam(MCH_MP.OSCENABLE, m_OscEnable)
- NotifyPropertyChanged("OscEnable")
- m_IsModifiedOscEnable = False
- NotifyPropertyChanged("WorkSideList")
- EgtGetMachiningParam(MCH_MP.WORKSIDE, nValue)
- m_SelectedWorkSide = If(IsNothing(WorkSideList), nValue, IdNameStruct.IndFromId(nValue, WorkSideList))
- NotifyPropertyChanged("SelectedWorkSide")
- m_IsModifiedSelectedWorkSide = False
- EgtGetMachiningParam(MCH_MP.HEADSIDE, nValue)
- m_SelectedHeadSide = If(IsNothing(HeadSideList), nValue, IdNameStruct.IndFromId(nValue, HeadSideList))
- NotifyPropertyChanged("SelectedHeadSide")
- m_IsModifiedSelectedHeadSide = False
- NotifyPropertyChanged("LeadInTypeList")
- EgtGetMachiningParam(MCH_MP.LEADINTYPE, m_SelectedLeadInType)
- NotifyPropertyChanged("SelectedLeadInType")
- m_IsModifiedSelectedLeadInType = False
- EgtGetMachiningParam(MCH_MP.EXTLINKTYPE, m_SelectedExtLinkType)
- NotifyPropertyChanged("SelectedExtLinkType")
- m_IsModifiedSelectedExtLinkType = False
- NotifyPropertyChanged("LeadOutTypeList")
- EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, m_SelectedLeadOutType)
- NotifyPropertyChanged("SelectedLeadOutType")
- m_IsModifiedSelectedLeadOutType = False
- NotifyPropertyChanged("CurveUseList")
- EgtGetMachiningParam(MCH_MP.CURVEUSE, m_SelectedCurveUse)
- NotifyPropertyChanged("SelectedCurveUse")
- m_IsModifiedSelectedCurveUse = False
- NotifyPropertyChanged("StepTypeList")
- EgtGetMachiningParam(MCH_MP.STEPTYPE, nValue)
- m_SelectedStepType = If(IsNothing(StepTypeList), nValue, IdNameStruct.IndFromId(nValue, StepTypeList))
- NotifyPropertyChanged("SelectedStepType")
- m_IsModifiedSelectedStepType = False
- NotifyPropertyChanged("SubTypeList")
- EgtGetMachiningParam(MCH_MP.SUBTYPE, nValue)
- m_SelectedSubType = If(IsNothing(SubTypeList), nValue, IdNameStruct.IndFromId(nValue, SubTypeList))
- NotifyPropertyChanged("SelectedSubType")
- m_IsModifiedSelectedSubType = False
- NotifyPropertyChanged("LeadLinkTypeList")
- EgtGetMachiningParam(MCH_MP.LEADLINKTYPE, m_SelectedLeadLinkType)
- NotifyPropertyChanged("SelectedLeadLinkType")
- m_IsModifiedSelectedLeadLinkType = False
- NotifyPropertyChanged("FaceUseTypeList")
- EgtGetMachiningParam(MCH_MP.FACEUSE, nValue)
- m_SelectedFaceUseType = If(IsNothing(FaceUseTypeList), nValue, IdNameStruct.IndFromId(nValue, FaceUseTypeList))
- NotifyPropertyChanged("SelectedFaceUseType")
- m_IsModifiedSelectedFaceUseType = False
- NotifyPropertyChanged("SolChoiceTypeList")
- EgtGetMachiningParam(MCH_MP.SOLCHOICETYPE, nValue)
- m_SelectedSolChoiceType = If(IsNothing(SolChoiceTypeList), nValue, IdNameStruct.IndFromId(nValue, SolChoiceTypeList))
- NotifyPropertyChanged("SelectedSolChoiceType")
- m_IsModifiedSelectedSolChoiceType = False
- EgtGetMachiningParam(MCH_MP.SPEED, dValue)
- m_Speed = DoubleToString(dValue, 4)
- NotifyPropertyChanged("Speed")
- m_IsModifiedSpeed = False
- EgtGetMachiningParam(MCH_MP.FEED, dValue)
- m_Feed = LenToString(dValue, 4)
- NotifyPropertyChanged("Feed")
- m_IsModifiedFeed = False
- EgtGetMachiningParam(MCH_MP.STARTFEED, dValue)
- m_StartFeed = LenToString(dValue, 4)
- NotifyPropertyChanged("StartFeed")
- m_IsModifiedStartFeed = False
- EgtGetMachiningParam(MCH_MP.ENDFEED, dValue)
- m_EndFeed = LenToString(dValue, 4)
- NotifyPropertyChanged("EndFeed")
- m_IsModifiedEndFeed = False
- EgtGetMachiningParam(MCH_MP.TIPFEED, dValue)
- m_TipFeed = LenToString(dValue, 4)
- NotifyPropertyChanged("TipFeed")
- m_IsModifiedTipFeed = False
- EgtGetMachiningParam(MCH_MP.OFFSR, dValue)
- m_OffSr = LenToString(dValue, 4)
- NotifyPropertyChanged("OffSr")
- m_IsModifiedOffSr = False
- EgtGetMachiningParam(MCH_MP.OFFSL, dValue)
- m_OffSl = LenToString(dValue, 4)
- NotifyPropertyChanged("OffSl")
- m_IsModifiedOffSl = False
- EgtGetMachiningParam(MCH_MP.SIDEANGLE, dValue)
- m_SideAngle = DoubleToString(dValue, 4)
- NotifyPropertyChanged("SideAngle")
- m_IsModifiedSideAngle = False
- EgtGetMachiningParam(MCH_MP.APPROX, dValue)
- m_Approx = LenToString(dValue, 4)
- NotifyPropertyChanged("Approx")
- m_IsModifiedApprox = False
- EgtGetMachiningParam(MCH_MP.STARTPOS, dValue)
- m_StartPos = LenToString(dValue, 4)
- NotifyPropertyChanged("StartPos")
- m_IsModifiedStartPos = False
- EgtGetMachiningParam(MCH_MP.STARTSLOWLEN, dValue)
- m_StartSlowLen = LenToString(dValue, 4)
- NotifyPropertyChanged("StartSlowLen")
- m_IsModifiedStartSlowLen = False
- EgtGetMachiningParam(MCH_MP.ENDSLOWLEN, dValue)
- m_EndSlowLen = LenToString(dValue, 4)
- NotifyPropertyChanged("EndSlowLen")
- m_IsModifiedEndSlowLen = False
- EgtGetMachiningParam(MCH_MP.THROUADDLEN, dValue)
- m_ThrouAddLen = LenToString(dValue, 4)
- NotifyPropertyChanged("ThrouAddLen")
- m_IsModifiedThrouAddLen = False
- EgtGetMachiningParam(MCH_MP.STEP_, dValue)
- m_StepPar = LenToString(dValue, 4)
- NotifyPropertyChanged("StepPar")
- m_IsModifiedStepPar = False
- EgtGetMachiningParam(MCH_MP.RETURNPOS, dValue)
- m_ReturnPos = LenToString(dValue, 4)
- NotifyPropertyChanged("ReturnPos")
- m_IsModifiedReturnPos = False
- EgtGetMachiningParam(MCH_MP.OVERL, dValue)
- m_OverLap = LenToString(dValue, 4)
- NotifyPropertyChanged("OverLap")
- m_IsModifiedOverLap = False
- EgtGetMachiningParam(MCH_MP.TABLEN, dValue)
- m_TabLen = LenToString(dValue, 4)
- NotifyPropertyChanged("TabLen")
- m_IsModifiedTabLen = False
- EgtGetMachiningParam(MCH_MP.TABDIST, dValue)
- m_TabDist = LenToString(dValue, 4)
- NotifyPropertyChanged("TabDist")
- m_IsModifiedTabDist = False
- EgtGetMachiningParam(MCH_MP.TABHEIGHT, dValue)
- m_TabHeight = LenToString(dValue, 4)
- NotifyPropertyChanged("TabHeight")
- m_IsModifiedTabHeight = False
- EgtGetMachiningParam(MCH_MP.TABANGLE, dValue)
- m_TabAngle = DoubleToString(dValue, 4)
- NotifyPropertyChanged("TabAngle")
- m_IsModifiedTabAngle = False
- EgtGetMachiningParam(MCH_MP.TABMAX, nValue)
- m_TabMax = nValue.ToString()
- NotifyPropertyChanged("TabMax")
- m_IsModifiedTabMax = False
- EgtGetMachiningParam(MCH_MP.TABMIN, nValue)
- m_TabMin = nValue.ToString()
- NotifyPropertyChanged("TabMin")
- m_IsModifiedTabMin = False
- EgtGetMachiningParam(MCH_MP.LITANG, dValue)
- m_LiTang = LenToString(dValue, 4)
- NotifyPropertyChanged("LiTang")
- m_IsModifiedLiTang = False
- EgtGetMachiningParam(MCH_MP.LIPERP, dValue)
- m_LiPerp = LenToString(dValue, 4)
- NotifyPropertyChanged("LiPerp")
- m_IsModifiedLiPerp = False
- EgtGetMachiningParam(MCH_MP.LIELEV, dValue)
- m_LiElev = LenToString(dValue, 4)
- NotifyPropertyChanged("LiElev")
- m_IsModifiedLiElev = False
- EgtGetMachiningParam(MCH_MP.LICOMPLEN, dValue)
- m_LiCompLen = LenToString(dValue, 4)
- NotifyPropertyChanged("LiCompLen")
- m_IsModifiedLiCompLen = False
- EgtGetMachiningParam(MCH_MP.LOTANG, dValue)
- m_LoTang = LenToString(dValue, 4)
- NotifyPropertyChanged("LoTang")
- m_IsModifiedLoTang = False
- EgtGetMachiningParam(MCH_MP.LOPERP, dValue)
- m_LoPerp = LenToString(dValue, 4)
- NotifyPropertyChanged("LoPerp")
- m_IsModifiedLoPerp = False
- EgtGetMachiningParam(MCH_MP.LOELEV, dValue)
- m_LoElev = LenToString(dValue, 4)
- NotifyPropertyChanged("LoElev")
- m_IsModifiedLoElev = False
- EgtGetMachiningParam(MCH_MP.LOCOMPLEN, dValue)
- m_LoCompLen = LenToString(dValue, 4)
- NotifyPropertyChanged("LoCompLen")
- m_IsModifiedLoCompLen = False
- EgtGetMachiningParam(MCH_MP.STARTADDLEN, dValue)
- m_StartAddLen = LenToString(dValue, 4)
- NotifyPropertyChanged("StartAddLen")
- m_IsModifiedStartAddLen = False
- EgtGetMachiningParam(MCH_MP.ENDADDLEN, dValue)
- m_EndAddLen = LenToString(dValue, 4)
- NotifyPropertyChanged("EndAddLen")
- m_IsModifiedEndAddLen = False
- EgtGetMachiningParam(MCH_MP.STEPEXTARC, dValue)
- m_StepExtArc = LenToString(dValue, 4)
- NotifyPropertyChanged("StepExtArc")
- m_IsModifiedStepExtArc = False
- EgtGetMachiningParam(MCH_MP.STEPEXTARC, dValue)
- m_StepExtArc = LenToString(dValue, 4)
- NotifyPropertyChanged("StepExtArc")
- m_IsModifiedStepExtArc = False
- EgtGetMachiningParam(MCH_MP.STEPINTARC, dValue)
- m_StepIntArc = LenToString(dValue, 4)
- NotifyPropertyChanged("StepIntArc")
- m_IsModifiedStepIntArc = False
- EgtGetMachiningParam(MCH_MP.SIDESTEP, dValue)
- m_SideStep = LenToString(dValue, 4)
- NotifyPropertyChanged("SideStep")
- m_IsModifiedSideStep = False
- EgtGetMachiningParam(MCH_MP.VERTFEED, dValue)
- m_VertFeed = LenToString(dValue, 4)
- NotifyPropertyChanged("VertFeed")
- m_IsModifiedVertFeed = False
- EgtGetMachiningParam(MCH_MP.OSCHEIGHT, dValue)
- m_OscHeight = LenToString(dValue, 4)
- NotifyPropertyChanged("OscHeight")
- m_IsModifiedOscHeight = False
- EgtGetMachiningParam(MCH_MP.OSCRAMPLEN, dValue)
- m_OscRampLen = LenToString(dValue, 4)
- NotifyPropertyChanged("OscRampLen")
- m_IsModifiedOscRampLen = False
- EgtGetMachiningParam(MCH_MP.OSCFLATLEN, dValue)
- m_OscFlatLen = LenToString(dValue, 4)
- NotifyPropertyChanged("OscFlatLen")
- m_IsModifiedOscFlatLen = False
- EgtGetMachiningParam(MCH_MP.TOOL, m_Tool)
- NotifyPropertyChanged("ToolExpanderHeader")
- EgtGetMachiningParam(MCH_MP.DEPTH_STR, m_DepthStr)
- NotifyPropertyChanged("DepthStr")
- m_IsModifiedDepthStr = False
- EgtGetMachiningParam(MCH_MP.USERNOTES, m_UserNotes)
- NotifyPropertyChanged("UserNotes")
- m_IsModifiedUserNotes = False
- EgtGetMachiningParam(MCH_MP.INITANGS, m_InitAngs)
- NotifyPropertyChanged("InitAngs")
- m_IsModifiedInitAngs = False
- EgtGetMachiningParam(MCH_MP.BLOCKEDAXIS, m_BlockedAxis)
- NotifyPropertyChanged("BlockedAxis")
- m_IsModifiedBlockedAxis = False
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
- End Sub
-
- Private Sub WriteMachiningParam()
- Dim nValue As Integer = 0
- Dim dValue As Double = 0
- If m_IsModifiedInvert Then
- If EgtSetMachiningParam(MCH_MP.INVERT, m_Invert) Then
- m_IsModifiedInvert = False
- End If
- End If
- If m_IsModifiedLeaveTab Then
- If EgtSetMachiningParam(MCH_MP.LEAVETAB, m_LeaveTab) Then
- m_IsModifiedLeaveTab = False
- End If
- End If
- If m_IsModifiedToolInvert Then
- If EgtSetMachiningParam(MCH_MP.TOOLINVERT, m_ToolInvert) Then
- m_IsModifiedToolInvert = False
- End If
- End If
- If m_IsModifiedOscEnable Then
- If EgtSetMachiningParam(MCH_MP.OSCENABLE, m_OscEnable) Then
- m_IsModifiedOscEnable = False
- End If
- End If
- If m_IsModifiedSelectedWorkSide Then
- nValue = If(IsNothing(WorkSideList), m_SelectedWorkSide, IdNameStruct.IdFromInd(m_SelectedWorkSide, WorkSideList))
- If EgtSetMachiningParam(MCH_MP.WORKSIDE, nValue) Then
- m_IsModifiedSelectedWorkSide = False
- End If
- End If
- If m_IsModifiedSelectedHeadSide Then
- nValue = If(IsNothing(HeadSideList), m_SelectedHeadSide, IdNameStruct.IdFromInd(m_SelectedHeadSide, HeadSideList))
- If EgtSetMachiningParam(MCH_MP.HEADSIDE, nValue) Then
- m_IsModifiedSelectedHeadSide = False
- End If
- End If
- If m_IsModifiedSelectedLeadInType Then
- If EgtSetMachiningParam(MCH_MP.LEADINTYPE, m_SelectedLeadInType) Then
- m_IsModifiedSelectedLeadInType = False
- End If
- End If
- If m_IsModifiedSelectedExtLinkType Then
- If EgtSetMachiningParam(MCH_MP.EXTLINKTYPE, m_SelectedExtLinkType) Then
- m_IsModifiedSelectedExtLinkType = False
- End If
- End If
- If m_IsModifiedSelectedLeadOutType Then
- If EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, m_SelectedLeadOutType) Then
- m_IsModifiedSelectedLeadOutType = False
- End If
- End If
- If m_IsModifiedSelectedCurveUse Then
- If EgtSetMachiningParam(MCH_MP.CURVEUSE, m_SelectedCurveUse) Then
- m_IsModifiedSelectedCurveUse = False
- End If
- End If
- If m_IsModifiedSelectedStepType Then
- nValue = If(IsNothing(StepTypeList), m_SelectedStepType, IdNameStruct.IdFromInd(m_SelectedStepType, StepTypeList))
- If EgtSetMachiningParam(MCH_MP.STEPTYPE, nValue) Then
- m_IsModifiedSelectedStepType = False
- End If
- End If
- If m_IsModifiedSelectedSubType Then
- nValue = If(IsNothing(SubTypeList), m_SelectedSubType, IdNameStruct.IdFromInd(m_SelectedSubType, SubTypeList))
- If EgtSetMachiningParam(MCH_MP.SUBTYPE, nValue) Then
- m_IsModifiedSelectedSubType = False
- End If
- End If
- If m_IsModifiedSelectedLeadLinkType Then
- If EgtSetMachiningParam(MCH_MP.LEADLINKTYPE, m_SelectedLeadLinkType) Then
- m_IsModifiedSelectedLeadLinkType = False
- End If
- End If
- If m_IsModifiedSelectedFaceUseType Then
- nValue = If(IsNothing(FaceUseTypeList), m_SelectedFaceUseType, IdNameStruct.IdFromInd(m_SelectedFaceUseType, FaceUseTypeList))
- If EgtSetMachiningParam(MCH_MP.FACEUSE, nValue) Then
- m_IsModifiedSelectedFaceUseType = False
- End If
- End If
- If m_IsModifiedSelectedSolChoiceType Then
- nValue = If(IsNothing(SolChoiceTypeList), m_SelectedSolChoiceType, IdNameStruct.IdFromInd(m_SelectedSolChoiceType, SolChoiceTypeList))
- If EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, nValue) Then
- m_IsModifiedSelectedSolChoiceType = False
- End If
- End If
- If m_IsModifiedSpeed Then
- StringToDouble(m_Speed, dValue)
- If EgtSetMachiningParam(MCH_MP.SPEED, dValue) Then
- m_IsModifiedSpeed = False
- End If
- End If
- If m_IsModifiedFeed Then
- StringToLen(m_Feed, dValue)
- If EgtSetMachiningParam(MCH_MP.FEED, dValue) Then
- m_IsModifiedFeed = False
- End If
- End If
- If m_IsModifiedStartFeed Then
- StringToLen(m_StartFeed, dValue)
- If EgtSetMachiningParam(MCH_MP.STARTFEED, dValue) Then
- m_IsModifiedStartFeed = False
- End If
- End If
- If m_IsModifiedEndFeed Then
- StringToLen(m_EndFeed, dValue)
- If EgtSetMachiningParam(MCH_MP.ENDFEED, dValue) Then
- m_IsModifiedEndFeed = False
- End If
- End If
- If m_IsModifiedTipFeed Then
- StringToLen(m_TipFeed, dValue)
- If EgtSetMachiningParam(MCH_MP.TIPFEED, dValue) Then
- m_IsModifiedTipFeed = False
- End If
- End If
- If m_IsModifiedOffSr Then
- StringToLen(m_OffSr, dValue)
- If EgtSetMachiningParam(MCH_MP.OFFSR, dValue) Then
- m_IsModifiedOffSr = False
- End If
- End If
- If m_IsModifiedOffSl Then
- StringToLen(m_OffSl, dValue)
- If EgtSetMachiningParam(MCH_MP.OFFSL, dValue) Then
- m_IsModifiedOffSl = False
- End If
- End If
- If m_IsModifiedSideAngle Then
- StringToDouble(m_SideAngle, dValue)
- If EgtSetMachiningParam(MCH_MP.SIDEANGLE, dValue) Then
- m_IsModifiedSideAngle = False
- End If
- End If
- If m_IsModifiedApprox Then
- StringToLen(m_Approx, dValue)
- If EgtSetMachiningParam(MCH_MP.APPROX, dValue) Then
- m_IsModifiedApprox = False
- End If
- End If
- If m_IsModifiedStartPos Then
- StringToLen(m_StartPos, dValue)
- If EgtSetMachiningParam(MCH_MP.STARTPOS, dValue) Then
- m_IsModifiedStartPos = False
- End If
- End If
- If m_IsModifiedStartSlowLen Then
- StringToLen(m_StartSlowLen, dValue)
- If EgtSetMachiningParam(MCH_MP.STARTSLOWLEN, dValue) Then
- m_IsModifiedStartSlowLen = False
- End If
- End If
- If m_IsModifiedEndSlowLen Then
- StringToLen(m_EndSlowLen, dValue)
- If EgtSetMachiningParam(MCH_MP.ENDSLOWLEN, dValue) Then
- m_IsModifiedEndSlowLen = False
- End If
- End If
- If m_IsModifiedThrouAddLen Then
- StringToLen(m_ThrouAddLen, dValue)
- If EgtSetMachiningParam(MCH_MP.THROUADDLEN, dValue) Then
- m_IsModifiedThrouAddLen = False
- End If
- End If
- If m_IsModifiedStepPar Then
- StringToLen(m_StepPar, dValue)
- If EgtSetMachiningParam(MCH_MP.STEP_, dValue) Then
- m_IsModifiedStepPar = False
- End If
- End If
- If m_IsModifiedReturnPos Then
- StringToLen(m_ReturnPos, dValue)
- If EgtSetMachiningParam(MCH_MP.RETURNPOS, dValue) Then
- m_IsModifiedReturnPos = False
- End If
- End If
- If m_IsModifiedOverLap Then
- StringToLen(m_OverLap, dValue)
- If EgtSetMachiningParam(MCH_MP.OVERL, dValue) Then
- m_IsModifiedOverLap = False
- End If
- End If
- If m_IsModifiedTabLen Then
- StringToLen(m_TabLen, dValue)
- If EgtSetMachiningParam(MCH_MP.TABLEN, dValue) Then
- m_IsModifiedTabLen = False
- End If
- End If
- If m_IsModifiedTabDist Then
- StringToLen(m_TabDist, dValue)
- If EgtSetMachiningParam(MCH_MP.TABDIST, dValue) Then
- m_IsModifiedTabDist = False
- End If
- End If
- If m_IsModifiedTabHeight Then
- StringToLen(m_TabHeight, dValue)
- If EgtSetMachiningParam(MCH_MP.TABHEIGHT, dValue) Then
- m_IsModifiedTabHeight = False
- End If
- End If
- If m_IsModifiedTabAngle Then
- StringToDouble(m_TabAngle, dValue)
- If EgtSetMachiningParam(MCH_MP.TABANGLE, dValue) Then
- m_IsModifiedTabAngle = False
- End If
- End If
- If m_IsModifiedTabMax Then
- Int32.TryParse(TabMax, nValue)
- If EgtSetMachiningParam(MCH_MP.TABMAX, nValue) Then
- m_IsModifiedTabMax = False
- End If
- End If
- If m_IsModifiedTabMin Then
- Int32.TryParse(TabMin, nValue)
- If EgtSetMachiningParam(MCH_MP.TABMIN, nValue) Then
- m_IsModifiedTabMin = False
- End If
- End If
- If m_IsModifiedLiTang Then
- StringToLen(m_LiTang, dValue)
- If EgtSetMachiningParam(MCH_MP.LITANG, dValue) Then
- m_IsModifiedLiTang = False
- End If
- End If
- If m_IsModifiedLiPerp Then
- StringToLen(m_LiPerp, dValue)
- If EgtSetMachiningParam(MCH_MP.LIPERP, dValue) Then
- m_IsModifiedLiPerp = False
- End If
- End If
- If m_IsModifiedLiElev Then
- StringToLen(m_LiElev, dValue)
- If EgtSetMachiningParam(MCH_MP.LIELEV, dValue) Then
- m_IsModifiedLiElev = False
- End If
- End If
- If m_IsModifiedLiCompLen Then
- StringToLen(m_LiCompLen, dValue)
- If EgtSetMachiningParam(MCH_MP.LICOMPLEN, dValue) Then
- m_IsModifiedLiCompLen = False
- End If
- End If
- If m_IsModifiedLoTang Then
- StringToLen(m_LoTang, dValue)
- If EgtSetMachiningParam(MCH_MP.LOTANG, dValue) Then
- m_IsModifiedLoTang = False
- End If
- End If
- If m_IsModifiedLoPerp Then
- StringToLen(m_LoPerp, dValue)
- If EgtSetMachiningParam(MCH_MP.LOPERP, dValue) Then
- m_IsModifiedLoPerp = False
- End If
- End If
- If m_IsModifiedLoElev Then
- StringToLen(m_LoElev, dValue)
- If EgtSetMachiningParam(MCH_MP.LOELEV, dValue) Then
- m_IsModifiedLoElev = False
- End If
- End If
- If m_IsModifiedLoCompLen Then
- StringToLen(m_LoCompLen, dValue)
- If EgtSetMachiningParam(MCH_MP.LOCOMPLEN, dValue) Then
- m_IsModifiedLoCompLen = False
- End If
- End If
- If m_IsModifiedStartAddLen Then
- StringToLen(m_StartAddLen, dValue)
- If EgtSetMachiningParam(MCH_MP.STARTADDLEN, dValue) Then
- m_IsModifiedStartAddLen = False
- End If
- End If
- If m_IsModifiedEndAddLen Then
- StringToLen(m_EndAddLen, dValue)
- If EgtSetMachiningParam(MCH_MP.ENDADDLEN, dValue) Then
- m_IsModifiedEndAddLen = False
- End If
- End If
- If m_IsModifiedStepExtArc Then
- StringToLen(m_StepExtArc, dValue)
- If EgtSetMachiningParam(MCH_MP.STEPEXTARC, dValue) Then
- m_IsModifiedEndAddLen = False
- End If
- End If
- If m_IsModifiedStepIntArc Then
- StringToLen(m_StepIntArc, dValue)
- If EgtSetMachiningParam(MCH_MP.STEPINTARC, dValue) Then
- m_IsModifiedStepIntArc = False
- End If
- End If
- If m_IsModifiedSideStep Then
- StringToLen(m_SideStep, dValue)
- If EgtSetMachiningParam(MCH_MP.SIDESTEP, dValue) Then
- m_IsModifiedSideStep = False
- End If
- End If
- If m_IsModifiedVertFeed Then
- StringToLen(m_VertFeed, dValue)
- If EgtSetMachiningParam(MCH_MP.VERTFEED, dValue) Then
- m_IsModifiedVertFeed = False
- End If
- End If
- If m_IsModifiedOscHeight Then
- StringToLen(m_OscHeight, dValue)
- If EgtSetMachiningParam(MCH_MP.OSCHEIGHT, dValue) Then
- m_IsModifiedOscHeight = False
- End If
- End If
- If m_IsModifiedOscRampLen Then
- StringToLen(m_OscRampLen, dValue)
- If EgtSetMachiningParam(MCH_MP.OSCRAMPLEN, dValue) Then
- m_IsModifiedOscRampLen = False
- End If
- End If
- If m_IsModifiedOscFlatLen Then
- StringToLen(m_OscFlatLen, dValue)
- If EgtSetMachiningParam(MCH_MP.OSCFLATLEN, dValue) Then
- m_IsModifiedOscFlatLen = False
- End If
- End If
- If m_IsModifiedDepthStr Then
- If EgtSetMachiningParam(MCH_MP.DEPTH_STR, m_DepthStr) Then
- m_IsModifiedDepthStr = False
- End If
- End If
- If m_IsModifiedUserNotes Then
- If EgtSetMachiningParam(MCH_MP.USERNOTES, m_UserNotes) Then
- m_IsModifiedUserNotes = False
- End If
- End If
- If m_IsModifiedInitAngs Then
- If EgtSetMachiningParam(MCH_MP.INITANGS, m_InitAngs) Then
- m_IsModifiedInitAngs = False
- End If
- End If
- If m_IsModifiedBlockedAxis Then
- If EgtSetMachiningParam(MCH_MP.BLOCKEDAXIS, m_BlockedAxis) Then
- m_IsModifiedBlockedAxis = False
- End If
- End If
- End Sub
-
-#End Region ' Commands
-
' Definizione comando
Private m_cmdNextStepTool As ICommand
Private m_cmdPrevStepTool As ICommand
@@ -2612,8 +192,23 @@ Public Class MachiningParameterExpanderVM
#Region "CONSTRUCTOR"
- Sub New(ByRef m_UpdateParamValues As Action)
- m_UpdateParamValues = AddressOf ReadMachiningParam
+ Sub New()
+
+ WoodDrillParamExpanderV = New WoodDrillingParameterExpanderV
+ WoodSawParamExpanderV = New WoodSawingParameterExpanderV
+ WoodMillParamExpanderV = New WoodMillingParameterExpanderV
+ BeamMillParamExpanderV = New BeamMillingParameterExpanderV
+ PocketParamExpanderV = New PocketingParameterExpanderV
+ MortiseParamExpanderV = New MortisingParameterExpanderV
+ ChiselParamExpanderV = New ChiselingParameterExpanderV
+ StoneSawParamExpanderV = New StoneSawingParameterExpanderV
+ StoneSawFinishParamExpanderV = New StoneSawFinishingParameterExpanderV
+ StoneSawRoughParamExpanderV = New StoneSawRoughingParameterExpanderV
+ StoneMillParamExpanderV = New StoneMillingParameterExpanderV
+ StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
+ WjParamExpanderV = New WaterjettingParameterExpanderV
+
+ NotifyPropertyChanged("ParamExpanderPageV")
End Sub
#End Region ' Constructor
@@ -2694,9 +289,9 @@ Public Class MachiningParameterExpanderVM
Public Sub UpdateMachining(ByVal param As Object)
Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift)
' La modifica di alcuni parametri forza il ricalcolo della geometria
- Dim ModifiedGeometry As Boolean = m_IsModifiedSelectedFaceUseType
+ Dim ModifiedGeometry As Boolean = m_CurrOperation.m_IsModifiedSelectedFaceUseType
' aggiorno valori modificati
- WriteMachiningParam()
+ m_CurrOperation.WriteOperationParam()
' Carico tutta la geometria selezionata in una lista
Dim SelectedGeometry As New List(Of Integer)
Dim EntityIndex As Integer = EgtGetFirstSelectedObj()
@@ -2773,7 +368,7 @@ Public Class MachiningParameterExpanderVM
If m_bPreviewTool Then
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
End If
- NotifyPropertyChanged("UpdateMachiningBtn_Background")
+ IsModified(False) ' NotifyPropertyChanged("UpdateMachiningBtn_Background")
EgtDraw()
Application.Msn.NotifyColleagues(Application.EMITTITLE)
End Sub
@@ -2782,10 +377,10 @@ Public Class MachiningParameterExpanderVM
#End Region ' Commands
- Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
-
- Public Sub NotifyPropertyChanged(propName As String)
- RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
+ Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified
+ m_CurrOperation_IsModified = IsModified
+ ' NotifyPropertyChanged("CurrOperation_IsModified")
+ NotifyPropertyChanged("UpdateMachiningBtn_Background")
End Sub
End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml
new file mode 100644
index 0000000..24ce701
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml
@@ -0,0 +1,252 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..110754d
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class MortisingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml
new file mode 100644
index 0000000..2a0730a
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml
@@ -0,0 +1,272 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..ae7e5bc
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class PocketingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml
new file mode 100644
index 0000000..fcd35a9
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..3a5ac30
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class StoneDrillingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml
new file mode 100644
index 0000000..794ac78
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml
@@ -0,0 +1,185 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..5127626
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class StoneMillingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml
new file mode 100644
index 0000000..72289c4
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml
@@ -0,0 +1,226 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..67c46a1
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class StoneSawFinishingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml
new file mode 100644
index 0000000..62933af
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml
@@ -0,0 +1,216 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..ab01e29
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class StoneSawRoughingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml
new file mode 100644
index 0000000..83a3d20
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml
@@ -0,0 +1,250 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..2db20f2
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class StoneSawingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml
new file mode 100644
index 0000000..705ac68
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml
@@ -0,0 +1,295 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..7e97d14
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class WaterjettingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml
new file mode 100644
index 0000000..6d68510
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml
@@ -0,0 +1,213 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..3b75aec
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class WoodDrillingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml
new file mode 100644
index 0000000..512a10b
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml
@@ -0,0 +1,402 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..a520d53
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class WoodMillingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml
new file mode 100644
index 0000000..b53b9e7
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml
@@ -0,0 +1,290 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..14543f1
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5
+Imports EgtWPFLib5.EgtFloating
+
+Public Class WoodSawingParameterExpanderV
+
+ Private EgtFloatingTray As EgtFloatingTray
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
+ PanelHeight = EgtFloatingPanel.ActualHeight
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderVM.vb
index b7b9a30..f5e1d49 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderVM.vb
@@ -1,6 +1,7 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
+Imports EgtWPFLib5
Public Class OperationExpanderVM
Inherits ViewModelBase
@@ -8,6 +9,16 @@ Public Class OperationExpanderVM
' Modalità di aggiunta attiva/disattiva
Private m_NewMachining As Boolean = False
+ Friend Shared m_MatType As MaterialType = Nothing
+ Public Property MatType As MaterialType
+ Get
+ Return m_MatType
+ End Get
+ Set(value As MaterialType)
+ m_MatType = value
+ End Set
+ End Property
+
Private Sub StartNewMachining()
m_NewMachining = True
' Deseleziono le geometrie
@@ -335,19 +346,20 @@ Public Class OperationExpanderVM
Else
If IsNothing(m_MachiningParameterExpander) Then
m_MachiningParameterExpander = New MachiningParameterExpanderV
- m_MachiningParameterExpander.DataContext = New MachiningParameterExpanderVM(m_UpdateParamValues)
+ m_MachiningParameterExpanderVM = New MachiningParameterExpanderVM()
+ m_MachiningParameterExpander.DataContext = m_MachiningParameterExpanderVM
End If
- m_UpdateParamValues()
+ m_MachiningParameterExpanderVM.NotifyPropertyChanged("ParamExpanderPageV")
Return m_MachiningParameterExpander
End If
End Get
End Property
' Actions
- Private m_UpdateParamValues As Action
Private m_OpenDispositionFunction As Action(Of Boolean)
Private m_MachiningParameterExpander As MachiningParameterExpanderV
+ Private m_MachiningParameterExpanderVM As MachiningParameterExpanderVM
Private m_DispositionParameterExpander As DispositionParameterExpanderV
#Region "Messages"
@@ -1181,6 +1193,28 @@ Public Class OperationExpanderVM
End If
Id = EgtGetNextOperation(Id)
End While
+ LoadMaterialType()
+ End Sub
+
+ Private Sub LoadMaterialType()
+ Dim sMatType As String = "Wood"
+ ' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name
+ ' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini"
+ Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath
+
+ EgtUILib.GetPrivateProfileString(S_GENERAL, EgtWPFLib5.EstConstMachIni.K_MATERIAL, sMatType, sMatType, sMachineIniPath)
+ Select Case sMatType
+ Case "Stone"
+ m_MatType = MaterialType.STONE
+ Case "Wood"
+ m_MatType = MaterialType.WOOD
+ Case "Beam"
+ m_MatType = MaterialType.BEAM
+ Case Else
+ ' Se il materiale spcificato nel file INI della macchina non corrisponde ai 2 sopracitati viene emesso un messaggio di errore
+ m_MatType = Nothing
+ MsgBox(EgtMsg(31409), MsgBoxStyle.Exclamation, EgtMsg(31551))
+ End Select
End Sub
Private Sub SelectOperation(nSelectedOperation As Integer)
diff --git a/Utility/Dictionary.xaml b/Utility/Dictionary.xaml
index 0fb94de..313162d 100644
--- a/Utility/Dictionary.xaml
+++ b/Utility/Dictionary.xaml
@@ -1129,4 +1129,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Utility/Utility.vb b/Utility/Utility.vb
index 2c3d19b..1e9e037 100644
--- a/Utility/Utility.vb
+++ b/Utility/Utility.vb
@@ -94,6 +94,22 @@ Public Module Utility
Return List(Ind).Id
End Function
+ Public Shared Function IndFromId(Id As Integer, List As ObservableCollection(Of Object)) As Integer
+ For i = 0 To List.Count - 1
+ If TypeOf (List(i)) Is IdNameStruct AndAlso DirectCast(List(i), IdNameStruct).Id = Id Then
+ Return i
+ End If
+ Next
+ Return 0
+ End Function
+
+ Public Shared Function IdFromInd(Ind As Integer, List As ObservableCollection(Of Object)) As Integer
+ If TypeOf (List(Ind)) Is IdNameStruct Then
+ Return DirectCast(List(Ind), IdNameStruct).Id
+ End If
+ Return 0
+ End Function
+
End Structure
#Region "Positioning test"