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 @@ 47 48 49 + 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 @@ - - + + -