diff --git a/Application.xaml.vb b/Application.xaml.vb
index 7222589..5fd3c4b 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -156,6 +156,8 @@ Class Application
' MachiningTreeViewExpander
Friend Const MACHININGTREEVIEWEXPANDERISENABLED As String = "MachiningTreeViewExpanderIsEnabled"
Friend Const NEWMACHININGMODEISACTIVE As String = "NewMachiningModeIsActive"
+ Friend Const SIMULATIONEXPANDER_GET_ISEXPANDED As String = "Get_SimulationExpander_IsExpanded"
+ Friend Const SIMULATIONEXPANDER_SET_ISEXPANDED As String = "Set_SimulationExpander_IsExpanded"
' StatusBar messages
Friend Const STATUSGRIDCOMMAND As String = "StatusGridCommand"
@@ -172,7 +174,6 @@ Class Application
' ToolsDbPage messages
Friend Const REMOVETOOL As String = "RemoveTool"
Friend Const ERRORONTOOL As String = "ErrorOnTool"
- Friend Const SAVETOOLDRAW As String = "SaveToolDraw"
' MachiningsDbPage messages
Friend Const REMOVEMACHINING As String = "RemoveMachining"
diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj
index cd17f22..d0b840b 100644
--- a/EgtCAM5.vbproj
+++ b/EgtCAM5.vbproj
@@ -154,6 +154,14 @@
GridPanelView.xaml
+
+ PopUpGridPanelView.xaml
+
+
+
+ PopUpViewPanelView.xaml
+
+ ViewPanelView.xaml
@@ -261,6 +269,14 @@
DesignerMSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+ DesignerMSBuild:Compile
diff --git a/EgtCAM5Resources.xaml b/EgtCAM5Resources.xaml
index a028eee..4bcf44c 100644
--- a/EgtCAM5Resources.xaml
+++ b/EgtCAM5Resources.xaml
@@ -20,11 +20,13 @@
it in xaml file(ProjectView.xaml).
-->
+
+
@@ -101,6 +103,7 @@
+
@@ -148,6 +151,7 @@
+
@@ -220,7 +224,7 @@
diff --git a/ProjectPage/DoorsPanel/DoorsPanelView.xaml b/ProjectPage/DoorsPanel/DoorsPanelView.xaml
index ac8f534..39af833 100644
--- a/ProjectPage/DoorsPanel/DoorsPanelView.xaml
+++ b/ProjectPage/DoorsPanel/DoorsPanelView.xaml
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
+
-
-
-
-
-
diff --git a/ProjectPage/GridPanel/GridPanelViewModel.vb b/ProjectPage/GridPanel/GridPanelViewModel.vb
index e35937a..7d16a5c 100644
--- a/ProjectPage/GridPanel/GridPanelViewModel.vb
+++ b/ProjectPage/GridPanel/GridPanelViewModel.vb
@@ -54,11 +54,6 @@ Namespace EgtCAM5
Return EgtMsg(MSG_GRIDVIEWPANEL + 24)
End Get
End Property
- Public ReadOnly Property CPlaneViewToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 25)
- End Get
- End Property
Public ReadOnly Property CPlaneElevationToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 26)
@@ -69,26 +64,6 @@ Namespace EgtCAM5
Return EgtMsg(MSG_GRIDVIEWPANEL + 27)
End Get
End Property
- Public ReadOnly Property CPlaneRotateToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 28)
- End Get
- End Property
- Public ReadOnly Property CPlane3PointsToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 29)
- End Get
- End Property
- Public ReadOnly Property CPlanePerpCurveToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 30)
- End Get
- End Property
- Public ReadOnly Property CPlaneObjectToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 31)
- End Get
- End Property
#End Region ' Tooltip
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
index e9f1d3e..4fe3df8 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
@@ -5,7 +5,7 @@
-
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml
index 5e5c386..b96ad48 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml
@@ -14,16 +14,25 @@
-
+
+
+
+
+
+
-
+
+
+
+
+
-
-
+
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
index 2f7cabd..0cee9f8 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
@@ -98,6 +98,7 @@ Namespace EgtCAM5
If value <> m_IsChecked Then
Application.Msn.NotifyColleagues(Application.SETLASTBOOLEAN, value)
m_IsChecked = value
+ Application.Msn.NotifyColleagues(Application.SHOW, TextBox)
OnPropertyChanged("IsChecked")
End If
End Set
@@ -135,6 +136,7 @@ Namespace EgtCAM5
End Get
Set(value As Integer)
Application.Msn.NotifyColleagues(Application.SETLASTINTEGER, value)
+ Application.Msn.NotifyColleagues(Application.SHOW, TextBox)
m_ComboSelectedIndex = value
OnPropertyChanged("ComboSelectedIndex")
End Set
@@ -281,17 +283,17 @@ Namespace EgtCAM5
If PrepareInputBoxParam.bShowBtn Then
ShowBtnVisibility = Visibility.Visible
End If
- FocusTextBox = True
IsEnabled = True
IsExpanded = True
+ FocusTextBox = True
End Sub
Private Sub ResetInputBox()
Title = "Drawing Parameters"
- CheckVisibility = Visibility.Hidden
- ComboVisibility = Visibility.Hidden
- ShowBtnVisibility = Visibility.Hidden
+ CheckVisibility = Visibility.Collapsed
+ ComboVisibility = Visibility.Collapsed
+ ShowBtnVisibility = Visibility.Collapsed
IsExpanded = False
IsEnabled = False
End Sub
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
index f9609ac..c0bc15e 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
@@ -16,9 +16,9 @@
-
-
-
+
+
+
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml
index 457e1cd..03ee680 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml
@@ -26,14 +26,14 @@
-
+
-
-
-
+
+
+
@@ -53,14 +53,14 @@
-
-
+
+
-
+ m_ListIsExpanded Then
+ m_ListIsExpanded = value
+ If value Then
+ Application.Msn.NotifyColleagues(Application.SIMULATIONEXPANDER_SET_ISEXPANDED, False)
+ End If
+ OnPropertyChanged("ListIsExpanded")
+ End If
+ End Set
+ End Property
+
+ Private m_ParametersIsExpanded As Boolean
+ Public Property ParametersIsExpanded As Boolean
+ Get
+ Return m_ParametersIsExpanded
+ End Get
+ Set(value As Boolean)
+ If value <> m_ParametersIsExpanded Then
+ m_ParametersIsExpanded = value
+ OnPropertyChanged("ParametersIsExpanded")
End If
End Set
End Property
@@ -349,7 +365,7 @@ Namespace EgtCAM5
Private m_cmdReloadMachining As ICommand
Sub New()
- Me.IsExpanded = True
+ Me.ListIsExpanded = True
Application.Msn.Register(Application.LOADOPERATIONLIST, Sub()
LoadOperationList()
End Sub)
@@ -359,7 +375,12 @@ Namespace EgtCAM5
Application.Msn.Register(Application.NEWMACHININGMODEISACTIVE, Sub(bValue As Boolean)
NewMachining = bValue
End Sub)
-
+ Application.Msn.Register(Application.SIMULATIONEXPANDER_GET_ISEXPANDED, Sub(bValue As Boolean)
+ ListIsExpanded = Not bValue
+ If bValue Then
+ ParametersIsExpanded = False
+ End If
+ End Sub)
End Sub
#Region "COMMANDS"
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb
index 8d74f64..e0ba793 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb
@@ -39,6 +39,7 @@ Namespace EgtCAM5
CloseSimulation()
End If
m_IsExpanded = value
+ Application.Msn.NotifyColleagues(Application.SIMULATIONEXPANDER_GET_ISEXPANDED, value)
OnPropertyChanged("IsExpanded")
End If
End Set
@@ -269,6 +270,9 @@ Namespace EgtCAM5
ResetSimulation()
End If
End Sub)
+ Application.Msn.Register(Application.SIMULATIONEXPANDER_SET_ISEXPANDED, Sub(bValue As Boolean)
+ IsExpanded = bValue
+ End Sub)
End Sub
#End Region
diff --git a/ProjectPage/OptionPanel/OptionPanelView.xaml b/ProjectPage/OptionPanel/OptionPanelView.xaml
index 604405f..ac878e0 100644
--- a/ProjectPage/OptionPanel/OptionPanelView.xaml
+++ b/ProjectPage/OptionPanel/OptionPanelView.xaml
@@ -1,13 +1,9 @@
-
diff --git a/ProjectPage/PopUpGridPanel/PopUpGridPanelView.xaml b/ProjectPage/PopUpGridPanel/PopUpGridPanelView.xaml
new file mode 100644
index 0000000..c5c10ee
--- /dev/null
+++ b/ProjectPage/PopUpGridPanel/PopUpGridPanelView.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProjectPage/PopUpGridPanel/PopUpGridPanelView.xaml.vb b/ProjectPage/PopUpGridPanel/PopUpGridPanelView.xaml.vb
new file mode 100644
index 0000000..53fd179
--- /dev/null
+++ b/ProjectPage/PopUpGridPanel/PopUpGridPanelView.xaml.vb
@@ -0,0 +1,3 @@
+Public Class PopUpGridPanelView
+
+End Class
diff --git a/ProjectPage/PopUpGridPanel/PopUpGridPanelViewModel.vb b/ProjectPage/PopUpGridPanel/PopUpGridPanelViewModel.vb
new file mode 100644
index 0000000..c49e959
--- /dev/null
+++ b/ProjectPage/PopUpGridPanel/PopUpGridPanelViewModel.vb
@@ -0,0 +1,205 @@
+Imports EgtUILib
+
+Namespace EgtCAM5
+
+ Public Class PopUpGridPanelViewModel
+ Inherits ViewModelBase
+
+#Region "FIELDS & PROPERTIES"
+
+ ' Definizione comandi
+ Private m_cmdCPlaneView As ICommand
+ Private m_cmdCPlaneRotate As ICommand
+ Private m_cmdCPlane3P As ICommand
+ Private m_cmdCPlanePerpObj As ICommand
+ Private m_cmdCPlaneObj As ICommand
+
+#Region "ToolTip"
+
+ Public ReadOnly Property CPlaneViewToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 25)
+ End Get
+ End Property
+ Public ReadOnly Property CPlaneRotateToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 28)
+ End Get
+ End Property
+ Public ReadOnly Property CPlane3PointsToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 29)
+ End Get
+ End Property
+ Public ReadOnly Property CPlanePerpCurveToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 30)
+ End Get
+ End Property
+ Public ReadOnly Property CPlaneObjectToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 31)
+ End Get
+ End Property
+
+#End Region ' ToolTip
+
+#End Region
+
+#Region "COMMANDS"
+
+#Region "CPlaneViewCommand"
+
+ '''
+ ''' Returns a command that do CPlaneView.
+ '''
+ Public ReadOnly Property CPlaneViewCommand As ICommand
+ Get
+ If m_cmdCPlaneView Is Nothing Then
+ m_cmdCPlaneView = New RelayCommand(AddressOf CPlaneView, AddressOf CanCPlaneView)
+ End If
+ Return m_cmdCPlaneView
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneView. This method is invoked by the CPlaneViewCommand.
+ '''
+ Public Sub CPlaneView(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.CPLANEVIEW)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanCPlaneView(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' CPlaneViewCommand
+
+#Region "CPlaneRotateCommand"
+
+ '''
+ ''' Returns a command that do CPlaneRotate.
+ '''
+ Public ReadOnly Property CPlaneRotateCommand As ICommand
+ Get
+ If m_cmdCPlaneRotate Is Nothing Then
+ m_cmdCPlaneRotate = New RelayCommand(AddressOf CPlaneRotate, AddressOf CanCPlaneRotate)
+ End If
+ Return m_cmdCPlaneRotate
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
+ '''
+ Public Sub CPlaneRotate(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.CPLANEROTATE)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanCPlaneRotate(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' CPlaneRotateCommand
+
+#Region "CPlane3PCommand"
+
+ '''
+ ''' Returns a command that do CPlane3P.
+ '''
+ Public ReadOnly Property CPlane3PCommand As ICommand
+ Get
+ If m_cmdCPlane3P Is Nothing Then
+ m_cmdCPlane3P = New RelayCommand(AddressOf CPlane3P, AddressOf CanCPlane3P)
+ End If
+ Return m_cmdCPlane3P
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
+ '''
+ Public Sub CPlane3P(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.CPLANE3P)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanCPlane3P(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' CPlane3PCommand
+
+#Region "CPlanePerpObjCommand"
+
+ '''
+ ''' Returns a command that do CPlanePerpObj.
+ '''
+ Public ReadOnly Property CPlanePerpObjCommand As ICommand
+ Get
+ If m_cmdCPlanePerpObj Is Nothing Then
+ m_cmdCPlanePerpObj = New RelayCommand(AddressOf CPlanePerpObj, AddressOf CanCPlanePerpObj)
+ End If
+ Return m_cmdCPlanePerpObj
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
+ '''
+ Public Sub CPlanePerpObj(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.CPLANEPERPOBJ)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanCPlanePerpObj(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' CPlanePerpObjCommand
+
+#Region "CPlaneObjCommand"
+
+ '''
+ ''' Returns a command that do CPlanepObj.
+ '''
+ Public ReadOnly Property CPlaneObjCommand As ICommand
+ Get
+ If m_cmdCPlaneObj Is Nothing Then
+ m_cmdCPlaneObj = New RelayCommand(AddressOf CPlaneObj, AddressOf CanCPlaneObj)
+ End If
+ Return m_cmdCPlaneObj
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
+ '''
+ Public Sub CPlaneObj(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.CPLANEOBJ)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanCPlaneObj(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' CPlaneObjCommand
+
+#End Region ' COMMANDS
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/ProjectPage/PopUpViewPanel/PopUpViewPanelView.xaml b/ProjectPage/PopUpViewPanel/PopUpViewPanelView.xaml
new file mode 100644
index 0000000..8faa056
--- /dev/null
+++ b/ProjectPage/PopUpViewPanel/PopUpViewPanelView.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProjectPage/PopUpViewPanel/PopUpViewPanelView.xaml.vb b/ProjectPage/PopUpViewPanel/PopUpViewPanelView.xaml.vb
new file mode 100644
index 0000000..36ca756
--- /dev/null
+++ b/ProjectPage/PopUpViewPanel/PopUpViewPanelView.xaml.vb
@@ -0,0 +1,3 @@
+Public Class PopUpViewPanelView
+
+End Class
diff --git a/ProjectPage/PopUpViewPanel/PopUpViewPanelViewModel.vb b/ProjectPage/PopUpViewPanel/PopUpViewPanelViewModel.vb
new file mode 100644
index 0000000..71f0e6b
--- /dev/null
+++ b/ProjectPage/PopUpViewPanel/PopUpViewPanelViewModel.vb
@@ -0,0 +1,246 @@
+Imports EgtUILib
+
+Namespace EgtCAM5
+
+ Public Class PopUpViewPanelViewModel
+ Inherits ViewModelBase
+
+#Region "FIELDS & PROPERTIES"
+
+ ' Definizione comandi
+ Private m_cmdZoomIn As ICommand
+ Private m_cmdZoomOut As ICommand
+ Private m_cmdIsoViewSE As ICommand
+ Private m_cmdIsoViewNE As ICommand
+ Private m_cmdIsoViewNW As ICommand
+ Private m_cmdViewToCPlane As ICommand
+
+#Region "ToolTip"
+
+ Public ReadOnly Property ZoomInToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 5)
+ End Get
+ End Property
+
+ Public ReadOnly Property ZoomOutToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 6)
+ End Get
+ End Property
+
+ Public ReadOnly Property LookFromIso_SEToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 13)
+ End Get
+ End Property
+
+ Public ReadOnly Property LookFromIso_NEToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 14)
+ End Get
+ End Property
+
+ Public ReadOnly Property LookFromIso_NWToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 15)
+ End Get
+ End Property
+
+ Public ReadOnly Property ViewToCPlaneToolTip As String
+ Get
+ Return EgtMsg(MSG_GRIDVIEWPANEL + 32)
+ End Get
+ End Property
+
+#End Region ' ToolTip
+
+#End Region ' FIELDS & PROPERTIES
+
+#Region "COMMANDS"
+
+#Region "ZoomInCommand"
+
+ '''
+ ''' Returns a command that do ZoomIn.
+ '''
+ Public ReadOnly Property ZoomInCommand As ICommand
+ Get
+ If m_cmdZoomIn Is Nothing Then
+ m_cmdZoomIn = New RelayCommand(AddressOf ZoomIn, AddressOf CanZoomIn)
+ End If
+ Return m_cmdZoomIn
+ End Get
+ End Property
+
+ '''
+ ''' Execute the ZoomIn. This method is invoked by the ZoomInCommand.
+ '''
+ Public Sub ZoomIn(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.ZOOMIN)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanZoomIn(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' ZoomInCommand
+
+#Region "ZoomOutCommand"
+
+ '''
+ ''' Returns a command that do ZoomOut.
+ '''
+ Public ReadOnly Property ZoomOutCommand As ICommand
+ Get
+ If m_cmdZoomOut Is Nothing Then
+ m_cmdZoomOut = New RelayCommand(AddressOf ZoomOut, AddressOf CanZoomOut)
+ End If
+ Return m_cmdZoomOut
+ End Get
+ End Property
+
+ '''
+ ''' Execute the ZoomOut. This method is invoked by the ZoomOutCommand.
+ '''
+ Public Sub ZoomOut(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.ZOOMOUT)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanZoomOut(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' ZoomOutCommand
+
+#Region "IsoViewSECommand"
+
+ '''
+ ''' Returns a command that do IsoViewSE.
+ '''
+ Public ReadOnly Property IsoViewSECommand As ICommand
+ Get
+ If m_cmdIsoViewSE Is Nothing Then
+ m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE, AddressOf CanIsoViewSE)
+ End If
+ Return m_cmdIsoViewSE
+ End Get
+ End Property
+
+ '''
+ ''' Execute the IsoViewSE. This method is invoked by the IsoViewSECommand.
+ '''
+ Public Sub IsoViewSE(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.ISOVIEWSE)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanIsoViewSE(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' IsoViewSECommand
+
+#Region "IsoViewNECommand"
+
+ '''
+ ''' Returns a command that do IsoViewNE.
+ '''
+ Public ReadOnly Property IsoViewNECommand As ICommand
+ Get
+ If m_cmdIsoViewNE Is Nothing Then
+ m_cmdIsoViewNE = New RelayCommand(AddressOf IsoViewNE, AddressOf CanIsoViewNE)
+ End If
+ Return m_cmdIsoViewNE
+ End Get
+ End Property
+
+ '''
+ ''' Execute the IsoViewNE. This method is invoked by the IsoViewNECommand.
+ '''
+ Public Sub IsoViewNE(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.ISOVIEWNE)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanIsoViewNE(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' IsoViewNECommand
+
+#Region "IsoViewNWCommand"
+
+ '''
+ ''' Returns a command that do IsoViewNW.
+ '''
+ Public ReadOnly Property IsoViewNWCommand As ICommand
+ Get
+ If m_cmdIsoViewNW Is Nothing Then
+ m_cmdIsoViewNW = New RelayCommand(AddressOf IsoViewNW, AddressOf CanIsoViewNW)
+ End If
+ Return m_cmdIsoViewNW
+ End Get
+ End Property
+
+ '''
+ ''' Execute the IsoViewNW. This method is invoked by the IsoViewNWCommand.
+ '''
+ Public Sub IsoViewNW(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.ISOVIEWNW)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanIsoViewNW(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' IsoViewNWCommand
+
+#Region "ViewToCPlaneCommand"
+
+ '''
+ ''' Returns a command that do GetDist.
+ '''
+ Public ReadOnly Property ViewToCPlaneCommand As ICommand
+ Get
+ If m_cmdViewToCPlane Is Nothing Then
+ m_cmdViewToCPlane = New RelayCommand(AddressOf ViewToCPlane, AddressOf CanViewToCPlane)
+ End If
+ Return m_cmdViewToCPlane
+ End Get
+ End Property
+
+ '''
+ ''' Execute the GetDist. This method is invoked by the GetDistCommand.
+ '''
+ Public Sub ViewToCPlane(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.VIEWTOCPLANE)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanViewToCPlane(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' ViewToCPlaneCommand
+
+#End Region ' COMMANDS
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/ProjectPage/ProjectView.xaml b/ProjectPage/ProjectView.xaml
index 755ce6a..8cc1d11 100644
--- a/ProjectPage/ProjectView.xaml
+++ b/ProjectPage/ProjectView.xaml
@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
+ xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
@@ -23,6 +24,7 @@
+
@@ -31,6 +33,7 @@
+
diff --git a/ProjectPage/ProjectViewModel.vb b/ProjectPage/ProjectViewModel.vb
index 501b701..188c4c4 100644
--- a/ProjectPage/ProjectViewModel.vb
+++ b/ProjectPage/ProjectViewModel.vb
@@ -281,7 +281,7 @@ Namespace EgtCAM5
sTitle += "*"
End If
' dati del prodotto
- sTitle += " - EgalTech EgtCAM5"
+ sTitle += " - EgtCAM5"
' emissione del titolo
Application.Msn.NotifyColleagues(Application.UPDATEMAINWINDOWTITLE, sTitle)
End Sub
diff --git a/ProjectPage/ViewPanel/ViewPanelView.xaml b/ProjectPage/ViewPanel/ViewPanelView.xaml
index 5f5af81..031d0f8 100644
--- a/ProjectPage/ViewPanel/ViewPanelView.xaml
+++ b/ProjectPage/ViewPanel/ViewPanelView.xaml
@@ -6,12 +6,6 @@
-
-
@@ -30,19 +24,6 @@
-
-
-
-
-
diff --git a/ProjectPage/ViewPanel/ViewPanelViewModel.vb b/ProjectPage/ViewPanel/ViewPanelViewModel.vb
index f8ea944..0700be7 100644
--- a/ProjectPage/ViewPanel/ViewPanelViewModel.vb
+++ b/ProjectPage/ViewPanel/ViewPanelViewModel.vb
@@ -9,18 +9,12 @@ Namespace EgtCAM5
' Definizione comandi
Private m_cmdZoomAll As ICommand
- Private m_cmdZoomIn As ICommand
- Private m_cmdZoomOut As ICommand
Private m_cmdTopView As ICommand
Private m_cmdFrontView As ICommand
Private m_cmdLeftView As ICommand
Private m_cmdBackView As ICommand
Private m_cmdRightView As ICommand
Private m_cmdIsoViewSW As ICommand
- Private m_cmdIsoViewSE As ICommand
- Private m_cmdIsoViewNE As ICommand
- Private m_cmdIsoViewNW As ICommand
- Private m_cmdViewToCPlane As ICommand
#Region "ToolTip"
@@ -30,18 +24,6 @@ Namespace EgtCAM5
End Get
End Property
- Public ReadOnly Property ZoomInToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 5)
- End Get
- End Property
-
- Public ReadOnly Property ZoomOutToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 6)
- End Get
- End Property
-
Public ReadOnly Property LookFromTopToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 7)
@@ -78,30 +60,6 @@ Namespace EgtCAM5
End Get
End Property
- Public ReadOnly Property LookFromIso_SEToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 13)
- End Get
- End Property
-
- Public ReadOnly Property LookFromIso_NEToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 14)
- End Get
- End Property
-
- Public ReadOnly Property LookFromIso_NWToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 15)
- End Get
- End Property
-
- Public ReadOnly Property ViewToCPlaneToolTip As String
- Get
- Return EgtMsg(MSG_GRIDVIEWPANEL + 32)
- End Get
- End Property
-
#End Region ' ToolTip
#End Region ' FIELDS & PROPERTIES
@@ -138,66 +96,6 @@ Namespace EgtCAM5
#End Region ' ZoomAllCommand
-#Region "ZoomInCommand"
-
- '''
- ''' Returns a command that do ZoomIn.
- '''
- Public ReadOnly Property ZoomInCommand As ICommand
- Get
- If m_cmdZoomIn Is Nothing Then
- m_cmdZoomIn = New RelayCommand(AddressOf ZoomIn, AddressOf CanZoomIn)
- End If
- Return m_cmdZoomIn
- End Get
- End Property
-
- '''
- ''' Execute the ZoomIn. This method is invoked by the ZoomInCommand.
- '''
- Public Sub ZoomIn(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.ZOOMIN)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanZoomIn(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' ZoomInCommand
-
-#Region "ZoomOutCommand"
-
- '''
- ''' Returns a command that do ZoomOut.
- '''
- Public ReadOnly Property ZoomOutCommand As ICommand
- Get
- If m_cmdZoomOut Is Nothing Then
- m_cmdZoomOut = New RelayCommand(AddressOf ZoomOut, AddressOf CanZoomOut)
- End If
- Return m_cmdZoomOut
- End Get
- End Property
-
- '''
- ''' Execute the ZoomOut. This method is invoked by the ZoomOutCommand.
- '''
- Public Sub ZoomOut(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.ZOOMOUT)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanZoomOut(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' ZoomOutCommand
-
#Region "TopViewCommand"
'''
@@ -378,126 +276,6 @@ Namespace EgtCAM5
#End Region ' IsoViewSWCommand
-#Region "IsoViewSECommand"
-
- '''
- ''' Returns a command that do IsoViewSE.
- '''
- Public ReadOnly Property IsoViewSECommand As ICommand
- Get
- If m_cmdIsoViewSE Is Nothing Then
- m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE, AddressOf CanIsoViewSE)
- End If
- Return m_cmdIsoViewSE
- End Get
- End Property
-
- '''
- ''' Execute the IsoViewSE. This method is invoked by the IsoViewSECommand.
- '''
- Public Sub IsoViewSE(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.ISOVIEWSE)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanIsoViewSE(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' IsoViewSECommand
-
-#Region "IsoViewNECommand"
-
- '''
- ''' Returns a command that do IsoViewNE.
- '''
- Public ReadOnly Property IsoViewNECommand As ICommand
- Get
- If m_cmdIsoViewNE Is Nothing Then
- m_cmdIsoViewNE = New RelayCommand(AddressOf IsoViewNE, AddressOf CanIsoViewNE)
- End If
- Return m_cmdIsoViewNE
- End Get
- End Property
-
- '''
- ''' Execute the IsoViewNE. This method is invoked by the IsoViewNECommand.
- '''
- Public Sub IsoViewNE(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.ISOVIEWNE)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanIsoViewNE(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' IsoViewNECommand
-
-#Region "IsoViewNWCommand"
-
- '''
- ''' Returns a command that do IsoViewNW.
- '''
- Public ReadOnly Property IsoViewNWCommand As ICommand
- Get
- If m_cmdIsoViewNW Is Nothing Then
- m_cmdIsoViewNW = New RelayCommand(AddressOf IsoViewNW, AddressOf CanIsoViewNW)
- End If
- Return m_cmdIsoViewNW
- End Get
- End Property
-
- '''
- ''' Execute the IsoViewNW. This method is invoked by the IsoViewNWCommand.
- '''
- Public Sub IsoViewNW(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.ISOVIEWNW)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanIsoViewNW(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' IsoViewNWCommand
-
-#Region "ViewToCPlaneCommand"
-
- '''
- ''' Returns a command that do GetDist.
- '''
- Public ReadOnly Property ViewToCPlaneCommand As ICommand
- Get
- If m_cmdViewToCPlane Is Nothing Then
- m_cmdViewToCPlane = New RelayCommand(AddressOf ViewToCPlane, AddressOf CanViewToCPlane)
- End If
- Return m_cmdViewToCPlane
- End Get
- End Property
-
- '''
- ''' Execute the GetDist. This method is invoked by the GetDistCommand.
- '''
- Public Sub ViewToCPlane(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.VIEWTOCPLANE)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanViewToCPlane(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' ViewToCPlaneCommand
-
#End Region ' COMMANDS
End Class
diff --git a/ToolsDbWindow/ToolTreeView2.vb b/ToolsDbWindow/ToolTreeView2.vb
index 020abfc..bba3b59 100644
--- a/ToolsDbWindow/ToolTreeView2.vb
+++ b/ToolsDbWindow/ToolTreeView2.vb
@@ -46,9 +46,10 @@ Public Class FamilyToolTreeViewItem
End Get
End Property
- Sub New(Name As String)
+ Sub New(Name As String, ToolFamily As MCH_TF)
MyBase.New(Name)
Me.PictureString = "/Resources/TreeView/Folder.png"
+ Me.m_ToolType = ToolFamily
End Sub
End Class
@@ -102,18 +103,20 @@ Public Class ToolTreeViewItem
NotifyPropertyChanged("Type")
Else
WriteToolParam()
- If EgtTdbIsCurrToolModified() Then ' And Me.IsValid) Or Me.NewTool Then
+ If EgtTdbIsCurrToolModified() Or Me.NewTool Then
Select Case MsgBox(EgtMsg(MSG_TOOLSERRORS), MsgBoxStyle.YesNo, EgtMsg(MSG_TOOLSERRORS + 1))
Case MsgBoxResult.Yes
- 'm_NewTool = False
+ m_NewTool = False
+ If IsUUID(Path.GetFileNameWithoutExtension(m_Draw)) Then
+ SaveToolDraw()
+ End If
EgtTdbSaveCurrTool()
- 'SaveToolDraw()
EgtTdbSave()
Case MsgBoxResult.No
- 'If m_NewTool Then
- ' Application.Msn.NotifyColleagues(Application.REMOVETOOL, Me)
- 'End If
+ If m_NewTool Then
+ Application.Msn.NotifyColleagues(Application.REMOVETOOL, Me)
+ End If
End Select
End If
@@ -638,7 +641,7 @@ Public Class ToolTreeViewItem
End Property
Private m_IsModifiedDraw As Boolean = False
- Private m_Draw As String
+ Friend m_Draw As String
'''
''' Property that read and write to the tool's database the Draw
'''
@@ -1061,9 +1064,8 @@ Public Class ToolTreeViewItem
Return (nErr = 0)
End Function
- Private Function SaveToolDraw() As Boolean
+ Friend Function SaveToolDraw() As Boolean
If m_Type = MCH_TY.DRILL_STD Or m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.MILL_STD Then
- Dim x = EgtGetCurrentContext()
' nome e direttorio del file da salvare
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim sDrawName As String = Uuid
@@ -1072,8 +1074,7 @@ Public Class ToolTreeViewItem
EgtTdbGetToolDir(sPath)
sPath = sPath & "\" & sDrawName
' passo all'ambiente di disegno dell'utensile
- Dim r = EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
- Dim y = EgtGetCurrentContext()
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
' nascondo layer ausiliario
Dim nAuxId As Integer = GDB_ID.NULL
nAuxId = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "AUX")
diff --git a/ToolsDbWindow/ToolsDbViewModel.vb b/ToolsDbWindow/ToolsDbViewModel.vb
index 9a32381..d0bc052 100644
--- a/ToolsDbWindow/ToolsDbViewModel.vb
+++ b/ToolsDbWindow/ToolsDbViewModel.vb
@@ -281,7 +281,7 @@ Namespace EgtCAM5
Private Sub LoadSelectedMachineTools()
Dim ActiveToolsFamilies() As ToolsFamily = ReadActiveToolsFamilies()
For Each ToolsFamily In ActiveToolsFamilies
- Dim FamilyTreeView As New FamilyToolTreeViewItem(ToolsFamily.FamilyName) ', ToolsFamily.FamilyId)
+ Dim FamilyTreeView As New FamilyToolTreeViewItem(ToolsFamily.FamilyName, ToolsFamily.FamilyId)
ToolsList.Add(FamilyTreeView)
Dim nType As Integer = 0
Dim ToolName As String = String.Empty
@@ -432,10 +432,14 @@ Namespace EgtCAM5
''' Saves the current tool. This method is invoked by the SaveCommand.
'''
Public Sub Save(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.SAVETOOLDRAW)
+ Dim CurrTool As ToolTreeViewItem = DirectCast(param, ToolTreeViewItem)
+ CurrTool.WriteToolParam()
+ If IsUUID(Path.GetFileNameWithoutExtension(CurrTool.m_Draw)) Then
+ CurrTool.SaveToolDraw()
+ End If
EgtTdbSaveCurrTool()
EgtTdbSave()
- DirectCast(param, ToolTreeViewItem).NewTool = False
+ CurrTool.NewTool = False
End Sub
'''
@@ -482,9 +486,9 @@ Namespace EgtCAM5
EgtTdbRemoveTool(ToolToRemove.Name)
' Rimuovo il nome dell'albero
For Each ToolFamily In ToolsList
- 'If (ToolFamily.ToolType And ToolType) <> 0 Then
- ' ToolFamily.Items.Remove(ToolToRemove)
- 'End If
+ If (ToolFamily.ToolType And ToolType) <> 0 Then
+ ToolFamily.Items.Remove(ToolToRemove)
+ End If
Next
Application.Msn.NotifyColleagues(Application.ERRORONTOOL, Nothing)
End Sub
diff --git a/Utility.vb b/Utility.vb
index 2717921..1aa8d44 100644
--- a/Utility.vb
+++ b/Utility.vb
@@ -114,6 +114,10 @@ Public Module Utility
WinPos.nHeight = CInt(Window.Height)
WinPos.nWidth = CInt(Window.Width)
WinPos.nFlag = If(Window.WindowState = WindowState.Maximized, 1, 0)
+ If Window.WindowState = WindowState.Maximized Then
+ WinPos.nHeight = CInt(Window.RestoreBounds.Height)
+ WinPos.nWidth = CInt(Window.RestoreBounds.Width)
+ End If
End Sub
#End Region