diff --git a/Application.xaml.vb b/Application.xaml.vb
index 233e937..3190f1f 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -124,6 +124,9 @@ Class Application
Friend Const SELECTIDINOBJTREE As String = "SelectIdInObjTree"
Friend Const CLEAROBJTREE As String = "ClearObjTree"
Friend Const UPDATEOBJTREE As String = "UpdateObjTree"
+ Friend Const UPDATEHEADERNAME As String = "UpdateHeaderName"
+ Friend Const UPDATEHEADERCOLOR As String = "UpdateHeaderColor"
+ Friend Const UPDATEOBJTREEOLDID As String = "UpdateObjTreeOldId"
' StatusBar messages
Friend Const STATUSGRIDCOMMAND As String = "StatusGridCommand"
@@ -148,6 +151,10 @@ Class Application
Friend Const OPENPROJECT As String = "OpenProject"
Friend Const SAVEPROJECT As String = "SaveProject"
Friend Const SAVEASPROJECT As String = "SaveAsProject"
+ Friend Const INSERTPROJECT As String = "InsertProject"
+ Friend Const IMPORTPROJECT As String = "ImportProject"
+ Friend Const EXPORTPROJECT As String = "ExportProject"
+ Friend Const EXECPROJECT As String = "ExecProject"
Shared ReadOnly _messenger As New Messenger()
diff --git a/EgtCAM5Resources.xaml b/EgtCAM5Resources.xaml
index f9799d6..1403c93 100644
--- a/EgtCAM5Resources.xaml
+++ b/EgtCAM5Resources.xaml
@@ -74,6 +74,37 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/MachiningsDbPage/MachiningTreeView.vb b/MachiningsDbPage/MachiningTreeView.vb
index abf9af1..867437e 100644
--- a/MachiningsDbPage/MachiningTreeView.vb
+++ b/MachiningsDbPage/MachiningTreeView.vb
@@ -70,8 +70,9 @@ Public Class MachiningTreeViewItem
Return m_LeadLinkTypeList
End Get
End Property
+
Private m_LeadLinkTypeGetError As Boolean = False
- ' Proprietà che indica il WorkSide (MCH_SAW_WS)
+ ' Proprietà che indica il LeadLinkType
Public Property SelectedLeadLinkType As Integer
Get
If Not IsNothing(m_LeadLinkTypeList) Then
@@ -153,7 +154,6 @@ Public Class MachiningTreeViewItem
NotifyPropertyChanged("SelectedLeadOutType")
NotifyPropertyChanged("SelectedCurveUse")
NotifyPropertyChanged("SelectedStepType")
-
NotifyPropertyChanged("SelectedLeadLinkType")
NotifyPropertyChanged("Speed")
NotifyPropertyChanged("Feed")
@@ -286,15 +286,28 @@ Public Class MachiningTreeViewItem
Return m_LeadInTypeList
End Get
End Property
- ' Proprietà che indica il LeadInType (MCH_SAW_LI)
+ Private m_LeadInTypeGetError As Boolean = False
+ ' Proprietà che indica il LeadInType
Public Property SelectedLeadInType As Integer
Get
- Dim nLeadInType As Integer = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, nLeadInType)
- Return IdNameStruct.SearchToId(nLeadInType, LeadInTypeList)
+ If Not IsNothing(m_LeadInTypeList) Then
+ Dim nLeadInType As Integer = 0
+ If EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, nLeadInType) Then
+ m_LeadInTypeGetError = True
+ Else
+ m_LeadInTypeGetError = False
+ End If
+ Return IdNameStruct.SearchToId(nLeadInType, m_LeadInTypeList)
+ Else
+ Return 0
+ End If
End Get
Set(value As Integer)
- EgtMdbSetCurrMachiningParam(MCH_MP.LEADINTYPE, IdNameStruct.SearchFromId(value, LeadInTypeList))
+ If Not IsNothing(m_LeadInTypeList) Then
+ If m_LeadInTypeGetError Then
+ EgtMdbSetCurrMachiningParam(MCH_MP.LEADINTYPE, IdNameStruct.SearchFromId(value, m_LeadInTypeList))
+ End If
+ End If
End Set
End Property
@@ -332,15 +345,28 @@ Public Class MachiningTreeViewItem
Return m_LeadOutTypeList
End Get
End Property
- ' Proprietà che indica il LeadOutType (MCH_SAW_LO)
+ Private m_LeadOutTypeGetError As Boolean = False
+ ' Proprietà che indica il LeadOutType
Public Property SelectedLeadOutType As Integer
Get
- Dim nLeadOutType As Integer = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.LEADOUTTYPE, nLeadOutType)
- Return IdNameStruct.SearchToId(nLeadOutType, LeadOutTypeList)
+ If Not IsNothing(m_LeadOutTypeList) Then
+ Dim nLeadOutType As Integer = 0
+ If EgtMdbGetCurrMachiningParam(MCH_MP.LEADOUTTYPE, nLeadOutType) Then
+ m_LeadOutTypeGetError = True
+ Else
+ m_LeadOutTypeGetError = False
+ End If
+ Return IdNameStruct.SearchToId(nLeadOutType, m_LeadOutTypeList)
+ Else
+ Return 0
+ End If
End Get
Set(value As Integer)
- EgtMdbSetCurrMachiningParam(MCH_MP.LEADOUTTYPE, IdNameStruct.SearchFromId(value, LeadOutTypeList))
+ If Not IsNothing(m_LeadOutTypeList) Then
+ If m_LeadOutTypeGetError Then
+ EgtMdbSetCurrMachiningParam(MCH_MP.LEADOUTTYPE, IdNameStruct.SearchFromId(value, m_LeadOutTypeList))
+ End If
+ End If
End Set
End Property
@@ -380,34 +406,31 @@ Public Class MachiningTreeViewItem
Return m_StepTypeList
End Get
End Property
- ' Proprietà che indica il LeadOutType (MCH_SAW_LO)
+ Private m_StepTypeGetError As Boolean = False
+ ' Proprietà che indica il StepType
Public Property SelectedStepType As Integer
Get
- Dim nStepType As Integer = 0
- EgtMdbGetCurrMachiningParam(MCH_MP.STEPTYPE, nStepType)
- Return IdNameStruct.SearchToId(nStepType, StepTypeList)
+ If Not IsNothing(m_StepTypeList) Then
+ Dim nStepType As Integer = 0
+ If EgtMdbGetCurrMachiningParam(MCH_MP.STEPTYPE, nStepType) Then
+ m_StepTypeGetError = True
+ Else
+ m_StepTypeGetError = False
+ End If
+ Return IdNameStruct.SearchToId(nStepType, m_StepTypeList)
+ Else
+ Return 0
+ End If
End Get
Set(value As Integer)
- EgtMdbSetCurrMachiningParam(MCH_MP.STEPTYPE, IdNameStruct.SearchFromId(value, StepTypeList))
+ If Not IsNothing(m_StepTypeList) Then
+ If m_StepTypeGetError Then
+ EgtMdbSetCurrMachiningParam(MCH_MP.STEPTYPE, IdNameStruct.SearchFromId(value, m_StepTypeList))
+ End If
+ End If
End Set
End Property
- ' '''
- ' ''' Property that read and write to the Machining's database the Lead Link Type
- ' '''
- 'Public Property LeadLinkType As Integer
- ' Get
- ' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
- ' Dim nLeadLinkType As Integer = 0
- ' EgtMdbGetCurrMachiningParam(MCH_MP.LEADLINKTYPE, nLeadLinkType)
- ' Return nLeadLinkType
- ' End Get
- ' Set(value As Integer)
- ' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
- ' EgtMdbSetCurrMachiningParam(MCH_MP.LEADLINKTYPE, value)
- ' End Set
- 'End Property
-
Dim m_Speed As Double
'''
''' Property that read and write to the Machining's database the Speed
@@ -1054,26 +1077,26 @@ Public Class MachiningTreeViewItem
End If
End Sub
- '''
- ''' Property that read and write to the Machining's database the Tool
- '''
- Public Property SelectedTool As Integer
- Get
- Dim nUUID As String = String.Empty
- Dim sName As String = String.Empty
- EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, nUUID)
- EgtTdbGetToolFromUUID(nUUID, sName)
- For i = 0 To ToolList.Count - 1
- If ToolList(i) = sName Then
- Return i
- End If
- Next
- Return 0
- End Get
- Set(value As Integer)
- EgtMdbSetCurrMachiningParam(MCH_MP.TOOL, ToolList(value))
- End Set
- End Property
+ ' '''
+ ' ''' Property that read and write to the Machining's database the Tool
+ ' '''
+ 'Public Property SelectedTool As Integer
+ ' Get
+ ' Dim nUUID As String = String.Empty
+ ' Dim sName As String = String.Empty
+ ' EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, nUUID)
+ ' EgtTdbGetToolFromUUID(nUUID, sName)
+ ' For i = 0 To ToolList.Count - 1
+ ' If ToolList(i) = sName Then
+ ' Return i
+ ' End If
+ ' Next
+ ' Return 0
+ ' End Get
+ ' Set(value As Integer)
+ ' EgtMdbSetCurrMachiningParam(MCH_MP.TOOL, ToolList(value))
+ ' End Set
+ 'End Property
'''
''' Property that read and write to the Machining's database the Depth Str
@@ -1139,6 +1162,47 @@ Public Class MachiningTreeViewItem
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.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.DRILLING
+ m_SubTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(0, "Prova 1"), New IdNameStruct(1, "Prova 2")})
+ Case Else
+ m_SubTypeList = Nothing
+ End Select
+ Return m_SubTypeList
+ End Get
+ End Property
+ Private m_SubTypeGetError As Boolean = False
+ ' Proprietà che indica il SubType
+ Public Property SelectedSubType As Integer
+ Get
+ If Not IsNothing(m_SubTypeList) Then
+ Dim nSubType As Integer = 0
+ If EgtMdbGetCurrMachiningParam(MCH_MP.SUBTYPE, nSubType) Then
+ m_SubTypeGetError = True
+ Else
+ m_SubTypeGetError = False
+ End If
+ Return IdNameStruct.SearchToId(nSubType, m_SubTypeList)
+ Else
+ Return 0
+ End If
+ End Get
+ Set(value As Integer)
+ If Not IsNothing(m_SubTypeList) Then
+ If m_SubTypeGetError Then
+ EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, IdNameStruct.SearchFromId(value, m_SubTypeList))
+ End If
+ End If
+ End Set
+ End Property
+
+
#End Region ' Machining Property
#Region "Constructors"
diff --git a/MachiningsDbPage/MachiningsDbView.xaml b/MachiningsDbPage/MachiningsDbView.xaml
index 20097b8..139109a 100644
--- a/MachiningsDbPage/MachiningsDbView.xaml
+++ b/MachiningsDbPage/MachiningsDbView.xaml
@@ -61,6 +61,7 @@
474849
+ 50
@@ -176,6 +177,7 @@
+
@@ -1308,6 +1310,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MachiningsDbPage/MachiningsDbViewModel.vb b/MachiningsDbPage/MachiningsDbViewModel.vb
index 27201b1..e999f16 100644
--- a/MachiningsDbPage/MachiningsDbViewModel.vb
+++ b/MachiningsDbPage/MachiningsDbViewModel.vb
@@ -207,145 +207,151 @@ Namespace EgtCAM5
Public ReadOnly Property TabLenTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 80)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 79)
End Get
End Property
Public ReadOnly Property TabDistTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 81)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 80)
End Get
End Property
Public ReadOnly Property TabHeightTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 82)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 81)
End Get
End Property
Public ReadOnly Property TabAngleTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 83)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 82)
End Get
End Property
Public ReadOnly Property LiTangTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 84)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 83)
End Get
End Property
Public ReadOnly Property LiPerpTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 85)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 84)
End Get
End Property
Public ReadOnly Property LiElevTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 86)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 85)
End Get
End Property
Public ReadOnly Property LiCompLenTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 87)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 86)
End Get
End Property
Public ReadOnly Property LoTangTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 88)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 87)
End Get
End Property
Public ReadOnly Property LoPerpTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 89)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 88)
End Get
End Property
Public ReadOnly Property LoElevTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 90)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 89)
End Get
End Property
Public ReadOnly Property LoCompLenTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 91)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 90)
End Get
End Property
Public ReadOnly Property StartAddLenTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 92)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 91)
End Get
End Property
Public ReadOnly Property EndAddLenTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 93)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 92)
End Get
End Property
Public ReadOnly Property StepExtArcTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 95)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 93)
End Get
End Property
Public ReadOnly Property StepIntArcTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 96)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 94)
End Get
End Property
Public ReadOnly Property SideStepTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 97)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 95)
End Get
End Property
Public ReadOnly Property VertFeedTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 98)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 96)
End Get
End Property
Public ReadOnly Property NameParTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 99)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 97)
End Get
End Property
Public ReadOnly Property ToolTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 100)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 98)
End Get
End Property
Public ReadOnly Property DepthStrTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 101)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 99)
End Get
End Property
Public ReadOnly Property UserNotesTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 104)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 100)
End Get
End Property
Public ReadOnly Property OverLapStrTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 105)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 101)
End Get
End Property
Public ReadOnly Property OffsetStrTxBl As String
Get
- Return EgtMsg(MSG_MACHININGSDBPAGE + 106)
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 102)
+ End Get
+ End Property
+
+ Public ReadOnly Property SubTypeTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 103)
End Get
End Property
diff --git a/MainWindow/MainWindowViewModel.vb b/MainWindow/MainWindowViewModel.vb
index 9355691..b1d7693 100644
--- a/MainWindow/MainWindowViewModel.vb
+++ b/MainWindow/MainWindowViewModel.vb
@@ -365,29 +365,6 @@ Namespace EgtCAM5
Dim WinPos As New WinPos
GetPrivateProfileWinPos(S_GENERAL, K_WINPLACE, WinPos.nFlag, WinPos.nLeft, WinPos.nTop, WinPos.nWidth, WinPos.nHeight)
WinPosToWindow(Application.Current.MainWindow, WinPos)
- 'If ModifierKeys <> Keys.Shift Then
- ' Dim nFlag As Integer
- ' Dim nLeft As Integer
- ' Dim nTop As Integer
- ' Dim nWidth As Integer
- ' Dim nHeight As Integer
- ' GetPrivateProfileWinPos(S_GENERAL, K_WINPLACE, nFlag, nLeft, nTop, nWidth, nHeight, m_sIniFile)
- ' Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
- ' Me.Location = New Point(nLeft, nTop)
- ' Me.Size = New Size(nWidth, nHeight)
- ' WindowState = If(nFlag = 1, FormWindowState.Maximized, FormWindowState.Normal)
- 'End If
- '' Impostazioni controller
- 'm_Controller.SetScene(Scene1)
- 'Dim bLuaReg As Boolean = (GetPrivateProfileInt(S_GENERAL, K_COMMANDLOG, 0, m_sIniFile) <> 0)
- 'Dim sCmdLogFile As String = CMDLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
- 'If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
- ' EgtOutLog("Command log not started")
- ' If My.Application.CommandLineArgs.Count() = 0 Then
- ' MessageBox.Show("Command log not started", "TestEIn Warning",
- ' MessageBoxButtons.OK, MessageBoxIcon.Warning)
- ' End If
- 'End If
'If m_Controller.GetCommandLog() Then
' tsStatusReg.BackColor = Color.Lime
'ElseIf bLuaReg Then
@@ -396,8 +373,6 @@ Namespace EgtCAM5
'' Impostazioni MruLists
'm_MruFiles.Init(m_sIniFile, S_MRUFILES, 8)
'm_MruScripts.Init(m_sIniFile, S_MRUSCRIPTS, 8)
- '' Apro progetto vuoto
- 'm_Controller.NewProject(True)
'' Impostazione Testi e ToolTips
'SetMessages()
'' Installo funzione gestione eventi per lua
diff --git a/ProjectPage/DrawPanel/DrawPanelViewModel.vb b/ProjectPage/DrawPanel/DrawPanelViewModel.vb
index 215bd08..7e38700 100644
--- a/ProjectPage/DrawPanel/DrawPanelViewModel.vb
+++ b/ProjectPage/DrawPanel/DrawPanelViewModel.vb
@@ -1,4 +1,6 @@
-Namespace EgtCAM5
+Imports EgtUILib
+
+Namespace EgtCAM5
Public Class DrawPanelViewModel
Inherits ViewModelBase
@@ -182,7 +184,7 @@
''' Execute the ArcCSE. This method is invoked by the ArcCSECommand.
'''
Public Sub ArcCSE(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.ARCCSE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.ARCCSE)
End Sub
'''
@@ -212,7 +214,7 @@
''' Execute the Arc3P. This method is invoked by the Arc3PCommand.
'''
Public Sub Arc3P(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.ARC3P)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.ARC3P)
End Sub
'''
@@ -302,7 +304,7 @@
''' Execute the Rectangle2P. This method is invoked by the Rectangle2PCommand.
'''
Public Sub Rectangle2P(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.RECTANGLE2P)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.RECTANGLE2P)
End Sub
'''
@@ -422,7 +424,7 @@
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
'''
Public Sub Extrude(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.EXTRUDE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.EXTRUDE)
End Sub
'''
@@ -452,7 +454,7 @@
''' Execute the Revolve. This method is invoked by the RevolveCommand.
'''
Public Sub Revolve(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.REVOLVE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.REVOLVE)
End Sub
'''
@@ -482,7 +484,7 @@
''' Execute the Screw. This method is invoked by the ScrewCommand.
'''
Public Sub Screw(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.SCREW)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SCREW)
End Sub
'''
@@ -512,7 +514,7 @@
''' Execute the Ruled. This method is invoked by the RuledCommand.
'''
Public Sub Ruled(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.RULED)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.RULED)
End Sub
'''
@@ -542,7 +544,7 @@
''' Execute the MergeSurf. This method is invoked by the MergeSurfCommand.
'''
Public Sub MergeSurf(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.MERGESURF)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.MERGESURF)
End Sub
'''
@@ -572,7 +574,7 @@
''' Execute the ExplodeSurf. This method is invoked by the ExplodeSurfCommand.
'''
Public Sub ExplodeSurf(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.MERGESURF)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.EXPLODESURF)
End Sub
'''
@@ -602,7 +604,7 @@
''' Execute the InvertSurf. This method is invoked by the InvertSurfCommand.
'''
Public Sub InvertSurf(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.INVERTSURF)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.INVERTSURF)
End Sub
'''
@@ -662,7 +664,7 @@
''' Execute the ChangeLayer. This method is invoked by the ChangeLayerCommand.
'''
Public Sub ChangeLayer(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.CHANGELAYER)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CHANGELAYER)
End Sub
'''
@@ -722,7 +724,7 @@
''' Execute the InvertCurve. This method is invoked by the InvertCurveCommand.
'''
Public Sub InvertCurve(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.INVERTCURVE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.INVERTCURVE)
End Sub
'''
@@ -752,7 +754,7 @@
''' Execute the ChangeStartCurve. This method is invoked by the InvertCurveCommand.
'''
Public Sub ChangeStartCurve(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.CHANGESTARTCURVE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CHANGESTARTCURVE)
End Sub
'''
@@ -782,7 +784,7 @@
''' Execute the ExtendCurve. This method is invoked by the ExtendCurveCommand.
'''
Public Sub ExtendCurve(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.EXTENDCURVE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.TRIMEXTENDCURVE)
End Sub
'''
@@ -872,7 +874,7 @@
''' Execute the ExplodeCurve. This method is invoked by the ExplodeCurveCommand.
'''
Public Sub ExplodeCurve(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.JOINCURVE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.EXPLODECURVE)
End Sub
'''
@@ -902,7 +904,7 @@
''' Execute the SetCurveTh. This method is invoked by the SetCurveThCommand.
'''
Public Sub SetCurveTh(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.SETCURVETH)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SETCURVETHICKNESS)
End Sub
'''
@@ -932,7 +934,7 @@
''' Execute the Move. This method is invoked by the MoveCommand.
'''
Public Sub Move(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.MOVE)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.MOVE)
End Sub
'''
@@ -1052,7 +1054,7 @@
''' Execute the Offset. This method is invoked by the OffsetCommand.
'''
Public Sub Offset(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.OFFSET)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.OFFSET)
End Sub
'''
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
index 5275c6f..ede5488 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
@@ -1,9 +1,12 @@
-
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="clr-namespace:EgtCAM5.EgtCAM5">
+
+
-
+
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb
index 8bb9338..42c2c5c 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb
@@ -1,6 +1,61 @@
-Namespace EgtCAM5
+Imports EgtUILib
+
+Namespace EgtCAM5
Public Class InfoExpanderViewModel
+ Inherits ViewModelBase
+
+ Private m_IsExpanded As Boolean
+ Public Property IsEnabled As Boolean
+ Get
+ Return m_IsExpanded
+ End Get
+ Set(value As Boolean)
+ If value <> m_IsExpanded Then
+ m_IsExpanded = value
+ OnPropertyChanged("IsEnabled")
+ End If
+ End Set
+ End Property
+
+ Private m_InfoBox As String
+ Public Property InfoBox As String
+ Get
+ Return m_InfoBox
+ End Get
+ Set(value As String)
+ If value <> m_InfoBox Then
+ m_InfoBox = value
+ OnPropertyChanged("InfoBox")
+ End If
+ End Set
+ End Property
+
+ Private Sub UpdateObjDataInObjTree(ByVal nId As Integer)
+ ' recupero il tipo del nuovo oggetto
+ Dim nType As Integer = EgtGetType(nId)
+ ' stampa dei dati dell'oggetto
+ Dim sDump As String = String.Empty
+ If nType = GDB_TY.NONE Then
+ InfoBox = String.Empty
+ ElseIf nType = GDB_TY.GROUP Then
+ If EgtGroupDump(nId, sDump) Then
+ InfoBox = sDump
+ IsEnabled = True
+ Else
+ InfoBox = String.Empty
+ IsEnabled = False
+ End If
+ Else
+ If EgtGeoObjDump(nId, sDump) Then
+ InfoBox = sDump
+ IsEnabled = True
+ Else
+ InfoBox = String.Empty
+ IsEnabled = False
+ End If
+ End If
+ End Sub
End Class
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml
index 22f3e77..829af8b 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml
@@ -15,10 +15,13 @@
-
-
+
+
-
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
index 2399952..1308f2e 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
@@ -102,6 +102,19 @@ Namespace EgtCAM5
End Set
End Property
+ Private m_CheckVisibility As Visibility
+ Public Property CheckVisibility As Visibility
+ Get
+ Return m_CheckVisibility
+ End Get
+ Set(value As Visibility)
+ If value <> m_CheckVisibility Then
+ m_CheckVisibility = value
+ OnPropertyChanged("CheckVisibility")
+ End If
+ End Set
+ End Property
+
' ComboBox fields
Private m_ComboItemsList As ObservableCollection(Of String)
Public Property ComboItemsList As ObservableCollection(Of String)
@@ -128,13 +141,26 @@ Namespace EgtCAM5
End Set
End Property
+ Private m_ComboVisibility As Visibility
+ Public Property ComboVisibility As Visibility
+ Get
+ Return m_ComboVisibility
+ End Get
+ Set(value As Visibility)
+ If value <> m_ComboVisibility Then
+ m_ComboVisibility = value
+ OnPropertyChanged("ComboVisibility")
+ End If
+ End Set
+ End Property
+
' Buttons fields
- Private m_ShowBtnVisibility As Boolean
- Public Property ShowBtnVisibility As Boolean
+ Private m_ShowBtnVisibility As Visibility
+ Public Property ShowBtnVisibility As Visibility
Get
Return m_ShowBtnVisibility
End Get
- Set(value As Boolean)
+ Set(value As Visibility)
m_ShowBtnVisibility = value
OnPropertyChanged("ShowBtnVisibility")
End Set
@@ -248,12 +274,14 @@ Namespace EgtCAM5
TextBox = ""
If PrepareInputBoxParam.sCheckLabel <> "" Then
CheckBoxText = PrepareInputBoxParam.sCheckLabel
+ CheckVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowCombo Then
ComboItemsList.Clear()
+ ComboVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowBtn Then
- ShowBtnVisibility = True
+ ShowBtnVisibility = Visibility.Visible
End If
FocusTextBox = True
End Sub
@@ -261,6 +289,9 @@ Namespace EgtCAM5
Private Sub ResetInputBox()
Title = "Drawing Parameters"
+ CheckVisibility = Visibility.Hidden
+ ComboVisibility = Visibility.Hidden
+ ShowBtnVisibility = Visibility.Hidden
IsExpanded = False
IsEnabled = False
End Sub
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb
index ba3aab9..214aa25 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb
@@ -1,4 +1,5 @@
Imports System.Collections.ObjectModel
+Imports EgtUILib
Public Class LayerTreeViewItem
Inherits TreeViewItemBase
@@ -26,7 +27,16 @@ Public Class LayerTreeViewItem
Return m_OnOff
End Get
Set(value As Boolean)
- m_OnOff = value
+ If m_OnOff <> value Then
+ m_OnOff = value
+ ' eseguo operazione
+ Application.Msn.NotifyColleagues(Application.SETLASTINTEGER, Id)
+ If value Then
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SHOW)
+ Else
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.HIDE)
+ End If
+ End If
End Set
End Property
@@ -53,7 +63,7 @@ Public Class LayerTreeViewItem
End Set
End Property
- Sub New(Id As Integer, Name As String, Image As String, CurrColor As System.Drawing.Color)
+ Sub New(Id As Integer, Name As String, Image As String, CurrColor As Color3d)
MyBase.New(Name)
Me.m_Id = Id
Me.PictureString = Image
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
index 13c836b..89a132a 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
@@ -1,8 +1,15 @@
-
+
+
+
+
+
+
+
@@ -14,6 +21,11 @@
+
+
+
+
+
@@ -25,9 +37,9 @@
-
+
-
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
index 2a5e14d..c8cd946 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
@@ -5,13 +5,38 @@ Imports EgtCAM5.IniFile
Namespace EgtCAM5
Public Class ManageLayerExpanderViewModel
+ Inherits ViewModelBase
-#Region "Fields & Properties"
+#Region "FIELDS & PROPERTIES"
+
+ ' Expander Header Properties
+ Private m_HeaderName As String
+ Public Property HeaderName As String
+ Get
+ Return m_HeaderName
+ End Get
+ Set(value As String)
+ m_HeaderName = value
+ OnPropertyChanged("HeaderName")
+ End Set
+ End Property
+
+ Private m_HeaderColor As SolidColorBrush
+ Public Property HeaderColor As SolidColorBrush
+ Get
+ Return m_HeaderColor
+ End Get
+ Set(value As SolidColorBrush)
+ m_HeaderColor = value
+ OnPropertyChanged("HeaderColor")
+ End Set
+ End Property
' Definizione comandi
Private m_cmdNewPart As ICommand
Private m_cmdNewLayer As ICommand
Private m_cmdLayerColor As ICommand
+ Private m_cmdTreeViewDoubleClick As ICommand
' Lista dei layer
Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem)
@@ -26,6 +51,8 @@ Namespace EgtCAM5
#End Region
+#Region "CONSTRUCTOR"
+
Sub New()
Application.Msn.Register(Application.LOADOBJTREE, Sub()
LoadObjTree()
@@ -42,7 +69,19 @@ Namespace EgtCAM5
Application.Msn.Register(Application.UPDATEOBJTREE, Sub()
UpdateObjTree()
End Sub)
+ Application.Msn.Register(Application.UPDATEHEADERNAME, Sub(HeaderName As String)
+ Me.HeaderName = HeaderName
+ End Sub)
+ Application.Msn.Register(Application.UPDATEHEADERCOLOR, Sub(HeaderColor As Color3d)
+ Me.HeaderColor = New SolidColorBrush(Color.FromArgb(HeaderColor.A, HeaderColor.R, HeaderColor.G, HeaderColor.B))
+ End Sub)
+ Application.Msn.Register(Application.UPDATEOBJTREEOLDID, Sub(ObjTreeOldId As Integer)
+ Me.m_nObjTreeOldId = ObjTreeOldId
+ End Sub)
End Sub
+
+#End Region ' Constructor
+
#Region "COMMANDS"
#Region "NewPartCommand"
@@ -133,11 +172,44 @@ Namespace EgtCAM5
Return True
End Function
-#End Region ' NewLayerCommand
+#End Region ' LayerColorCommand
+
+#Region "TreeViewDoubleClickCommand"
+
+ '''
+ ''' Returns a command that do Point.
+ '''
+ Public ReadOnly Property TreeViewDoubleClickCommand As ICommand
+ Get
+ If m_cmdTreeViewDoubleClick Is Nothing Then
+ m_cmdTreeViewDoubleClick = New RelayCommand(AddressOf TreeViewDoubleClick, AddressOf CanTreeViewDoubleClick)
+ End If
+ Return m_cmdTreeViewDoubleClick
+ End Get
+ End Property
+
+ '''
+ ''' Execute the Point. This method is invoked by the PointCommand.
+ '''
+ Public Sub TreeViewDoubleClick(ByVal param As Object)
+ If m_nObjTreeOldId <> GDB_ID.NULL Then
+ Application.Msn.NotifyColleagues(Application.SETLASTINTEGER, m_nObjTreeOldId)
+ Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SETCURRPARTLAYER)
+ End If
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanTreeViewDoubleClick(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' TreeViewDoubleClickCommand
#End Region ' Commands
-#Region "Methods"
+#Region "METHODS"
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
Private m_nObjTreeOldId As Integer = GDB_ID.NULL
@@ -214,9 +286,9 @@ Namespace EgtCAM5
End If
' inserisco il nodo nell'albero
Dim CurrColor As Color3d
- EgtGetColor(nGroupId, CurrColor)
+ EgtGetCalcColor(nGroupId, CurrColor)
Dim sImage As String = TypeToImageInObjTree(GDB_TY.GROUP, nGroupType)
- Dim CurrNod As LayerTreeViewItem = New LayerTreeViewItem(nGroupId, sText, sImage, CurrColor.ToColor())
+ Dim CurrNod As LayerTreeViewItem = New LayerTreeViewItem(nGroupId, sText, sImage, CurrColor)
PrevNodColl.Add(CurrNod)
CurrNodColl = CurrNod.Items
Dim nStat As Integer = GDB_ST.ON_
@@ -250,9 +322,9 @@ Namespace EgtCAM5
sText = sTitle + " " + nId.ToString
End If
Dim CurrColor As Color3d
- EgtGetColor(nGroupId, CurrColor)
+ EgtGetCalcColor(nGroupId, CurrColor)
Dim sImage As String = TypeToImageInObjTree(nType, nDepth)
- Dim CurrNod As LayerTreeViewItem = New LayerTreeViewItem(nId, sText, sImage, CurrColor.ToColor())
+ Dim CurrNod As LayerTreeViewItem = New LayerTreeViewItem(nId, sText, sImage, CurrColor)
CurrNodColl.Add(CurrNod)
Dim nStat As Integer = GDB_ST.ON_
EgtGetStatus(nId, nStat)
@@ -306,25 +378,6 @@ Namespace EgtCAM5
End If
End Sub
- 'Private Sub ObjTree_AfterCheck(ByVal sender As Object, ByVal e As TreeViewEventArgs) Handles TreeView1.AfterCheck
- ' ' verifico che il check derivi da azione utente
- ' If e.Action = TreeViewAction.Unknown Then
- ' Return
- ' End If
- ' ' recupero l'Id del nuovo oggetto
- ' Dim nId As Integer
- ' If Not Int32.TryParse(e.Node.Name, nId) Then
- ' Return
- ' End If
- ' ' eseguo operazione
- ' m_Controller.SetLastInteger(nId)
- ' If e.Node.Checked Then
- ' m_Controller.ExecuteCommand(CMD.SHOW)
- ' Else
- ' m_Controller.ExecuteCommand(CMD.HIDE)
- ' End If
- 'End Sub
-
'Private Sub ObjTree_AfterSelect(ByVal sender As Object, ByVal e As TreeViewEventArgs) Handles TreeView1.AfterSelect
' ' verifico che il select derivi da azione utente
' If e.Action = TreeViewAction.Unknown Then
@@ -372,13 +425,6 @@ Namespace EgtCAM5
' End If
'End Sub
- 'Private Sub ObjTree_MouseDoubleClick(ByVal sender As Object, e As MouseEventArgs) Handles TreeView1.MouseDoubleClick
- ' If m_nObjTreeOldId <> GDB_ID.NULL Then
- ' m_Controller.SetLastInteger(m_nObjTreeOldId)
- ' m_Controller.ExecuteCommand(CMD.SETCURRPARTLAYER)
- ' End If
- 'End Sub
-
Private Sub UpdateObjInObjTree(ByVal nId As Integer)
' ripristino eventuale vecchio oggetto selezionato
RevertOldIdInObjTree()
@@ -394,28 +440,6 @@ Namespace EgtCAM5
ObjTreeTimer.Start()
End Sub
- 'Private Sub UpdateObjDataInObjTree(ByVal nId As Integer)
- ' ' recupero il tipo del nuovo oggetto
- ' Dim nType As Integer = EgtGetType(nId)
- ' ' stampa dei dati dell'oggetto
- ' Dim sDump As String = String.Empty
- ' If nType = GDB_TY.NONE Then
- ' tBoxInfo.Text = String.Empty
- ' ElseIf nType = GDB_TY.GROUP Then
- ' If EgtGroupDump(nId, sDump) Then
- ' tBoxInfo.Text = sDump
- ' Else
- ' tBoxInfo.Text = String.Empty
- ' End If
- ' Else
- ' If EgtGeoObjDump(nId, sDump) Then
- ' tBoxInfo.Text = sDump
- ' Else
- ' tBoxInfo.Text = String.Empty
- ' End If
- ' End If
- 'End Sub
-
Private Function RevertOldIdInObjTree() As Integer
' salvo il vecchio Id
Dim nOldId As Integer = m_nObjTreeOldId
@@ -484,7 +508,7 @@ Namespace EgtCAM5
' End If
'End Sub
-#End Region
+#End Region ' Methods
End Class
diff --git a/ProjectPage/ProjectViewModel.vb b/ProjectPage/ProjectViewModel.vb
index 1396bad..7fe44f5 100644
--- a/ProjectPage/ProjectViewModel.vb
+++ b/ProjectPage/ProjectViewModel.vb
@@ -143,10 +143,12 @@ Namespace EgtCAM5
' visualizzazione avanzata dei triangoli costituenti le superfici
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
EgtSetShowTriaAdv(bShowTriaAdv)
- '' ObjTree non selezionato
- 'm_nObjTreeOldId = GDB_ID.NULL
+ ' ObjTree non selezionato
+ Application.Msn.NotifyColleagues(Application.UPDATEOBJTREEOLDID, GDB_ID.NULL)
' nascondo input box
Application.Msn.NotifyColleagues(Application.RESETINPUTBOX)
+ ' Apro progetto vuoto
+ m_Controller.NewProject(True)
End Sub
@@ -319,12 +321,6 @@ Namespace EgtCAM5
m_Controller.ExecuteCommand(Controller.CMD.CIRCLECD)
End If
End Sub)
- Application.Msn.Register(Application.ARCCSE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.ARCCSE)
- End Sub)
- Application.Msn.Register(Application.ARC3P, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.ARC3P)
- End Sub)
Application.Msn.Register(Application.ARCPDP, Sub()
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
@@ -343,9 +339,6 @@ Namespace EgtCAM5
m_Controller.ExecuteCommand(Controller.CMD.CHAMFER)
End If
End Sub)
- Application.Msn.Register(Application.RECTANGLE2P, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.RECTANGLE2P)
- End Sub)
Application.Msn.Register(Application.POLYGON, Sub()
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
m_Controller.ExecuteCommand(Controller.CMD.POLYGON)
@@ -367,35 +360,11 @@ Namespace EgtCAM5
m_Controller.ExecuteCommand(Controller.CMD.PLANE)
End If
End Sub)
- Application.Msn.Register(Application.EXTRUDE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.EXTRUDE)
- End Sub)
- Application.Msn.Register(Application.REVOLVE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.REVOLVE)
- End Sub)
- Application.Msn.Register(Application.SCREW, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.SCREW)
- End Sub)
- Application.Msn.Register(Application.RULED, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.RULED)
- End Sub)
- Application.Msn.Register(Application.MERGESURF, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.MERGESURF)
- End Sub)
- Application.Msn.Register(Application.EXPLODESURF, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.EXPLODESURF)
- End Sub)
- Application.Msn.Register(Application.INVERTSURF, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.INVERTSURF)
- End Sub)
- Application.Msn.Register(Application.DELETE, Sub()
+ Application.Msn.Register(Application.DELETE, Sub()
m_Controller.SetLastInteger(GDB_ID.SEL)
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
End Sub)
- Application.Msn.Register(Application.CHANGELAYER, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.CHANGELAYER)
- End Sub)
- Application.Msn.Register(Application.CHANGECOLOR, Sub()
+ Application.Msn.Register(Application.CHANGECOLOR, Sub()
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
m_Controller.ExecuteCommand(Controller.CMD.CHANGEALPHA)
ElseIf (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
@@ -404,16 +373,7 @@ Namespace EgtCAM5
m_Controller.ExecuteCommand(Controller.CMD.CHANGECOLOR)
End If
End Sub)
- Application.Msn.Register(Application.INVERTCURVE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.INVERTCURVE)
- End Sub)
- Application.Msn.Register(Application.CHANGESTARTCURVE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.CHANGESTARTCURVE)
- End Sub)
- Application.Msn.Register(Application.EXTENDCURVE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.TRIMEXTENDCURVE)
- End Sub)
- Application.Msn.Register(Application.BREAKCURVE, Sub()
+ Application.Msn.Register(Application.BREAKCURVE, Sub()
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
m_Controller.ExecuteCommand(Controller.CMD.BREAKCURVE)
Else
@@ -428,15 +388,6 @@ Namespace EgtCAM5
End If
m_Controller.ExecuteCommand(Controller.CMD.JOINCURVE)
End Sub)
- Application.Msn.Register(Application.EXPLODECURVE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.EXPLODECURVE)
- End Sub)
- Application.Msn.Register(Application.SETCURVETH, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.SETCURVETHICKNESS)
- End Sub)
- Application.Msn.Register(Application.MOVE, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.MOVE)
- End Sub)
Application.Msn.Register(Application.ROTATE, Sub()
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
m_Controller.ExecuteCommand(Controller.CMD.ROTATE)
@@ -458,10 +409,6 @@ Namespace EgtCAM5
m_Controller.ExecuteCommand(Controller.CMD.SCALE3D)
End If
End Sub)
- Application.Msn.Register(Application.OFFSET, Sub()
- m_Controller.ExecuteCommand(Controller.CMD.OFFSET)
- End Sub)
-
End Sub
Sub RegisterDrawOptionPanelCommands()
@@ -557,6 +504,18 @@ Namespace EgtCAM5
m_Controller.SaveAsProject(sFile, nType)
End Sub)
+ Application.Msn.Register(Application.INSERTPROJECT, Sub()
+
+ End Sub)
+ Application.Msn.Register(Application.IMPORTPROJECT, Sub()
+
+ End Sub)
+ Application.Msn.Register(Application.EXPORTPROJECT, Sub()
+
+ End Sub)
+ Application.Msn.Register(Application.EXECPROJECT, Sub()
+
+ End Sub)
End Sub
@@ -796,7 +755,7 @@ Namespace EgtCAM5
End If
' aggiorno dati correnti
'EmitTitle()
- 'EmitCurrPartLayer()
+ EmitCurrPartLayer()
If bReloadUI Then
Application.Msn.NotifyColleagues(Application.LOADOBJTREE)
Else
@@ -848,6 +807,38 @@ Namespace EgtCAM5
#End Region ' StatusBar events
+#Region "DrawOptionPanel"
+
+ Private Sub EmitCurrPartLayer()
+ Dim sText As String = " "
+ Dim sName As String = String.Empty
+ Dim colObj As Color3d
+ EgtGetColor(GDB_ID.ROOT, colObj)
+ Dim nCurrPart As Integer = m_Controller.GetCurrPart()
+ If nCurrPart <> GDB_ID.NULL Then
+ If EgtGetName(nCurrPart, sName) Then
+ sText = sName
+ Else
+ sText = "Part " + nCurrPart.ToString()
+ End If
+ EgtGetCalcColor(nCurrPart, colObj)
+ Dim nCurrLayer As Integer = m_Controller.GetCurrLayer()
+ If nCurrLayer <> GDB_ID.NULL And EgtExistsObj(nCurrLayer) Then
+ If EgtGetName(nCurrLayer, sName) Then
+ sText += " --> " + sName
+ Else
+ sText += " --> Layer " + nCurrLayer.ToString()
+ End If
+ EgtGetCalcColor(nCurrLayer, colObj)
+ End If
+ End If
+ Application.Msn.NotifyColleagues(Application.UPDATEHEADERNAME, sText)
+ colObj.A = 100
+ Application.Msn.NotifyColleagues(Application.UPDATEHEADERCOLOR, colObj)
+ End Sub
+
+#End Region 'DrawOptionPanel
+
End Class
End Namespace
\ No newline at end of file
diff --git a/SharedFieldsClass.vb b/SharedFieldsClass.vb
index 5a091e7..bf2855e 100644
--- a/SharedFieldsClass.vb
+++ b/SharedFieldsClass.vb
@@ -11,13 +11,13 @@
Friend Compo(26) As Visibility
' Array che contiene il valore della proprietà visibility per ogni campo della lavorazione
- Friend Milling(49) As Visibility
- Friend Drilling(49) As Visibility
- Friend Sawing(49) As Visibility
- Friend Pocketing(49) As Visibility
- Friend Mortising(49) As Visibility
- Friend Sawroughing(49) As Visibility
- Friend Sawfinishing(49) As Visibility
+ Friend Milling(50) As Visibility
+ Friend Drilling(50) As Visibility
+ Friend Sawing(50) As Visibility
+ Friend Pocketing(50) As Visibility
+ Friend Mortising(50) As Visibility
+ Friend Sawroughing(50) As Visibility
+ Friend Sawfinishing(50) As Visibility
Sub New()
' Parametri drill standard
@@ -48,6 +48,7 @@
Drill_Std(24) = Visibility.Visible ' NamePar
Drill_Std(25) = Visibility.Visible ' UserNotes
Drill_Std(26) = Visibility.Visible ' TcPOs
+
' Parametri drill long
Drill_Long(0) = Visibility.Visible ' Corrector
Drill_Long(1) = Visibility.Visible ' ExitPar
@@ -76,6 +77,7 @@
Drill_Long(24) = Visibility.Visible ' NamePar
Drill_Long(25) = Visibility.Visible ' UserNotes
Drill_Long(26) = Visibility.Visible ' TcPOs
+
'Parametri Saw Standard
Saw_Std(0) = Visibility.Visible ' Corrector
Saw_Std(1) = Visibility.Visible ' ExitPar
@@ -104,6 +106,7 @@
Saw_Std(24) = Visibility.Visible ' NamePar
Saw_Std(25) = Visibility.Visible ' UserNotes
Saw_Std(26) = Visibility.Visible ' TcPOs
+
'Parametri Saw Flat
Saw_Flat(0) = Visibility.Visible ' Corrector
Saw_Flat(1) = Visibility.Visible ' ExitPar
@@ -132,6 +135,7 @@
Saw_Flat(24) = Visibility.Visible ' NamePar
Saw_Flat(25) = Visibility.Visible ' UserNotes
Saw_Flat(26) = Visibility.Visible ' TcPOs
+
'Parametri Mill standard
Mill_Std(0) = Visibility.Visible ' Corrector
Mill_Std(1) = Visibility.Visible ' ExitPar
@@ -160,6 +164,7 @@
Mill_Std(24) = Visibility.Visible ' NamePar
Mill_Std(25) = Visibility.Visible ' UserNotes
Mill_Std(26) = Visibility.Visible ' TcPOs
+
'Parametri Mill NoTip
Mill_NoTip(0) = Visibility.Visible ' Corrector
Mill_NoTip(1) = Visibility.Visible ' ExitPar
@@ -188,6 +193,7 @@
Mill_NoTip(24) = Visibility.Visible ' NamePar
Mill_NoTip(25) = Visibility.Visible ' UserNotes
Mill_NoTip(26) = Visibility.Visible ' TcPOs
+
'Parametri Mortise Standard
Mortise_Std(0) = Visibility.Hidden ' Corrector
Mortise_Std(1) = Visibility.Visible ' ExitPar
@@ -216,6 +222,7 @@
Mortise_Std(24) = Visibility.Visible ' NamePar
Mortise_Std(25) = Visibility.Visible ' UserNotes
Mortise_Std(26) = Visibility.Visible ' TcPOs
+
'Parametri Compo
Compo(0) = Visibility.Hidden ' Corrector
Compo(1) = Visibility.Visible ' ExitPar
@@ -296,6 +303,8 @@
Milling(47) = Visibility.Visible ' UserNotes
Milling(48) = Visibility.Visible ' OverLapStr
Milling(49) = Visibility.Hidden ' OffsetStr
+ Milling(50) = Visibility.Hidden ' SubType
+
' Parametri Drilling
Drilling(0) = Visibility.Visible ' Invert
Drilling(1) = Visibility.Hidden ' LeaveTab
@@ -306,7 +315,7 @@
Drilling(6) = Visibility.Hidden ' ExtLinkType
Drilling(7) = Visibility.Hidden ' LeadOutType
Drilling(8) = Visibility.Hidden ' CurveUse
- Drilling(9) = Visibility.Visible ' StepType
+ Drilling(9) = Visibility.Hidden ' StepType
Drilling(10) = Visibility.Hidden ' LeadLinkType
Drilling(11) = Visibility.Visible ' Speed
Drilling(12) = Visibility.Visible ' Feed
@@ -347,6 +356,8 @@
Drilling(47) = Visibility.Visible ' UserNotes
Drilling(48) = Visibility.Hidden ' OverLapStr
Drilling(49) = Visibility.Visible ' OffsetStr
+ Drilling(50) = Visibility.Visible ' SubType
+
' Parametri Sawing
Sawing(0) = Visibility.Visible ' Invert
Sawing(1) = Visibility.Hidden ' LeaveTab
@@ -355,7 +366,7 @@
Sawing(4) = Visibility.Visible ' HeadSide
Sawing(5) = Visibility.Visible ' LeadInType
Sawing(6) = Visibility.Visible ' ExtLinkType
- Sawing(7) = Visibility.Hidden ' LeadOutType
+ Sawing(7) = Visibility.Visible ' LeadOutType
Sawing(8) = Visibility.Visible ' CurveUse
Sawing(9) = Visibility.Visible ' StepType
Sawing(10) = Visibility.Hidden ' LeadLinkType
@@ -370,7 +381,7 @@
Sawing(19) = Visibility.Visible ' Approx
Sawing(20) = Visibility.Visible ' StartPos
Sawing(21) = Visibility.Hidden ' StartSlowLen
- Sawing(22) = Visibility.Hidden ' EndSlowLen
+ Sawing(22) = Visibility.Hidden ' EndSlowLen
Sawing(23) = Visibility.Hidden ' ThroughAddlen
Sawing(24) = Visibility.Visible ' StepPar
Sawing(25) = Visibility.Visible ' ReturnPos
@@ -398,6 +409,8 @@
Sawing(47) = Visibility.Visible ' UserNotes
Sawing(48) = Visibility.Hidden ' OverLapStr
Sawing(49) = Visibility.Hidden ' OffsetStr
+ Sawing(50) = Visibility.Hidden ' SubType
+
' Parametri Pocketing
Pocketing(0) = Visibility.Visible ' Invert
Pocketing(1) = Visibility.Hidden ' LeaveTab
@@ -449,6 +462,8 @@
Pocketing(47) = Visibility.Visible ' UserNotes
Pocketing(48) = Visibility.Hidden ' OverLapStr
Pocketing(49) = Visibility.Hidden ' OffsetStr
+ Pocketing(50) = Visibility.Hidden ' SubType
+
' Parametri Mortising
Mortising(0) = Visibility.Visible ' Invert
Mortising(1) = Visibility.Hidden ' LeaveTab
@@ -500,6 +515,8 @@
Mortising(47) = Visibility.Visible ' UserNotes
Mortising(48) = Visibility.Hidden ' OverLapStr
Mortising(49) = Visibility.Hidden ' OffsetStr
+ Mortising(50) = Visibility.Hidden ' SubType
+
' Parametri Sawroughing
Sawroughing(0) = Visibility.Visible ' Invert
Sawroughing(1) = Visibility.Hidden ' LeaveTab
@@ -551,6 +568,8 @@
Sawroughing(47) = Visibility.Visible ' UserNotes
Sawroughing(48) = Visibility.Hidden ' OverLapStr
Sawroughing(49) = Visibility.Hidden ' OffsetStr
+ Sawroughing(50) = Visibility.Hidden ' SubType
+
' Parametri Sawfinishing
Sawfinishing(0) = Visibility.Visible ' Invert
Sawfinishing(1) = Visibility.Hidden ' LeaveTab
@@ -602,6 +621,7 @@
Sawfinishing(47) = Visibility.Visible ' UserNotes
Sawfinishing(48) = Visibility.Hidden ' OverLapStr
Sawfinishing(49) = Visibility.Hidden ' OffsetStr
+ Sawfinishing(50) = Visibility.Visible ' SubType
End Sub
diff --git a/TopCommandBar/TopCommandBarView.xaml b/TopCommandBar/TopCommandBarView.xaml
index d04447b..2f71f75 100644
--- a/TopCommandBar/TopCommandBarView.xaml
+++ b/TopCommandBar/TopCommandBarView.xaml
@@ -8,9 +8,10 @@
-
-
-
+
+
+
+
diff --git a/TopCommandBar/TopCommandBarViewModel.vb b/TopCommandBar/TopCommandBarViewModel.vb
index 6f13b4f..0ba9dd8 100644
--- a/TopCommandBar/TopCommandBarViewModel.vb
+++ b/TopCommandBar/TopCommandBarViewModel.vb
@@ -9,6 +9,10 @@
Private m_cmdOpen As ICommand
Private m_cmdSave As ICommand
Private m_cmdSaveAs As ICommand
+ Private m_cmdInsert As ICommand
+ Private m_cmdImport As ICommand
+ Private m_cmdExport As ICommand
+ Private m_cmdExec As ICommand
#End Region ' Fields & Properties
@@ -134,6 +138,125 @@
#End Region ' SaveAsCommand
+#Region "InsertCommand"
+
+ '''
+ ''' Returns a command that do Insert.
+ '''
+ Public ReadOnly Property InsertCommand As ICommand
+ Get
+ If m_cmdInsert Is Nothing Then
+ m_cmdInsert = New RelayCommand(AddressOf Insert, AddressOf CanInsert)
+ End If
+ Return m_cmdInsert
+ End Get
+ End Property
+
+ '''
+ ''' Execute the Insert. This method is invoked by the InsertCommand.
+ '''
+ Public Sub Insert(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.INSERTPROJECT)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanInsert(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' InsertCommand
+
+#Region "ImportCommand"
+
+ '''
+ ''' Returns a command that do Import.
+ '''
+ Public ReadOnly Property ImportCommand As ICommand
+ Get
+ If m_cmdImport Is Nothing Then
+ m_cmdImport = New RelayCommand(AddressOf Import, AddressOf CanImport)
+ End If
+ Return m_cmdImport
+ End Get
+ End Property
+
+ '''
+ ''' Execute the Import. This method is invoked by the ImportCommand.
+ '''
+ Public Sub Import(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.IMPORTPROJECT)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanImport(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' ImportCommand
+
+#Region "ExportCommand"
+
+ '''
+ ''' Returns a command that do Export.
+ '''
+ Public ReadOnly Property ExportCommand As ICommand
+ Get
+ If m_cmdExport Is Nothing Then
+ m_cmdExport = New RelayCommand(AddressOf Export, AddressOf CanExport)
+ End If
+ Return m_cmdExport
+ End Get
+ End Property
+
+ '''
+ ''' Execute the Export. This method is invoked by the ExportCommand.
+ '''
+ Public Sub Export(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.EXPORTPROJECT)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanExport(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' ExportCommand
+
+#Region "ExecCommand"
+
+ '''
+ ''' Returns a command that do Exec.
+ '''
+ Public ReadOnly Property ExecCommand As ICommand
+ Get
+ If m_cmdExec Is Nothing Then
+ m_cmdExec = New RelayCommand(AddressOf Exec, AddressOf CanExec)
+ End If
+ Return m_cmdExec
+ End Get
+ End Property
+
+ '''
+ ''' Execute the Exec. This method is invoked by the ExecCommand.
+ '''
+ Public Sub Exec(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.EXECPROJECT)
+ End Sub
+
+ '''
+ ''' Returns always true.
+ '''
+ Private Function CanExec(ByVal param As Object) As Boolean
+ Return True
+ End Function
+
+#End Region ' ExecCommand
#End Region ' Commands