From 6233d89e0fe0d94c27fd8c33053b9e6bf919beb1 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Wed, 6 Jul 2016 09:46:23 +0000 Subject: [PATCH] EgtCAM5 : - primo rilascio. --- Application.xaml | 9 + Application.xaml.vb | 126 ++ AttachedBehaviours/InputBindingsManager.vb | 61 + Base/BaseWindow/BaseWindowView.xaml | 12 + Base/BaseWindow/BaseWindowView.xaml.vb | 24 + Base/TabViewModel.vb | 18 + Base/TreeView/TreeViewItemBase.vb | 195 ++ Base/ViewModelBase.vb | 97 + Command/RelayCommand.vb | 71 + Constants/ConstGen.vb | 190 ++ Constants/ConstIni.vb | 93 + Constants/ConstMachIni.vb | 38 + Constants/ConstMsg.vb | 33 + EgtCAM5.sln | 28 + EgtCAM5.vbproj | 364 ++++ EgtCAM5Params.vb | 4 + EgtCAM5Resources.xaml | 155 ++ IniFile.vb | 45 + MachiningsDbPage/MachiningTreeView.vb | 1255 +++++++++++++ MachiningsDbPage/MachiningsDbView.xaml | 1623 +++++++++++++++++ MachiningsDbPage/MachiningsDbView.xaml.vb | 3 + MachiningsDbPage/MachiningsDbViewModel.vb | 641 +++++++ MainWindow/MainWindow.xaml | 53 + MainWindow/MainWindow.xaml.vb | 3 + MainWindow/MainWindowViewModel.vb | 499 +++++ Messenger.vb | 229 +++ My Project/AssemblyInfo.vb | 59 + My Project/MyExtensions/MyWpfExtension.vb | 121 ++ My Project/Resources.Designer.vb | 63 + My Project/Resources.resx | 117 ++ My Project/Settings.Designer.vb | 71 + My Project/Settings.settings | 7 + ProjectPage/DrawPanel/DrawPanelView.xaml | 134 ++ ProjectPage/DrawPanel/DrawPanelView.xaml.vb | 3 + ProjectPage/DrawPanel/DrawPanelViewModel.vb | 1069 +++++++++++ .../GridViewPanel/GridViewPanelView.xaml | 103 ++ .../GridViewPanel/GridViewPanelView.xaml.vb | 3 + .../GridViewPanel/GridViewPanelViewModel.vb | 981 ++++++++++ .../DrawOptionPanel/DrawOptionPanelView.xaml | 14 + .../DrawOptionPanelView.xaml.vb | 3 + .../DrawOptionPanelViewModel.vb | 150 ++ .../InfoExpander/InfoExpanderView.xaml | 9 + .../InfoExpander/InfoExpanderView.xaml.vb | 3 + .../InfoExpander/InfoExpanderViewModel.vb | 7 + .../InputExpander/InputExpanderView.xaml | 18 + .../InputExpander/InputExpanderView.xaml.vb | 3 + .../InputExpander/InputExpanderViewModel.vb | 7 + .../ManageLayerExpanderView.xaml | 16 + .../ManageLayerExpanderView.xaml.vb | 3 + .../ManageLayerExpanderViewModel.vb | 7 + ProjectPage/ProjectView.xaml | 13 + ProjectPage/ProjectView.xaml.vb | 12 + ProjectPage/ProjectViewModel.vb | 605 ++++++ Resources/DrawPanel/Arc3P.png | Bin 0 -> 790 bytes Resources/DrawPanel/ArcCSE.png | Bin 0 -> 708 bytes Resources/DrawPanel/ArcPDP.png | Bin 0 -> 405 bytes Resources/DrawPanel/BreakCurve.png | Bin 0 -> 707 bytes Resources/DrawPanel/ChangeColor.png | Bin 0 -> 994 bytes Resources/DrawPanel/ChangeLayer.png | Bin 0 -> 1350 bytes Resources/DrawPanel/ChangeStart.png | Bin 0 -> 764 bytes Resources/DrawPanel/Circle.png | Bin 0 -> 2766 bytes Resources/DrawPanel/Delete.png | Bin 0 -> 658 bytes Resources/DrawPanel/ExplodeCurve.png | Bin 0 -> 932 bytes Resources/DrawPanel/ExplodeSurf.png | Bin 0 -> 1574 bytes Resources/DrawPanel/ExtendCurve.png | Bin 0 -> 555 bytes Resources/DrawPanel/Extrude.png | Bin 0 -> 1243 bytes Resources/DrawPanel/Fillet.png | Bin 0 -> 594 bytes Resources/DrawPanel/InvertCurve.png | Bin 0 -> 509 bytes Resources/DrawPanel/InvertSurf.png | Bin 0 -> 724 bytes Resources/DrawPanel/JoinCurve.png | Bin 0 -> 733 bytes Resources/DrawPanel/Line2P.png | Bin 0 -> 595 bytes Resources/DrawPanel/LinePDL.png | Bin 0 -> 735 bytes Resources/DrawPanel/MergeSurf.png | Bin 0 -> 749 bytes Resources/DrawPanel/Mirror.png | Bin 0 -> 437 bytes Resources/DrawPanel/Move.png | Bin 0 -> 1115 bytes Resources/DrawPanel/Offset.png | Bin 0 -> 440 bytes Resources/DrawPanel/Plane.png | Bin 0 -> 686 bytes Resources/DrawPanel/Point.png | Bin 0 -> 308 bytes Resources/DrawPanel/Polygon.png | Bin 0 -> 682 bytes Resources/DrawPanel/Rectangle2P.png | Bin 0 -> 549 bytes Resources/DrawPanel/Revolve.png | Bin 0 -> 2519 bytes Resources/DrawPanel/Rotate.png | Bin 0 -> 511 bytes Resources/DrawPanel/Ruled.png | Bin 0 -> 1096 bytes Resources/DrawPanel/Scale.png | Bin 0 -> 567 bytes Resources/DrawPanel/Screw.png | Bin 0 -> 1582 bytes Resources/DrawPanel/Text.png | Bin 0 -> 705 bytes Resources/DrawPanel/ThickCurve.png | Bin 0 -> 758 bytes Resources/GridViewPanel/Analyze.png | Bin 0 -> 962 bytes Resources/GridViewPanel/Cplane3POINTS.png | Bin 0 -> 768 bytes Resources/GridViewPanel/CplaneBACK.png | Bin 0 -> 1343 bytes Resources/GridViewPanel/CplaneBOTTOM.png | Bin 0 -> 1276 bytes Resources/GridViewPanel/CplaneELEVATION.png | Bin 0 -> 617 bytes Resources/GridViewPanel/CplaneFRONT.png | Bin 0 -> 1337 bytes Resources/GridViewPanel/CplaneLEFT.png | Bin 0 -> 1297 bytes Resources/GridViewPanel/CplaneOBJECT.png | Bin 0 -> 759 bytes Resources/GridViewPanel/CplaneORIGIN.png | Bin 0 -> 572 bytes Resources/GridViewPanel/CplanePERPCURVE.png | Bin 0 -> 937 bytes Resources/GridViewPanel/CplaneRIGHT.png | Bin 0 -> 1280 bytes Resources/GridViewPanel/CplaneROTATE.png | Bin 0 -> 1238 bytes Resources/GridViewPanel/CplaneTOP.png | Bin 0 -> 1328 bytes Resources/GridViewPanel/CplaneView.png | Bin 0 -> 1106 bytes Resources/GridViewPanel/CurveDir.png | Bin 0 -> 883 bytes Resources/GridViewPanel/GetDist.png | Bin 0 -> 331 bytes Resources/GridViewPanel/LookFromBACK.png | Bin 0 -> 428 bytes Resources/GridViewPanel/LookFromBOTTOM.png | Bin 0 -> 570 bytes Resources/GridViewPanel/LookFromFRONT.png | Bin 0 -> 528 bytes Resources/GridViewPanel/LookFromGrid.png | Bin 0 -> 1156 bytes Resources/GridViewPanel/LookFromISO_NE.png | Bin 0 -> 619 bytes Resources/GridViewPanel/LookFromISO_NW.png | Bin 0 -> 694 bytes Resources/GridViewPanel/LookFromISO_SE.png | Bin 0 -> 684 bytes Resources/GridViewPanel/LookFromISO_SO.png | Bin 0 -> 677 bytes Resources/GridViewPanel/LookFromISO_SW.png | Bin 0 -> 1189 bytes Resources/GridViewPanel/LookFromLEFT.png | Bin 0 -> 563 bytes Resources/GridViewPanel/LookFromRIGHT.png | Bin 0 -> 564 bytes Resources/GridViewPanel/LookFromTOP.png | Bin 0 -> 552 bytes Resources/GridViewPanel/LookToCplane.png | Bin 0 -> 3295 bytes Resources/GridViewPanel/RenderingHL.png | Bin 0 -> 413 bytes Resources/GridViewPanel/RenderingSH.png | Bin 0 -> 418 bytes Resources/GridViewPanel/RenderingWF.png | Bin 0 -> 510 bytes Resources/GridViewPanel/ZoomAll.png | Bin 0 -> 1106 bytes Resources/GridViewPanel/ZoomIn.png | Bin 0 -> 689 bytes Resources/GridViewPanel/ZoomOut.png | Bin 0 -> 648 bytes Resources/TreeView/Folder.png | Bin 0 -> 1292 bytes SharedFieldsClass.vb | 607 ++++++ StatusBar/StatusBarView.xaml | 68 + StatusBar/StatusBarView.xaml.vb | 3 + StatusBar/StatusBarViewModel.vb | 68 + ToolsDbPage/ToolTreeView.vb | 1126 ++++++++++++ ToolsDbPage/ToolsDbView.xaml | 937 ++++++++++ ToolsDbPage/ToolsDbView.xaml.vb | 6 + ToolsDbPage/ToolsDbViewModel.vb | 560 ++++++ Utility.vb | 85 + app.config | 23 + 133 files changed, 12953 insertions(+) create mode 100644 Application.xaml create mode 100644 Application.xaml.vb create mode 100644 AttachedBehaviours/InputBindingsManager.vb create mode 100644 Base/BaseWindow/BaseWindowView.xaml create mode 100644 Base/BaseWindow/BaseWindowView.xaml.vb create mode 100644 Base/TabViewModel.vb create mode 100644 Base/TreeView/TreeViewItemBase.vb create mode 100644 Base/ViewModelBase.vb create mode 100644 Command/RelayCommand.vb create mode 100644 Constants/ConstGen.vb create mode 100644 Constants/ConstIni.vb create mode 100644 Constants/ConstMachIni.vb create mode 100644 Constants/ConstMsg.vb create mode 100644 EgtCAM5.sln create mode 100644 EgtCAM5.vbproj create mode 100644 EgtCAM5Params.vb create mode 100644 EgtCAM5Resources.xaml create mode 100644 IniFile.vb create mode 100644 MachiningsDbPage/MachiningTreeView.vb create mode 100644 MachiningsDbPage/MachiningsDbView.xaml create mode 100644 MachiningsDbPage/MachiningsDbView.xaml.vb create mode 100644 MachiningsDbPage/MachiningsDbViewModel.vb create mode 100644 MainWindow/MainWindow.xaml create mode 100644 MainWindow/MainWindow.xaml.vb create mode 100644 MainWindow/MainWindowViewModel.vb create mode 100644 Messenger.vb create mode 100644 My Project/AssemblyInfo.vb create mode 100644 My Project/MyExtensions/MyWpfExtension.vb create mode 100644 My Project/Resources.Designer.vb create mode 100644 My Project/Resources.resx create mode 100644 My Project/Settings.Designer.vb create mode 100644 My Project/Settings.settings create mode 100644 ProjectPage/DrawPanel/DrawPanelView.xaml create mode 100644 ProjectPage/DrawPanel/DrawPanelView.xaml.vb create mode 100644 ProjectPage/DrawPanel/DrawPanelViewModel.vb create mode 100644 ProjectPage/GridViewPanel/GridViewPanelView.xaml create mode 100644 ProjectPage/GridViewPanel/GridViewPanelView.xaml.vb create mode 100644 ProjectPage/GridViewPanel/GridViewPanelViewModel.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelViewModel.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml.vb create mode 100644 ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb create mode 100644 ProjectPage/ProjectView.xaml create mode 100644 ProjectPage/ProjectView.xaml.vb create mode 100644 ProjectPage/ProjectViewModel.vb create mode 100644 Resources/DrawPanel/Arc3P.png create mode 100644 Resources/DrawPanel/ArcCSE.png create mode 100644 Resources/DrawPanel/ArcPDP.png create mode 100644 Resources/DrawPanel/BreakCurve.png create mode 100644 Resources/DrawPanel/ChangeColor.png create mode 100644 Resources/DrawPanel/ChangeLayer.png create mode 100644 Resources/DrawPanel/ChangeStart.png create mode 100644 Resources/DrawPanel/Circle.png create mode 100644 Resources/DrawPanel/Delete.png create mode 100644 Resources/DrawPanel/ExplodeCurve.png create mode 100644 Resources/DrawPanel/ExplodeSurf.png create mode 100644 Resources/DrawPanel/ExtendCurve.png create mode 100644 Resources/DrawPanel/Extrude.png create mode 100644 Resources/DrawPanel/Fillet.png create mode 100644 Resources/DrawPanel/InvertCurve.png create mode 100644 Resources/DrawPanel/InvertSurf.png create mode 100644 Resources/DrawPanel/JoinCurve.png create mode 100644 Resources/DrawPanel/Line2P.png create mode 100644 Resources/DrawPanel/LinePDL.png create mode 100644 Resources/DrawPanel/MergeSurf.png create mode 100644 Resources/DrawPanel/Mirror.png create mode 100644 Resources/DrawPanel/Move.png create mode 100644 Resources/DrawPanel/Offset.png create mode 100644 Resources/DrawPanel/Plane.png create mode 100644 Resources/DrawPanel/Point.png create mode 100644 Resources/DrawPanel/Polygon.png create mode 100644 Resources/DrawPanel/Rectangle2P.png create mode 100644 Resources/DrawPanel/Revolve.png create mode 100644 Resources/DrawPanel/Rotate.png create mode 100644 Resources/DrawPanel/Ruled.png create mode 100644 Resources/DrawPanel/Scale.png create mode 100644 Resources/DrawPanel/Screw.png create mode 100644 Resources/DrawPanel/Text.png create mode 100644 Resources/DrawPanel/ThickCurve.png create mode 100644 Resources/GridViewPanel/Analyze.png create mode 100644 Resources/GridViewPanel/Cplane3POINTS.png create mode 100644 Resources/GridViewPanel/CplaneBACK.png create mode 100644 Resources/GridViewPanel/CplaneBOTTOM.png create mode 100644 Resources/GridViewPanel/CplaneELEVATION.png create mode 100644 Resources/GridViewPanel/CplaneFRONT.png create mode 100644 Resources/GridViewPanel/CplaneLEFT.png create mode 100644 Resources/GridViewPanel/CplaneOBJECT.png create mode 100644 Resources/GridViewPanel/CplaneORIGIN.png create mode 100644 Resources/GridViewPanel/CplanePERPCURVE.png create mode 100644 Resources/GridViewPanel/CplaneRIGHT.png create mode 100644 Resources/GridViewPanel/CplaneROTATE.png create mode 100644 Resources/GridViewPanel/CplaneTOP.png create mode 100644 Resources/GridViewPanel/CplaneView.png create mode 100644 Resources/GridViewPanel/CurveDir.png create mode 100644 Resources/GridViewPanel/GetDist.png create mode 100644 Resources/GridViewPanel/LookFromBACK.png create mode 100644 Resources/GridViewPanel/LookFromBOTTOM.png create mode 100644 Resources/GridViewPanel/LookFromFRONT.png create mode 100644 Resources/GridViewPanel/LookFromGrid.png create mode 100644 Resources/GridViewPanel/LookFromISO_NE.png create mode 100644 Resources/GridViewPanel/LookFromISO_NW.png create mode 100644 Resources/GridViewPanel/LookFromISO_SE.png create mode 100644 Resources/GridViewPanel/LookFromISO_SO.png create mode 100644 Resources/GridViewPanel/LookFromISO_SW.png create mode 100644 Resources/GridViewPanel/LookFromLEFT.png create mode 100644 Resources/GridViewPanel/LookFromRIGHT.png create mode 100644 Resources/GridViewPanel/LookFromTOP.png create mode 100644 Resources/GridViewPanel/LookToCplane.png create mode 100644 Resources/GridViewPanel/RenderingHL.png create mode 100644 Resources/GridViewPanel/RenderingSH.png create mode 100644 Resources/GridViewPanel/RenderingWF.png create mode 100644 Resources/GridViewPanel/ZoomAll.png create mode 100644 Resources/GridViewPanel/ZoomIn.png create mode 100644 Resources/GridViewPanel/ZoomOut.png create mode 100644 Resources/TreeView/Folder.png create mode 100644 SharedFieldsClass.vb create mode 100644 StatusBar/StatusBarView.xaml create mode 100644 StatusBar/StatusBarView.xaml.vb create mode 100644 StatusBar/StatusBarViewModel.vb create mode 100644 ToolsDbPage/ToolTreeView.vb create mode 100644 ToolsDbPage/ToolsDbView.xaml create mode 100644 ToolsDbPage/ToolsDbView.xaml.vb create mode 100644 ToolsDbPage/ToolsDbViewModel.vb create mode 100644 Utility.vb create mode 100644 app.config diff --git a/Application.xaml b/Application.xaml new file mode 100644 index 0000000..0aefe2a --- /dev/null +++ b/Application.xaml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/Application.xaml.vb b/Application.xaml.vb new file mode 100644 index 0000000..469afc7 --- /dev/null +++ b/Application.xaml.vb @@ -0,0 +1,126 @@ +Imports EgtCAM5.EgtCAM5 +Class Application + + ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException + ' can be handled in this file. + Protected Overrides Sub OnStartUp(e As System.Windows.StartupEventArgs) + MyBase.OnStartup(e) + ' Creo la View principale + Dim MainWndView As New MainWindow + ' Creo il ViewModel principale + Dim MainWndViewModel As New MainWindowViewModel + ' Assegno il ViewModel alla View + MainWndView.DataContext = MainWndViewModel + ' Mostro la View principale + MainWndView.Show() + End Sub + +#Region "Messages" + + ' Generic messages + Friend Const MAINWINDOW_CONTENTRENDERED As String = "MainWindow_ContentRendered" + Friend Const MAINWINDOW_ACTIVATED As String = "MainWindow_Activated" + Friend Const MAINWINDOW_DEACTIVATED As String = "MainWindow_Deactivated" + Friend Const CLOSEAPPLICATION As String = "CloseApplication" + Friend Const PROJECTPAGE_SELECTED As String = "ProjectPage_Selected" + Friend Const PROJECTPAGE_DESELECTED As String = "ProjectPage_Deselected" + + ' ProjectPage messages + Friend Const NOTIFYCURRPOSCHANGED As String = "ProjectPage_CurrPosChanged" + Friend Const NOTIFYINPUTTEXT As String = "NotifyInputText" + Friend Const REGISTERINPUTTEXT As String = "Register_InputText_Text" + Friend Const NOTIFYSTATUSOUTPUT As String = "NotifyStatusOutput" + Friend Const NOTIFYSTATUSPROGRESS As String = "NotifyStatusProgress" + Friend Const NOTIFYSTATUSSTOP_ISENABLED As String = "NotifyStatusStop_IsEnabled" + + ' GridViewPanel messages + Friend Const WIREFRAME As String = "Wireframe" + Friend Const HIDDENLINE As String = "HiddenLine" + Friend Const SHADING As String = "Shading" + Friend Const ZOOMALL As String = "ZoomAll" + Friend Const ZOOMIN As String = "ZoomIn" + Friend Const ZOOMOUT As String = "ZoomOut" + Friend Const TOPVIEW As String = "TopView" + Friend Const FRONTVIEW As String = "FrontView" + Friend Const LEFTVIEW As String = "LeftView" + Friend Const BACKVIEW As String = "BackView" + Friend Const RIGHTVIEW As String = "RightView" + Friend Const ISOVIEWSW As String = "IsoViewSW" + Friend Const ISOVIEWSE As String = "IsoViewSE" + Friend Const ISOVIEWNE As String = "IsoViewNE" + Friend Const ISOVIEWNW As String = "IsoViewNW" + Friend Const CURVEDIR As String = "CurveDir" + Friend Const ANALYZE As String = "Analyze" + Friend Const GETDIST As String = "GetDist" + Friend Const CPLANETOP As String = "CPlaneTop" + Friend Const CPLANEFRONT As String = "CPlaneFront" + Friend Const CPLANERIGHT As String = "CPlaneRight" + Friend Const CPLANEBACK As String = "CPlaneBack" + Friend Const CPLANELEFT As String = "CPlaneLeft" + Friend Const CPLANEBOTTOM As String = "CPlaneBottom" + Friend Const CPLANEVIEW As String = "CPlaneView" + Friend Const CPLANEELEVATION As String = "CPlaneElevation" + Friend Const CPLANEORIGIN As String = "CPlaneOrigin" + Friend Const CPLANEROTATE As String = "CPlaneRotate" + Friend Const CPLANE3P As String = "CPlane3P" + Friend Const CPLANEPERPOBJ As String = "CPlanePerpObj" + Friend Const CPLANEOBJ As String = "CPlaneObj" + Friend Const POINT As String = "Point" + Friend Const LINE2P As String = "Line2P" + Friend Const LINEPDL As String = "LinePDL" + Friend Const CIRCLE As String = "Circle" + Friend Const ARCCSE As String = "ArcCSE" + Friend Const ARC3P As String = "Arc3P" + Friend Const ARCPDP As String = "ArcPDP" + Friend Const FILLET As String = "Fillet" + Friend Const RECTANGLE2P As String = "Rectangle2P" + Friend Const POLYGON As String = "Polygon" + Friend Const TEXT As String = "Text" + Friend Const PLANE As String = "Plane" + Friend Const EXTRUDE As String = "Extrude" + Friend Const REVOLVE As String = "Revolve" + Friend Const SCREW As String = "Screw" + Friend Const RULED As String = "Ruled" + Friend Const MERGESURF As String = "MergeSurf" + Friend Const EXPLODESURF As String = "ExplodeSurf" + Friend Const INVERTSURF As String = "InvertSurf" + Friend Const DELETE As String = "Delete" + Friend Const CHANGELAYER As String = "ChangeLayer" + Friend Const CHANGECOLOR As String = "ChangeColor" + Friend Const INVERTCURVE As String = "InvertCurve" + Friend Const CHANGESTARTCURVE As String = "ChangeStartCurve" + Friend Const EXTENDCURVE As String = "ExtendCurve" + Friend Const BREAKCURVE As String = "BreakCurve" + Friend Const JOINCURVE As String = "JoinCurve" + Friend Const EXPLODECURVE As String = "ExplodeCurve" + Friend Const SETCURVETH As String = "SetCurveTh" + Friend Const MOVE As String = "Move" + Friend Const ROTATE As String = "Rotate" + Friend Const MIRROR As String = "Mirror" + Friend Const SCALE As String = "Scale" + Friend Const OFFSET As String = "Offset" + + ' ToolsDbPage messages + Friend Const REMOVETOOL As String = "RemoveTool" + Friend Const ERRORONTOOL As String = "ErrorOnTool" + + ' MachiningsDbPage messages + Friend Const REMOVEMACHINING As String = "RemoveMachining" + Friend Const ERRORONMACHINING As String = "ErrorOnMachining" + + Shared ReadOnly _messenger As New Messenger() + + Friend Shared ReadOnly Property Msn As Messenger + Get + Return _messenger + End Get + End Property + + Private Sub Application_DispatcherUnhandledException(ByVal sender As System.Object, ByVal e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs) + MessageBox.Show(e.Exception.Message) + e.Handled = True + End Sub + +#End Region + +End Class \ No newline at end of file diff --git a/AttachedBehaviours/InputBindingsManager.vb b/AttachedBehaviours/InputBindingsManager.vb new file mode 100644 index 0000000..e656832 --- /dev/null +++ b/AttachedBehaviours/InputBindingsManager.vb @@ -0,0 +1,61 @@ +Public NotInheritable Class InputBindingsManager + + Private Sub New() + End Sub + + Public Shared ReadOnly UpdatePropertySourceWhenEnterPressedProperty As DependencyProperty = DependencyProperty.RegisterAttached("UpdatePropertySourceWhenEnterPressed", GetType(DependencyProperty), GetType(InputBindingsManager), New PropertyMetadata(Nothing, AddressOf OnUpdatePropertySourceWhenEnterPressedPropertyChanged)) + + + Shared Sub New() + End Sub + + Public Shared Sub SetUpdatePropertySourceWhenEnterPressed(dp As DependencyObject, value As DependencyProperty) + dp.SetValue(UpdatePropertySourceWhenEnterPressedProperty, value) + End Sub + + Public Shared Function GetUpdatePropertySourceWhenEnterPressed(dp As DependencyObject) As DependencyProperty + Return DirectCast(dp.GetValue(UpdatePropertySourceWhenEnterPressedProperty), DependencyProperty) + End Function + + Private Shared Sub OnUpdatePropertySourceWhenEnterPressedPropertyChanged(dp As DependencyObject, e As DependencyPropertyChangedEventArgs) + Dim element As UIElement = TryCast(dp, UIElement) + + If element Is Nothing Then + Return + End If + + If e.OldValue IsNot Nothing Then + RemoveHandler element.PreviewKeyDown, AddressOf HandlePreviewKeyDown + End If + + If e.NewValue IsNot Nothing Then + AddHandler element.PreviewKeyDown, New KeyEventHandler(AddressOf HandlePreviewKeyDown) + End If + End Sub + + Private Shared Sub HandlePreviewKeyDown(sender As Object, e As KeyEventArgs) + If e.Key = Key.Enter Then + DoUpdateSource(e.Source) + End If + End Sub + + Private Shared Sub DoUpdateSource(source As Object) + Dim [property] As DependencyProperty = GetUpdatePropertySourceWhenEnterPressed(TryCast(source, DependencyObject)) + + If [property] Is Nothing Then + Return + End If + + Dim elt As UIElement = TryCast(source, UIElement) + + If elt Is Nothing Then + Return + End If + + Dim binding As BindingExpression = BindingOperations.GetBindingExpression(elt, [property]) + + If binding IsNot Nothing Then + binding.UpdateSource() + End If + End Sub +End Class \ No newline at end of file diff --git a/Base/BaseWindow/BaseWindowView.xaml b/Base/BaseWindow/BaseWindowView.xaml new file mode 100644 index 0000000..77378dd --- /dev/null +++ b/Base/BaseWindow/BaseWindowView.xaml @@ -0,0 +1,12 @@ + + + + + + diff --git a/Base/BaseWindow/BaseWindowView.xaml.vb b/Base/BaseWindow/BaseWindowView.xaml.vb new file mode 100644 index 0000000..517ea67 --- /dev/null +++ b/Base/BaseWindow/BaseWindowView.xaml.vb @@ -0,0 +1,24 @@ +Imports EgtWPFLib5 + +Public Class BaseWindowView + Inherits EgtPanelWindow + Sub New() + + ' This call is required by the designer. + InitializeComponent() + + ' Add any initialization after the InitializeComponent() call. + ' Set this as owned by MainWindow, when this one is rendered + Application.Msn.Register(Application.MAINWINDOW_CONTENTRENDERED, Sub() + Me.Owner = Application.Current.MainWindow + End Sub) + Application.Msn.Register(Application.MAINWINDOW_ACTIVATED, Sub() + 'Me.Topmost = True + End Sub) + Application.Msn.Register(Application.MAINWINDOW_DEACTIVATED, Sub() + 'Me.Topmost = False + End Sub) + End Sub + +End Class + diff --git a/Base/TabViewModel.vb b/Base/TabViewModel.vb new file mode 100644 index 0000000..1670e91 --- /dev/null +++ b/Base/TabViewModel.vb @@ -0,0 +1,18 @@ +Namespace EgtCAM5 + + Public Class TabViewModel + Inherits ViewModelBase + + Private m_sTabName As String + Public Property sTabName As String + Get + Return m_sTabName + End Get + Set(value As String) + m_sTabName = value + End Set + End Property + + End Class + +End Namespace \ No newline at end of file diff --git a/Base/TreeView/TreeViewItemBase.vb b/Base/TreeView/TreeViewItemBase.vb new file mode 100644 index 0000000..3a8214e --- /dev/null +++ b/Base/TreeView/TreeViewItemBase.vb @@ -0,0 +1,195 @@ +Imports System.Collections.ObjectModel +Imports System.ComponentModel + +' Classe che definisce un elemento di base del TreeView +Public Class TreeViewItemBase + Implements INotifyPropertyChanged + + Friend m_Name As String + Public Overridable Property Name As String + Get + Return m_Name + End Get + Set(value As String) + If (value <> m_Name) Then + m_Name = value + NotifyPropertyChanged("Name") + End If + End Set + End Property + + Friend m_isSelected As Boolean + Public Overridable Property IsSelected As Boolean + Get + Return m_isSelected + End Get + Set(value As Boolean) + If (value <> m_isSelected) Then + m_isSelected = value + NotifyPropertyChanged("IsSelected") + End If + End Set + End Property + + Private m_isExpanded As Boolean + Public Property IsExpanded As Boolean + Get + Return m_isExpanded + End Get + Set(value As Boolean) + If (value <> m_isExpanded) Then + m_isExpanded = value + NotifyPropertyChanged("IsExpanded") + End If + End Set + End Property + + Private m_IsActive As Boolean + Public Property IsActive As Boolean + Get + Return m_IsActive + End Get + Set(value As Boolean) + If value <> m_IsActive Then + m_IsActive = value + NotifyPropertyChanged("IsActive") + End If + End Set + End Property + + Private m_IsEnabled As Boolean = True + Public Property IsEnabled As Boolean + Get + Return m_IsEnabled + End Get + Set(value As Boolean) + m_IsEnabled = value + NotifyPropertyChanged("IsEnabled") + End Set + End Property + + Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged + + Public Sub NotifyPropertyChanged(propName As String) + RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName)) + End Sub + + Sub New(Name As String) + m_Name = Name + End Sub + + Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean) + Me.Name = Name + Me.IsSelected = IsSelected + Me.IsExpanded = IsExpanded + Me.IsActive = IsActive + End Sub + +End Class + +' Elemento del treeview che ha sottoelementi del suo stesso tipo +'Public Class TreeViewItem +' Inherits TreeViewItemBase + +' Private m_sPictureString As String +' Private m_Items As ObservableCollection(Of TreeViewItem) + +' Public Property PictureString As String +' Get +' Return m_sPictureString +' End Get +' Set(value As String) +' If value <> m_sPictureString Then +' m_sPictureString = value +' NotifyPropertyChanged("PictureString") +' End If +' End Set +' End Property + +' Public Property Items As ObservableCollection(Of TreeViewItem) +' Get +' Return m_Items +' End Get +' Set(value As ObservableCollection(Of TreeViewItem)) +' m_Items = value +' End Set +' End Property + +' Sub New(Name As String) +' MyBase.New(Name) +' Me.Items = New ObservableCollection(Of TreeViewItem) +' End Sub + +' Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean) +' MyBase.New(Name, IsSelected, IsExpanded, IsActive) +' Me.Items = New ObservableCollection(Of TreeViewItem) +' End Sub + +'End Class + +' Elemento che ha sottoelementi di tipo childitem +Public Class ParentItem + Inherits TreeViewItemBase + + Private m_sPictureString As String + Private m_Items As ObservableCollection(Of ChildItem) + + Public Property PictureString As String + Get + Return m_sPictureString + End Get + Set(value As String) + If value <> m_sPictureString Then + m_sPictureString = value + NotifyPropertyChanged("PictureString") + End If + End Set + End Property + + Public Property Items As ObservableCollection(Of ChildItem) + Get + Return m_Items + End Get + Set(value As ObservableCollection(Of ChildItem)) + m_Items = value + End Set + End Property + + Sub New(Name As String) + MyBase.New(Name) + Me.Items = New ObservableCollection(Of ChildItem) + End Sub + + Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean) + MyBase.New(Name, IsSelected, IsExpanded, IsActive) + Me.Items = New ObservableCollection(Of ChildItem) + End Sub + +End Class + +' Elemento presente solo come figlio di un ParentItem +Public Class ChildItem + Inherits TreeViewItemBase + + Private m_sPictureString As String + Public Property PictureString As String + Get + Return m_sPictureString + End Get + Set(value As String) + If value <> m_sPictureString Then + m_sPictureString = value + NotifyPropertyChanged("PictureString") + End If + End Set + End Property + + Sub New(Name As String) + MyBase.New(Name) + End Sub + + Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean) + MyBase.New(Name, IsSelected, IsExpanded, IsActive) + End Sub + +End Class diff --git a/Base/ViewModelBase.vb b/Base/ViewModelBase.vb new file mode 100644 index 0000000..a50c88b --- /dev/null +++ b/Base/ViewModelBase.vb @@ -0,0 +1,97 @@ +Imports System.ComponentModel + +Namespace EgtCAM5 + + Public Class ViewModelBase + Implements INotifyPropertyChanged + +#Region "Constructor" + + Protected Sub New() + End Sub + +#End Region ' Constructor + +#Region "DisplayName" + + ''' + ''' Returns the user-friendly name of this object. + ''' Child classes can set this property to a new value, + ''' or override it to determine the value on-demand. + ''' + Private m_sDisplayName As String + Public Overridable Property sDisplayName() As String + Get + Return m_sDisplayName + End Get + Protected Set(ByVal value As String) + m_sDisplayName = value + End Set + End Property + +#End Region ' DisplayName + +#Region "Debugging Aides" + + ''' + ''' Warns the developer if this object does not have + ''' a public property with the specified name. This + ''' method does not exist in a Release build. + ''' + _ + Public Sub VerifyPropertyName(ByVal sPropertyName As String) + ' Verify that the property name matches a real, + ' public, instance property on this object. + If TypeDescriptor.GetProperties(Me)(sPropertyName) Is Nothing Then + Dim msg As String = "Invalid property name: " & sPropertyName + + If Me.ThrowOnInvalidPropertyName Then + Throw New Exception(msg) + Else + Debug.Fail(msg) + End If + End If + End Sub + + ''' + ''' Returns whether an exception is thrown, or if a Debug.Fail() is used + ''' when an invalid property name is passed to the VerifyPropertyName method. + ''' The default value is false, but subclasses used by unit tests might + ''' override this property's getter to return true. + ''' + Private privateThrowOnInvalidPropertyName As Boolean + Protected Overridable Property ThrowOnInvalidPropertyName() As Boolean + Get + Return privateThrowOnInvalidPropertyName + End Get + Set(ByVal value As Boolean) + privateThrowOnInvalidPropertyName = value + End Set + End Property + +#End Region ' Debugging Aides + +#Region "INotifyPropertyChanged Members" + + ''' + ''' Raised when a property on this object has a new value. + ''' + Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged + + ''' + ''' Raises this object's PropertyChanged event. + ''' + ''' The property that has a new value. + Protected Overridable Sub OnPropertyChanged(ByVal sPropertyName As String) + Me.VerifyPropertyName(sPropertyName) + If Me.PropertyChangedEvent IsNot Nothing Then + RaiseEvent PropertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(sPropertyName)) + End If + + End Sub + +#End Region ' INotifyPropertyChanged Members + + End Class + +End Namespace \ No newline at end of file diff --git a/Command/RelayCommand.vb b/Command/RelayCommand.vb new file mode 100644 index 0000000..f000571 --- /dev/null +++ b/Command/RelayCommand.vb @@ -0,0 +1,71 @@ +Namespace EgtCAM5 + + ''' + ''' A command whose sole purpose is to + ''' relay its functionality to other + ''' objects by invoking delegates. The + ''' default return value for the CanExecute + ''' method is 'true'. + ''' + Public Class RelayCommand + Implements ICommand + +#Region "Fields" + + Private ReadOnly _execute As Action(Of Object) + Private ReadOnly _canExecute As Predicate(Of Object) + +#End Region ' Fields + +#Region "Constructors" + + ''' + ''' Creates a new command that can always execute. + ''' + ''' The execution logic. + Public Sub New(ByVal execute As Action(Of Object)) + Me.New(execute, Nothing) + End Sub + + ''' + ''' Creates a new command. + ''' + ''' The execution logic. + ''' The execution status logic. + Public Sub New(ByVal execute As Action(Of Object), ByVal canExecute As Predicate(Of Object)) + If execute Is Nothing Then + Throw New ArgumentNullException("execute") + End If + + _execute = execute + _canExecute = canExecute + End Sub + +#End Region ' Constructors + +#Region "ICommand Members" + + _ + Public Function CanExecute(ByVal parameter As Object) As Boolean Implements ICommand.CanExecute + Return If(_canExecute Is Nothing, True, _canExecute(parameter)) + End Function + + Public Custom Event CanExecuteChanged As EventHandler Implements ICommand.CanExecuteChanged + AddHandler(ByVal value As EventHandler) + AddHandler CommandManager.RequerySuggested, value + End AddHandler + RemoveHandler(ByVal value As EventHandler) + RemoveHandler CommandManager.RequerySuggested, value + End RemoveHandler + RaiseEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) + End RaiseEvent + End Event + + Public Sub Execute(ByVal parameter As Object) Implements ICommand.Execute + _execute(parameter) + End Sub + +#End Region ' ICommand Members + End Class + +End Namespace \ No newline at end of file diff --git a/Constants/ConstGen.vb b/Constants/ConstGen.vb new file mode 100644 index 0000000..b35c097 --- /dev/null +++ b/Constants/ConstGen.vb @@ -0,0 +1,190 @@ +'---------------------------------------------------------------------------- +' EgalTech 2015-2015 +'---------------------------------------------------------------------------- +' File : ConstGen.vb Data : 12.02.15 Versione : 1.6b3 +' Contenuto : Modulo costanti generali. +' +' +' +' Modifiche : 12.02.15 DS Creazione modulo. +' +' +'---------------------------------------------------------------------------- +Imports EgtUILib + +Module ConstGen + + ' File con direttorio radice dei dati + Public Const DAT_FILE_NAME As String = "DataRoot.Ini" + Public Const S_DATA As String = "Data" + Public Const K_DATAROOT As String = "DataRoot" + + ' File con dati di licenza + Public Const LIC_FILE_NAME As String = "EgtCAM5.lic" + Public Const S_LICENCE As String = "Licence" + Public Const K_KEY As String = "Key" + + ' File di log generale + Public Const GENLOG_FILE_NAME As String = "EgtCAM5Log.txt" + ' File di log dei comandi + Public Const CMDLOG_FILE_NAME As String = "EgtCAM5Log.tua" + + ' Sottodirettorio di configurazione + Public Const CONF_DIR As String = "Config" + ' Sottodirettorio delle risorse + Public Const RES_DIR As String = "Resources" + ' Sottodirettorio temporaneo + Public Const TEMP_DIR As String = "Temp" + ' Sottodirettorio per Cam automatico + Public Const CAMAUTO_DIR As String = "CamAuto" + ' Sottodirettorio per Csv automatico + Public Const CSVAUTO_DIR As String = "CsvAuto" + ' Sottodirettorio per file Cnc + Public Const CNC_DIR As String = "CNC" + ' Sottodirettorio di default per il salvataggio + Public Const SAVE_DFL_DIR As String = "Data" + ' Sottodirettorio di default per il salvataggio con nome + Public Const SAVE_DFL_NAMEDIR As String = "MyProjects" + ' Sottodirettorio di default per le macchine + Public Const MACHINES_DFL_DIR As String = "Machines" + ' Sottodirettorio con le dime salvate + Public Const TEMPLATE_DFL_DIR As String = "CopyTemplate" + + ' Delta Z sovratavola per evitare problemi di visualizzazione texture + Public Const DELTAZ_ADDTAB As Double = 0.1 + + ' Nome testa con ventose per spostamento pezzi + Public Const VACUUM_HEAD As String = "H4" + ' Nome gruppo layout in testa con ventose + Public Const VACUUM_HEAD_LAYOUT As String = "LAYOUT" + ' Nome oggetto frame prima uscita di una testa + Public Const HEAD_FIRST_EXIT As String = "_T1" + + ' Costanti per lavorazioni + Public Const MACH_GROUP As String = "Mach01" + Public Const MAIN_TAB As String = "MainTab" + Public Const SECOND_TAB As String = "2ndTab" + Public Const PHOTO_GRP As String = "Photos" + Public Const PHOTO_NAME As String = "Raw" + + ' Nome della superficie del grezzo + Public Const NAME_RAW_SOLID As String = "RawSolid" + ' Nome del centro del grezzo + Public Const NAME_RAW_CENTER As String = "RawCenter" + ' Nome del contorno di kerf nel grezzo + Public Const NAME_KERF As String = "Kerf" + ' Chiave per info di kerf nel grezzo + Public Const KEY_KERF As String = "Kerf" + ' Nome del contorno del grezzo + Public Const NAME_RAW_OUTLINE As String = "RawOutline" + ' Nome della regione del kerf grezzo + Public Const NAME_KERF_REGION As String = "KerfRegion" + ' Nome della regione fuori kerf nel grezzo + Public Const NAME_OUTKERF As String = "SheetOut" + ' Chiave per definizione del grezzo per punti + Public Const KEY_RAWBYPOINTS As String = "Rbp" + ' Nome del contorno di un'area rovinata + Public Const NAME_DAMAGED As String = "Damaged" + ' Nome della regione di un'area rovinata + Public Const NAME_DAMAGED_REG As String = "DmgReg" + + ' Contrassegno di progetto OmagCut + Public Const NAME_PROJMARK As String = "OmagCut" + ' Info per stato flag taglio ridotto + Public Const INFO_REDUCEDCUT = "ReducedCut" + ' Info per lavorazioni già ordinate + Public Const INFO_MACHORDER As String = "MachOrder" + ' Info per indice progetto + Public Const INFO_PROJINDEX As String = "ProjIndex" + + ' Nome layer delle regioni + Public Const NAME_REGION As String = "Region" + ' Delta Z regioni di pezzi per evitare problemi di visualizzazione con grezzi + Public Const DELTAZ_REG As Double = 0.1 + ' Nome layer contorni esterni + Public Const NAME_OUTLOOP As String = "OutLoop" + ' Nome layer contorni interni + Public Const NAME_INLOOP As String = "InLoop" + ' Nome layer percorsi sul pezzo + Public Const NAME_ONPATH As String = "OnPath" + ' Nome layer preview + Public Const NAME_PREVIEW As String = "PV" + ' Info in entità da tagliare per affondamento + Public Const INFO_DEPTH As String = "Depth" + ' Info in entità da tagliare per angolo di lato + Public Const INFO_SIDE_ANGLE As String = "SideAng" + ' Info in entità da tagliare per abilitare possibilità di inversione + Public Const INFO_ENABLE_INVERT As String = "EnInv" + ' Info in preview lavorazione con identificativo layer preview spostato nel pezzo + Public Const INFO_PV_ONPART_ID As String = "PvId" + ' Info in lavorazione con identificativo lavorazioni inglobate + Public Const INFO_MCH_OTHMID As String = "OthMIds" + ' Info lavorazione disabilitata dall'utente + Public Const INFO_MCH_USER_OFF As String = "UserOff" + ' Nome contorno taglio + Public Const NAME_PV_CUT As String = "CUT" + ' Nome contorno pre-taglio + Public Const NAME_PV_PRECUT As String = "PRC" + ' Nome contorno post-taglio + Public Const NAME_PV_POSTCUT As String = "POC" + ' Nome contorno in basso taglio + Public Const NAME_PV_DOWN_CUT As String = "DCUT" + ' Nome contorno in basso pre-taglio + Public Const NAME_PV_DOWN_PRECUT As String = "DPRC" + ' Nome contorno in basso post-taglio + Public Const NAME_PV_DOWN_POSTCUT As String = "DPOC" + ' Info in lavorazione taglio per attacco originale + Public Const INFO_MCH_ORILEADIN As String = "OriLI" + ' Info in lavorazione taglio per uscita originale + Public Const INFO_MCH_ORILEADOUT As String = "OriLO" + ' Info in pezzo con path di Csv di provenienza + Public Const INFO_CSV_PATH As String = "CsvPath" + ' Info in pezzo con suo nome in Csv + Public Const INFO_CSV_PART As String = "CsvPart" + + ' Nome di pezzo che è una cornice + Public Const NAME_FRAME As String = "Frame" + ' Nome del layer con la sezione della cornice + Public Const NAME_SECT As String = "Sect" + ' Nome del layer con la linea guida della cornice + Public Const NAME_GUIDE As String = "Guide" + ' Nome del layer con la superficie della cornice + Public Const NAME_SURF As String = "Surf" + ' Info con direzione della cornice (0=lungoX,1=lungoY) + Public Const INFO_FRAME_DIR As String = "Dir" + ' Nome della lavorazione di sgrossatura cornici + Public Const NAME_FRAME_SAWROU As String = "FrameSawRou" + ' Nome della lavorazione di finitura cornici + Public Const NAME_FRAME_SAWFIN As String = "FrameSawFin" + ' Nome della lavorazione di spatolatura cornici + Public Const NAME_FRAME_SAWSIDEFIN As String = "FrameSawSideFin" + + ' Nome di pezzo temporaneo che serve per copia dime + Public Const NAME_COPYTEMPLATE As String = "CopyTemplate" + + ' Costante per flag di BBox + Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM + + ' Colori per lavorazioni + Public Function COL_MCH_CUT() As Color3d + Return New Color3d(0, 255, 0) + End Function + Public Function COL_MCH_DISABLED() As Color3d + Return New Color3d(192, 192, 192) + End Function + Public Function COL_MCH_DIS_INTERF() As Color3d + Return New Color3d(255, 128, 128) + End Function + Public Function COL_MCH_FREE() As Color3d + Return New Color3d(0, 0, 255) + End Function + Public Function COL_MCH_INTERF() As Color3d + Return New Color3d(255, 0, 0) + End Function + + ' Colore superficie di cornice + Public Function COL_FRAME() As Color3d + Return New Color3d(128, 192, 96) + End Function + +End Module diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb new file mode 100644 index 0000000..7182302 --- /dev/null +++ b/Constants/ConstIni.vb @@ -0,0 +1,93 @@ +'---------------------------------------------------------------------------- +' EgalTech 2015-2015 +'---------------------------------------------------------------------------- +' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3 +' Contenuto : Modulo costanti sezione e chiavi per file Ini. +' +' +' +' Modifiche : 12.02.15 DS Creazione modulo. +' +' +'---------------------------------------------------------------------------- + +Module ConstIni + + Public Const INI_FILE_NAME As String = "EgtCAM5.ini" + + Public Const S_GENERAL As String = "General" + Public Const K_DEBUG As String = "Debug" + Public Const K_LICENCE As String = "Licence" + Public Const K_USERLEVEL As String = "UserLevel" + Public Const K_MAXINST As String = "MaxInstances" + Public Const K_INSTANCES As String = "Instances" + Public Const K_COMMANDLOG As String = "CommandLog" + Public Const K_MESSAGESDIR As String = "MessagesDir" + Public Const K_MESSAGES As String = "Messages" + Public Const K_WINPLACE As String = "WinPlace" + Public Const K_LASTNGEDIR As String = "LastNgeDir" + Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir" + Public Const K_LASTLUADIR As String = "LastLuaDir" + Public Const K_LASTIMPDIR As String = "LastImpDir" + Public Const K_LASTEXPDIR As String = "LastExpDir" + + Public Const S_LUA As String = "Lua" + Public Const K_LIBSDIR As String = "LibsDir" + Public Const K_BASELIB As String = "BaseLib" + + Public Const S_GEOMDB As String = "GeomDB" + Public Const K_DEFAULTFONT As String = "DefaultFont" + Public Const K_NFEFONTDIR As String = "NfeFontDir" + Public Const K_DEFAULTCOLOR As String = "DefaultColor" + Public Const K_SAVETYPE As String = "SaveType" + + Public Const S_OPENGL As String = "OpenGL" + Public Const K_DOUBLEBUFFER As String = "DoubleBuffer" + Public Const K_COLORBITS As String = "ColorBits" + Public Const K_DEPTHBITS As String = "DepthBits" + Public Const K_DRIVER As String = "Driver" + + Public Const S_SCENE As String = "Scene" + Public Const K_BACKTOP As String = "BackTop" + Public Const K_BACKBOTTOM As String = "BackBottom" + Public Const K_SHOWGFRAME As String = "ShowGFrame" + Public Const K_MARK As String = "Mark" + Public Const K_SELSURF As String = "SelSurf" + Public Const K_SHOWMODE As String = "ShowMode" + Public Const K_CURVEDIR As String = "CurveDir" + Public Const K_SHOWTRIAADV As String = "ShowTriaAdv" + Public Const K_ZOOMWIN As String = "ZoomWin" + Public Const K_DISTLINE As String = "DistLine" + Public Const K_MMUNITS As String = "MmUnits" + + Public Const S_GRID As String = "Grid" + Public Const K_SHOWGRID As String = "ShowGrid" + Public Const K_SHOWFRAME As String = "ShowFrame" + Public Const K_SNAPSTEP As String = "SnapStep" + Public Const K_SNAPSTEPINCH As String = "SnapStepInch" + Public Const K_MINLINESSTEP As String = "MinLineSStep" + Public Const K_MAJLINESSTEP As String = "MajLineSStep" + Public Const K_EXTSSTEP As String = "ExtSStep" + Public Const K_MINLNCOLOR As String = "MinLnColor" + Public Const K_MAJLNCOLOR As String = "MajLnColor" + + Public Const S_TABSPECIAL As String = "TabSpecial" + Public Const K_TSSHOW As String = "Show" + + Public Const S_COMPO As String = "Compo" + Public Const K_CMPWINPLACE As String = "WinPlace" + Public Const K_COMPODIR As String = "CompoDir" + + Public Const S_FLATPARTS As String = "FlatParts" + Public Const K_FLPWINPLACE As String = "WinPlace" + Public Const K_FLPCURRDIR As String = "CurrDir" + + Public Const S_MACH As String = "Mach" + Public Const K_MACHINESDIR As String = "MachinesDir" + Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir" + + Public Const S_MRUFILES As String = "MruFiles" + Public Const S_MRUSCRIPTS As String = "MruScripts" + Public Const K_FILE As String = "File" + +End Module diff --git a/Constants/ConstMachIni.vb b/Constants/ConstMachIni.vb new file mode 100644 index 0000000..910eae0 --- /dev/null +++ b/Constants/ConstMachIni.vb @@ -0,0 +1,38 @@ +Module ConstMachIni + + Public Const S_TOOLS As String = "Tools" + Public Const K_DRILLBIT As String = "Drillbit" + Public Const K_SAWBLADE As String = "Sawblade" + Public Const K_MILL As String = "Mill" + Public Const K_MORTISE As String = "Mortise" + Public Const K_COMPO As String = "Compo" + Public Const K_SHOWTOOLCHANGER As String = "ShowToolChanger" + Public Const K_SHOWHEADEXIT As String = "ShowHeadExit" + Public Const K_DRILLHOLDER As String = "DrillHolder" + Public Const K_SAWBLADEHOLDER As String = "SawBladeHolder" + Public Const K_MILLHOLDER As String = "MillHolder" + Public Const K_DRILLMAKER As String = "DrillMaker" + Public Const K_SAWBLADEMAKER As String = "SawBladeMaker" + Public Const K_MILLMAKER As String = "MillMaker" + Public Const K_MOUNTEDTOOLCONFIG As String = "MountedToolConfig" + + Public Const S_TOOLHOLDER As String = "ToolHolder" + + Public Const S_MACHININGS As String = "Machinings" + Public Const K_SAWING As String = "Sawing" + Public Const K_DRILLING As String = "Drilling" + Public Const K_MILLING As String = "Milling" + Public Const K_POCKETING As String = "Pocketing" + Public Const K_MORTISING As String = "Mortising" + Public Const K_SAWROUGHING As String = "SawRoughing" + Public Const K_SAWFINISHING As String = "SawFinishing" + + Public Const S_TOOLCHANGER As String = "ToolChanger" + Public Const K_NUMBER As String = "Number" + Public Const K_POS As String = "Pos" + Public Const K_NAME As String = "Name" + Public Const K_MANUALNUMBER As String = "ManualNumber" + Public Const K_MANUALPOS As String = "ManualPos" + Public Const K_MANUALNAME As String = "ManualName" + +End Module diff --git a/Constants/ConstMsg.vb b/Constants/ConstMsg.vb new file mode 100644 index 0000000..9b7db7c --- /dev/null +++ b/Constants/ConstMsg.vb @@ -0,0 +1,33 @@ +Module ConstMsg + + 'Public Const MSG_MISSINGKEYWD As Integer = 10100 + 'Public Const MSG_NUMERICKEYBOARDWD As Integer = 10200 + + Public Const MSG_EGTCAM5 As Integer = 5000 + Public Const MSG_MAINWINDOW As Integer = MSG_EGTCAM5 + Public Const MSG_TOOLSDBPAGE As Integer = MSG_EGTCAM5 + 1000 + Public Const MSG_MACHININGSDBPAGE As Integer = MSG_EGTCAM5 + 1100 + 'Public Const MSG_MANUALAXESMOVEPAGEUC As Integer = MSG_OMAGCUT + 220 + 'Public Const MSG_CADCUTPAGEUC As Integer = MSG_OMAGCUT + 300 + 'Public Const MSG_NESTPAGEUC As Integer = MSG_OMAGCUT + 330 + 'Public Const MSG_SPLITPAGEUC As Integer = MSG_OMAGCUT + 340 + 'Public Const MSG_MOVERAWPAGEUC As Integer = MSG_OMAGCUT + 360 + 'Public Const MSG_DRAWPAGEUC As Integer = MSG_OMAGCUT + 380 + 'Public Const MSG_COMPONENTPAGEUC As Integer = MSG_OMAGCUT + 400 + 'Public Const MSG_IMPORTPAGEUC As Integer = MSG_OMAGCUT + 450 + 'Public Const MSG_OPENPAGEUC As Integer = MSG_OMAGCUT + 490 + 'Public Const MSG_RAWPARTPAGEUC As Integer = MSG_OMAGCUT + 500 + 'Public Const MSG_CHOOSEMACHININGPAGEUC As Integer = MSG_OMAGCUT + 535 + 'Public Const MSG_SIMULATIONPAGEUC As Integer = MSG_OMAGCUT + 550 + 'Public Const MSG_FRAMECUTPAGEUC As Integer = MSG_OMAGCUT + 600 + 'Public Const MSG_MACHINEPAGEUC As Integer = MSG_OMAGCUT + 700 + 'Public Const MSG_TOOLSDBPAGEUC As Integer = MSG_OMAGCUT + 720 + 'Public Const MSG_MACHININGSDBPAGEUC As Integer = MSG_OMAGCUT + 760 + 'Public Const MSG_COMBOBOXPARAM As Integer = MSG_OMAGCUT + 800 + 'Public Const MSG_ALARMSPAGEUC As Integer = MSG_OMAGCUT + 900 + 'Public Const MSG_MACHINECNPAGEUC As Integer = MSG_OMAGCUT + 930 + 'Public Const MSG_OPTIONSPAGEUC As Integer = MSG_OMAGCUT + 950 + 'Public Const MSG_EGTMSGBOX As Integer = MSG_OMAGCUT + 1100 + 'Public Const MSG_CSVPAGEUC As Integer = MSG_OMAGCUT + 1200 + +End Module diff --git a/EgtCAM5.sln b/EgtCAM5.sln new file mode 100644 index 0000000..46e80f4 --- /dev/null +++ b/EgtCAM5.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EgtCAM5", "EgtCAM5.vbproj", "{D8543E3E-F5E1-44F3-813C-94E3A91677BC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Debug|x64.ActiveCfg = Debug|x64 + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Debug|x64.Build.0 = Debug|x64 + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Debug|x86.ActiveCfg = Debug|x86 + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Debug|x86.Build.0 = Debug|x86 + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Release|x64.ActiveCfg = Release|x64 + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Release|x64.Build.0 = Release|x64 + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Release|x86.ActiveCfg = Release|x86 + {D8543E3E-F5E1-44F3-813C-94E3A91677BC}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj new file mode 100644 index 0000000..7b4503b --- /dev/null +++ b/EgtCAM5.vbproj @@ -0,0 +1,364 @@ + + + + + Debug + AnyCPU + {D8543E3E-F5E1-44F3-813C-94E3A91677BC} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + WinExe + EgtCAM5 + EgtCAM5 + v4.0 + Custom + Client + + + On + + + Text + + + Off + + + On + + + true + true + true + bin\x64\Debug\ + EgtCAM5.xml + + + full + x64 + MinimumRecommendedRules.ruleset + + + true + bin\x64\Release\ + EgtCAM5.xml + true + + + pdbonly + x64 + MinimumRecommendedRules.ruleset + + + true + true + true + bin\x86\Debug\ + EgtCAM5.xml + + + full + x86 + MinimumRecommendedRules.ruleset + + + true + bin\x86\Release\ + EgtCAM5.xml + true + + + pdbonly + x64 + MinimumRecommendedRules.ruleset + + + OnBuildSuccess + + + + ..\..\EgtProg\DllD32\EgtUILib.dll + + + ..\EgtWPFLib5\bin\Debug\EgtWPFLib5.dll + + + + + + + + + + + + 4.0 + + + + + + + + + + MSBuild:Compile + Designer + + + + BaseWindowView.xaml + + + + + + + + + + + + MachiningsDbView.xaml + + + + + + + DrawPanelView.xaml + + + + GridViewPanelView.xaml + + + + + DrawOptionPanelView.xaml + + + + InfoExpanderView.xaml + + + + InputExpanderView.xaml + + + + ManageLayerExpanderView.xaml + + + + ProjectView.xaml + + + + StatusBarView.xaml + + + + + ToolsDbView.xaml + + + + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Application.xaml + Code + + + MainWindow.xaml + Code + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + + + + + + + + + + Code + + + Microsoft.VisualBasic.WPF.MyExtension + 1.0.0.0 + + + True + True + Resources.resx + + + True + Settings.settings + True + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + + + + SettingsSingleFileGenerator + Settings.Designer.vb + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe +IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5D32.exe +IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R64.exe +IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5D64.exe + + \ No newline at end of file diff --git a/EgtCAM5Params.vb b/EgtCAM5Params.vb new file mode 100644 index 0000000..a649b7a --- /dev/null +++ b/EgtCAM5Params.vb @@ -0,0 +1,4 @@ +Module EgtCAM5Params + + +End Module diff --git a/EgtCAM5Resources.xaml b/EgtCAM5Resources.xaml new file mode 100644 index 0000000..5d26a7f --- /dev/null +++ b/EgtCAM5Resources.xaml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IniFile.vb b/IniFile.vb new file mode 100644 index 0000000..21edc95 --- /dev/null +++ b/IniFile.vb @@ -0,0 +1,45 @@ +Imports EgtUILib + +Module IniFile + + ' MainWindow Page + Friend m_sIniFilePath As String + Friend m_sMachinesRoot As String + ' Project Page + Friend m_ProjectSceneContext As Integer + ' TOOLS DB PAGE + Friend m_sDbsCurrMachIniFilePath As String 'IniFile della macchina correntemente selezionata nella pagina di Db selezionata (Tools o Machinings) + Friend m_sTdbCurrMachToolsDirPath As String + ' Variabile che contiene la path della cartella che contiene i ToolMaker + Friend m_sToolMakersDir As String = String.Empty + ' Variabile che contiene il contesto della scena presente nel database utensili + Friend m_ToolsDbSceneContext As Integer + + Public Function GetPrivateProfileInt(IpAppName As String, IpKeyName As String, nDefault As Integer) As Integer + Return EgtUILib.GetPrivateProfileInt(IpAppName, IpKeyName, nDefault, m_sIniFilePath) + End Function + + Public Function GetPrivateProfileDouble(IpAppName As String, IpKeyName As String, nDefault As Integer) As Double + Return EgtUILib.GetPrivateProfileDouble(IpAppName, IpKeyName, nDefault, m_sIniFilePath) + End Function + + Public Function GetPrivateProfileString(IpAppName As String, IpKeyName As String, IpDefault As String, ByRef IpString As String) As Integer + Return EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, IpDefault, IpString, m_sIniFilePath) + End Function + + Public Function GetPrivateProfileColor(IpAppName As String, IpKeyName As String, ByRef Col As EgtUILib.EgtInterface.Color3d) As Boolean + Return EgtUILib.GetPrivateProfileColor(IpAppName, IpKeyName, Col, m_sIniFilePath) + End Function + + Public Function GetPrivateProfileWinPos(IpAppName As String, IpKeyName As String, ByRef nFlag As Integer, ByRef nLeft As Integer, ByRef nTop As Integer, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean + Return EgtUILib.GetPrivateProfileWinPos(IpAppName, IpKeyName, nFlag, nLeft, nTop, nWidth, nHeight, m_sIniFilePath) + End Function + + Public Function GetPrivateProfileZoomWin(IpAppName As String, IpKeyName As String, ByRef bOutline As Boolean, ByRef Col As EgtUILib.EgtInterface.Color3d) As Boolean + Return EgtUILib.GetPrivateProfileZoomWin(IpAppName, IpKeyName, bOutline, Col, m_sIniFilePath) + End Function + + Public Function WritePrivateProfileString(IpAppName As String, IpKeyName As String, ByRef IpString As String) As Boolean + Return EgtUILib.WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sIniFilePath) + End Function +End Module diff --git a/MachiningsDbPage/MachiningTreeView.vb b/MachiningsDbPage/MachiningTreeView.vb new file mode 100644 index 0000000..5413526 --- /dev/null +++ b/MachiningsDbPage/MachiningTreeView.vb @@ -0,0 +1,1255 @@ +Imports System.Collections.ObjectModel +Imports System.ComponentModel +Imports EgtUILib +Imports EgtCAM5.Utility + +''' +''' Class that represent a Machining in the treeview. +''' It's an element in the treeview that represent the child of familymachiningtreeviewitem, but also the class that read and write in the machining's database +''' +Public Class MachiningTreeViewItem + Inherits ChildItem + Implements IDataErrorInfo + +#Region "Machining Property" + + Private m_Type As MCH_MY + Public ReadOnly Property Type As Integer + Get + Return m_Type + End Get + End Property + + Private m_ErrorOnTool As Boolean + Public Property ErrorOnTool As Boolean + Get + Return m_ErrorOnTool + End Get + Set(value As Boolean) + If IsValid Then + m_ErrorOnTool = False + Application.Msn.NotifyColleagues(Application.ERRORONMACHINING, Nothing) + Else + m_ErrorOnTool = True + Application.Msn.NotifyColleagues(Application.ERRORONMACHINING, Me) + End If + End Set + End Property + + 'ObservableCollection che contiene le variabili per il combobox WorkSide + Private m_WorkSideList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_WS.CENTER, "Center"), New IdNameStruct(MCH_SAW_WS.LEFT, "Left"), New IdNameStruct(MCH_SAW_WS.RIGHT, "Right")}) + Public ReadOnly Property WorkSideList As ObservableCollection(Of IdNameStruct) + Get + Return m_WorkSideList + End Get + End Property + ' Proprietà che indica il WorkSide (MCH_SAW_WS) + Public Property SelectedWorkSide As Integer + Get + Dim nWorkSide As Integer = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.WORKSIDE, nWorkSide) + Return IdNameStruct.SearchToId(nWorkSide, WorkSideList) + End Get + Set(value As Integer) + EgtMdbSetCurrMachiningParam(MCH_MP.WORKSIDE, IdNameStruct.SearchFromId(value, WorkSideList)) + End Set + End Property + + 'dim m_precedence As + 'ObservableCollection che contiene le variabili per il combobox LeadLinkType + Private m_LeadLinkTypeList As ObservableCollection(Of IdNameStruct) + Public ReadOnly Property LeadLinkTypeList As ObservableCollection(Of IdNameStruct) + Get + Select Case m_Type + Case MCH_MY.SAWROUGHING + m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWROU_LL.CENT, "Center"), New IdNameStruct(MCH_SAWROU_LL.EXT, "External")}) + Case MCH_MY.SAWFINISHING + m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWFIN_LL.STD, "Standard"), New IdNameStruct(MCH_SAWFIN_LL.CENT, "Center"), New IdNameStruct(MCH_SAWFIN_LL.EXT, "External")}) + Case Else + m_LeadLinkTypeList = Nothing + End Select + Return m_LeadLinkTypeList + End Get + End Property + Private m_LeadLinkTypeGetError As Boolean = False + ' Proprietà che indica il WorkSide (MCH_SAW_WS) + Public Property SelectedLeadLinkType As Integer + Get + Dim nLeadLinkType As Integer = 0 + If EgtMdbGetCurrMachiningParam(MCH_MP.LEADLINKTYPE, nLeadLinkType) Then + m_LeadLinkTypeGetError = True + Else + m_LeadLinkTypeGetError = False + End If + Return IdNameStruct.SearchToId(nLeadLinkType, m_LeadLinkTypeList) + End Get + Set(value As Integer) + If m_LeadLinkTypeGetError Then + EgtMdbSetCurrMachiningParam(MCH_MP.LEADLINKTYPE, IdNameStruct.SearchFromId(value, m_LeadLinkTypeList)) + End If + End Set + End Property + + ' Variabile che indica se c'è un errore nel nome della lavorazione (ad esempio nome già utilizzato) + Dim bErrorMachiningName As Boolean = False + ''' + ''' Property that read and write to the tool's database the Name + ''' + Public Property NamePar As String + Get + EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim sNamePar As String = String.Empty + EgtMdbGetCurrMachiningParam(MCH_MP.NAME, sNamePar) + Return sNamePar + End Get + Set(value As String) + bErrorMachiningName = False + EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + If EgtMdbSetCurrMachiningParam(MCH_MP.NAME, value) Then + Name = value + Else + bErrorMachiningName = True + End If + End Set + End Property + + ' Variabile che indica se la lavorazione è appena stata creata + Dim m_NewMachining As Boolean = False + Public Property NewMachining As Boolean + Get + Return m_NewMachining + End Get + Set(value As Boolean) + m_NewMachining = value + End Set + End Property + + ''' + ''' Property that determines if the Machining is selected or not + ''' + Public Overrides Property IsSelected As Boolean + Get + Return m_isSelected + End Get + Set(value As Boolean) + If (value <> m_isSelected) Then + m_isSelected = value + ' If Machining is selected, set it as current and notify all machining's property + ' to refresh them values with those of the new selected machining + If value Then + EgtMdbSetCurrMachining(Me.Name) + NotifyPropertyChanged("Type") + NotifyPropertyChanged("Invert") + NotifyPropertyChanged("LeaveTab") + NotifyPropertyChanged("SelectedWorkSide") + NotifyPropertyChanged("HeadSide") + NotifyPropertyChanged("LeadInType") + NotifyPropertyChanged("ExtLinkType") + NotifyPropertyChanged("LeadOutType") + NotifyPropertyChanged("CurveUse") + NotifyPropertyChanged("StepType") + 'NotifyPropertyChanged("LeadLinkTypeList") + NotifyPropertyChanged("SelectedLeadLinkType") + NotifyPropertyChanged("Speed") + NotifyPropertyChanged("Feed") + NotifyPropertyChanged("StartFeed") + NotifyPropertyChanged("EndFeed") + NotifyPropertyChanged("TipFeed") + NotifyPropertyChanged("OffSr") + NotifyPropertyChanged("OffSl") + NotifyPropertyChanged("SideAngle") + NotifyPropertyChanged("Approx") + NotifyPropertyChanged("Startpos") + NotifyPropertyChanged("StartSlowLen") + NotifyPropertyChanged("EndSlowLen") + NotifyPropertyChanged("ThrouAddLen") + NotifyPropertyChanged("StepPar") + NotifyPropertyChanged("ReturnPos") + NotifyPropertyChanged("TabLen") + NotifyPropertyChanged("TabDist") + NotifyPropertyChanged("Tabheight") + NotifyPropertyChanged("TabAngle") + NotifyPropertyChanged("LiTang") + NotifyPropertyChanged("LiPerp") + NotifyPropertyChanged("LiElev") + NotifyPropertyChanged("LiCompLen") + NotifyPropertyChanged("LoTang") + NotifyPropertyChanged("LoPerp") + NotifyPropertyChanged("LoElev") + NotifyPropertyChanged("LoCompLen") + NotifyPropertyChanged("StartAddlen") + NotifyPropertyChanged("EndAddlen") + NotifyPropertyChanged("StepExtArc") + NotifyPropertyChanged("StepIntArc") + NotifyPropertyChanged("SideStep") + NotifyPropertyChanged("VertFeed") + NotifyPropertyChanged("NamePar") + NotifyPropertyChanged("Tool") + NotifyPropertyChanged("DepthStr") + NotifyPropertyChanged("UserNotes") + NotifyPropertyChanged("OverLapStr") + NotifyPropertyChanged("OffsetStr") + ' Otherwhise Tool is deselected, so it and the database will be saved to + ' keep the modify effective + Else + If EgtMdbIsCurrMachiningModified() And Me.IsValid Then + + Select Case MsgBox("Save the modified machining?", MsgBoxStyle.YesNo, "SAVE") + Case MsgBoxResult.Yes + m_NewMachining = False + EgtMdbSaveCurrMachining() + EgtMdbSave() + Case MsgBoxResult.No + If m_NewMachining Then + Application.Msn.NotifyColleagues(Application.REMOVEMACHINING, Me) + End If + 'EgtMdbRemoveTool(Me.Name) + 'EgtMdbSave() + End Select + End If + End If + + End If + + End Set + + End Property + + ''' + ''' Property that read and write to the Machining's database the Invert + ''' + Public Property Invert As Boolean + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim bInvert As Boolean = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.INVERT, bInvert) + Return bInvert + End Get + Set(value As Boolean) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.INVERT, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Leave Tab + ''' + Public Property LeaveTab As Boolean + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim bLeaveTab As Boolean = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LEAVETAB, bLeaveTab) + Return bLeaveTab + End Get + Set(value As Boolean) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.LEAVETAB, value) + End Set + End Property + + ' ''' + ' ''' Property that read and write to the Machining's database the Type + ' ''' + 'Public Property Type As Integer + ' Get + ' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + ' Dim dType As Integer = 0 + ' EgtMdbGetCurrMachiningParam(MCH_MP.TYPE, dType) + ' Return dType + ' End Get + ' Set(value As Integer) + ' ''EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + ' 'EgtMdbSetCurrMachiningParam(MCH_MP.TYPE, value) + ' End Set + 'End Property + + ''' + ''' Property that read and write to the Machining's database the Work Side + ''' + 'Public Property WorkSide As Integer + ' Get + ' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + ' Dim nWorkSide As Integer = 0 + ' EgtMdbGetCurrMachiningParam(MCH_MP.WORKSIDE, nWorkSide) + ' Return nWorkSide + ' End Get + ' Set(value As Integer) + ' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + ' EgtMdbSetCurrMachiningParam(MCH_MP.WORKSIDE, value) + ' End Set + 'End Property + + ''' + ''' Property that read and write to the Machining's database the Head Side + ''' + Public Property HeadSide As Integer + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim nHeadSide As Integer = 0 + Dim X = EgtMdbGetCurrMachiningParam(MCH_MP.HEADSIDE, nHeadSide) + Return nHeadSide + End Get + Set(value As Integer) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim x = EgtMdbSetCurrMachiningParam(MCH_MP.HEADSIDE, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Lead In Type + ''' + Public Property LeadInType As Integer + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim nLeadInType As Integer = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, nLeadInType) + Return nLeadInType + End Get + Set(value As Integer) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.LEADINTYPE, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Ext Link Type + ''' + Public Property ExtLinkType As Integer + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim nExtLinkType As Integer = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, nExtLinkType) + Return nExtLinkType + End Get + Set(value As Integer) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.EXTLINKTYPE, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the LeadOut type + ''' + Public Property LeadOutType As Integer + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim nLeadOutType As Integer = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LEADOUTTYPE, nLeadOutType) + Return nLeadOutType + End Get + Set(value As Integer) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.LEADOUTTYPE, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Curve Use + ''' + Public Property CurveUse As Integer + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim nCurveUse As Integer = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.CURVEUSE, nCurveUse) + Return nCurveUse + End Get + Set(value As Integer) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.CURVEUSE, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Step Type + ''' + Public Property StepType As Integer + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim nStepType As Integer = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STEPTYPE, nStepType) + Return nStepType + End Get + Set(value As Integer) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.STEPTYPE, value) + 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 + ''' + Public Property Speed As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dSpeed As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.SPEED, dSpeed) + Return LenToString(dSpeed, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dSpeed As Double = 0 + StringToLen(value, dSpeed) + m_Speed = dSpeed + EgtMdbSetCurrMachiningParam(MCH_MP.SPEED, dSpeed) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Feed + ''' + Public Property Feed As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dFeed As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.FEED, dFeed) + Return LenToString(dFeed, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dFeed As Double = 0 + StringToLen(value, dFeed) + EgtMdbSetCurrMachiningParam(MCH_MP.FEED, dFeed) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Start Feed + ''' + Public Property StartFeed As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartFeed As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STARTFEED, dStartFeed) + Return LenToString(dStartFeed, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartFeed As Double = 0 + StringToLen(value, dStartFeed) + EgtMdbSetCurrMachiningParam(MCH_MP.STARTFEED, dStartFeed) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the End Feed + ''' + Public Property EndFeed As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dEndFeed As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.ENDFEED, dEndFeed) + Return LenToString(dEndFeed, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dEndFeed As Double = 0 + StringToLen(value, dEndFeed) + EgtMdbSetCurrMachiningParam(MCH_MP.ENDFEED, dEndFeed) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Tip Feed + ''' + Public Property TipFeed As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTipFeed As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.TIPFEED, dTipFeed) + Return LenToString(dTipFeed, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTipFeed As Double = 0 + StringToLen(value, dTipFeed) + EgtMdbSetCurrMachiningParam(MCH_MP.TIPFEED, dTipFeed) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Offset Sr + ''' + Public Property OffSr As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dOffSr As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.OFFSR, dOffSr) + Return LenToString(dOffSr, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dOffSr As Double = 0 + StringToLen(value, dOffSr) + EgtMdbSetCurrMachiningParam(MCH_MP.OFFSR, dOffSr) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Offset Sl + ''' + Public Property OffSl As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dOffSl As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.OFFSL, dOffSl) + Return LenToString(dOffSl, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dOffSl As Double = 0 + StringToLen(value, dOffSl) + EgtMdbSetCurrMachiningParam(MCH_MP.OFFSL, dOffSl) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Side Angle + ''' + Public Property SideAngle As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dSideAngle As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGLE, dSideAngle) + Return LenToString(dSideAngle, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dSideAngle As Double = 0 + StringToLen(value, dSideAngle) + EgtMdbSetCurrMachiningParam(MCH_MP.SIDEANGLE, dSideAngle) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Approx + ''' + Public Property Approx As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dApprox As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.APPROX, dApprox) + Return LenToString(dApprox, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dApprox As Double = 0 + StringToLen(value, dApprox) + EgtMdbSetCurrMachiningParam(MCH_MP.APPROX, dApprox) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Start Position + ''' + Public Property StartPos As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartPos As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STARTPOS, dStartPos) + Return LenToString(dStartPos, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartPos As Double = 0 + StringToLen(value, dStartPos) + EgtMdbSetCurrMachiningParam(MCH_MP.STARTPOS, dStartPos) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Start Slow Len + ''' + Public Property StartSlowLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartSlowLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STARTSLOWLEN, dStartSlowLen) + Return LenToString(dStartSlowLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartSlowLen As Double = 0 + StringToLen(value, dStartSlowLen) + EgtMdbSetCurrMachiningParam(MCH_MP.STARTSLOWLEN, dStartSlowLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the End Slow Len + ''' + Public Property EndSlowLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dEndSlowLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.ENDSLOWLEN, dEndSlowLen) + Return LenToString(dEndSlowLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dEndSlowLen As Double = 0 + StringToLen(value, dEndSlowLen) + EgtMdbSetCurrMachiningParam(MCH_MP.ENDSLOWLEN, dEndSlowLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Throu Add Len + ''' + Public Property ThrouAddLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dThrouAddLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.THROUADDLEN, dThrouAddLen) + Return LenToString(dThrouAddLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dThrouAddLen As Double = 0 + StringToLen(value, dThrouAddLen) + EgtMdbSetCurrMachiningParam(MCH_MP.THROUADDLEN, dThrouAddLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Step Par + ''' + Public Property StepPar As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStepPar As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STEP_, dStepPar) + Return LenToString(dStepPar, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStepPar As Double = 0 + StringToLen(value, dStepPar) + EgtMdbSetCurrMachiningParam(MCH_MP.STEP_, dStepPar) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Return Position + ''' + Public Property ReturnPos As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dReturnpPos As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.RETURNPOS, dReturnpPos) + Return LenToString(dReturnpPos, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dReturnpPos As Double = 0 + StringToLen(value, dReturnpPos) + EgtMdbSetCurrMachiningParam(MCH_MP.RETURNPOS, dReturnpPos) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Tab Len + ''' + Public Property TabLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.TABLEN, dTabLen) + Return LenToString(dTabLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabLen As Double = 0 + StringToLen(value, dTabLen) + EgtMdbSetCurrMachiningParam(MCH_MP.TABLEN, dTabLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Tab Dist + ''' + Public Property TabDist As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabDist As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.TABDIST, dTabDist) + Return LenToString(dTabDist, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabDist As Double = 0 + StringToLen(value, dTabDist) + EgtMdbSetCurrMachiningParam(MCH_MP.TABDIST, dTabDist) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Tab Height + ''' + Public Property TabHeight As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabHeight As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.TABHEIGHT, dTabHeight) + Return LenToString(dTabHeight, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabHeight As Double = 0 + StringToLen(value, dTabHeight) + EgtMdbSetCurrMachiningParam(MCH_MP.TABHEIGHT, dTabHeight) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Tab Angle + ''' + Public Property TabAngle As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabAngle As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.TABANGLE, dTabAngle) + Return LenToString(dTabAngle, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dTabAngle As Double = 0 + StringToLen(value, dTabAngle) + EgtMdbSetCurrMachiningParam(MCH_MP.TABANGLE, dTabAngle) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Li Tang + ''' + Public Property LiTang As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiTang As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LITANG, dLiTang) + Return LenToString(dLiTang, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiTang As Double = 0 + StringToLen(value, dLiTang) + EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, dLiTang) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Li Perp + ''' + Public Property LiPerp As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiPerp As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LIPERP, dLiPerp) + Return LenToString(dLiPerp, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiPerp As Double = 0 + StringToLen(value, dLiPerp) + EgtMdbSetCurrMachiningParam(MCH_MP.LIPERP, dLiPerp) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Li Elev + ''' + Public Property LiElev As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiElev As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LIELEV, dLiElev) + Return LenToString(dLiElev, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiElev As Double = 0 + StringToLen(value, dLiElev) + EgtMdbSetCurrMachiningParam(MCH_MP.LIELEV, dLiElev) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Li Comp Len + ''' + Public Property LiCompLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiCompLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LICOMPLEN, dLiCompLen) + Return LenToString(dLiCompLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLiCompLen As Double = 0 + StringToLen(value, dLiCompLen) + EgtMdbSetCurrMachiningParam(MCH_MP.LICOMPLEN, dLiCompLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Lo Tang + ''' + Public Property LoTang As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoTang As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LOTANG, dLoTang) + Return LenToString(dLoTang, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoTang As Double = 0 + StringToLen(value, dLoTang) + EgtMdbSetCurrMachiningParam(MCH_MP.LOTANG, dLoTang) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Lo Perp + ''' + Public Property LoPerp As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoPerp As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LOPERP, dLoPerp) + Return LenToString(dLoPerp, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoPerp As Double = 0 + StringToLen(value, dLoPerp) + EgtMdbSetCurrMachiningParam(MCH_MP.LOPERP, dLoPerp) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Lo Elev + ''' + Public Property LoElev As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoElev As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LOELEV, dLoElev) + Return LenToString(dLoElev, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoElev As Double = 0 + StringToLen(value, dLoElev) + EgtMdbSetCurrMachiningParam(MCH_MP.LOELEV, dLoElev) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Lo Comp Len + ''' + Public Property LoCompLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoCompLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.LOCOMPLEN, dLoCompLen) + Return LenToString(dLoCompLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dLoCompLen As Double = 0 + StringToLen(value, dLoCompLen) + EgtMdbSetCurrMachiningParam(MCH_MP.LOCOMPLEN, dLoCompLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Start Add Len + ''' + Public Property StartAddLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartAddLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen) + Return LenToString(dStartAddLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStartAddLen As Double = 0 + StringToLen(value, dStartAddLen) + EgtMdbSetCurrMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the End Add Len + ''' + Public Property EndAddLen As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dEndAddLen As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen) + Return LenToString(dEndAddLen, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dEndAddLen As Double = 0 + StringToLen(value, dEndAddLen) + EgtMdbSetCurrMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Step Ext Arc + ''' + Public Property StepExtArc As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStepExtArc As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STEPEXTARC, dStepExtArc) + Return LenToString(dStepExtArc, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStepExtArc As Double = 0 + StringToLen(value, dStepExtArc) + EgtMdbSetCurrMachiningParam(MCH_MP.STEPEXTARC, dStepExtArc) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Step Int Arc + ''' + Public Property StepIntArc As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStepIntArc As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.STEPINTARC, dStepIntArc) + Return LenToString(dStepIntArc, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dStepIntArc As Double = 0 + StringToLen(value, dStepIntArc) + EgtMdbSetCurrMachiningParam(MCH_MP.STEPINTARC, dStepIntArc) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Side Step + ''' + Public Property SideStep As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dSideStep As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.SIDESTEP, dSideStep) + Return LenToString(dSideStep, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dSideStep As Double = 0 + StringToLen(value, dSideStep) + EgtMdbSetCurrMachiningParam(MCH_MP.SIDESTEP, dSideStep) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Vert Feed + ''' + Public Property VertFeed As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dVertFeed As Double = 0 + EgtMdbGetCurrMachiningParam(MCH_MP.VERTFEED, dVertFeed) + Return LenToString(dVertFeed, 3) + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim dVertFeed As Double = 0 + StringToLen(value, dVertFeed) + EgtMdbSetCurrMachiningParam(MCH_MP.VERTFEED, dVertFeed) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Tool + ''' + Public Property Tool As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim sTool As String = String.Empty + EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sTool) + Return sTool + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.TOOL, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Depth Str + ''' + Public Property DepthStr As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim sDepthStr As String = String.Empty + EgtMdbGetCurrMachiningParam(MCH_MP.DEPTH_STR, sDepthStr) + Return sDepthStr + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.DEPTH_STR, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the User Notes + ''' + Public Property UserNotes As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim sUserNotes As String = String.Empty + EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, sUserNotes) + Return sUserNotes + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Over Lap Str + ''' + Public Property OverLapStr As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim sOverLapStr As String = String.Empty + EgtMdbGetCurrMachiningParam(MCH_MP.OVERLAP_STR, sOverLapStr) + Return sOverLapStr + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.OVERLAP_STR, value) + End Set + End Property + + ''' + ''' Property that read and write to the Machining's database the Offset Str + ''' + Public Property OffsetStr As String + Get + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + Dim sOffsetStr As String = String.Empty + EgtMdbGetCurrMachiningParam(MCH_MP.OFFSET_STR, sOffsetStr) + Return sOffsetStr + End Get + Set(value As String) + 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext) + EgtMdbSetCurrMachiningParam(MCH_MP.OFFSET_STR, value) + End Set + End Property + +#End Region ' Machining Property + +#Region "Constructors" + + Sub New(Name As String, Type As MCH_MY) + MyBase.New(Name) + Me.m_Type = Type + End Sub + + Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean) + MyBase.New(Name, IsSelected, IsExpanded, IsActive) + End Sub + +#End Region ' Constructors + +#Region "IDataErrorInfo Members" + + Private ReadOnly Property IDataErrorInfo_Error() As String Implements IDataErrorInfo.Error + Get + Return Nothing + End Get + End Property + + Public ReadOnly Property IDataErrorInfo_Item(ByVal propertyName As String) As String Implements IDataErrorInfo.Item + Get + ErrorOnTool = True + Return Me.GetValidationError(propertyName) + End Get + End Property + +#End Region ' IDataErrorInfo Members + +#Region "Validation" + + ''' + ''' Returns true if this object has no validation errors. + ''' + Public ReadOnly Property IsValid() As Boolean + Get + For Each [property] As String In ValidatedProperties + If GetValidationError([property]) IsNot Nothing Then + Return False + End If + Next [property] + + Return True + End Get + End Property + + Private Shared ReadOnly ValidatedProperties() As String = {"Speed", "NamePar"} + + Private Function GetValidationError(ByVal propertyName As String) As String + If Array.IndexOf(ValidatedProperties, propertyName) < 0 Then + Return Nothing + End If + + Dim [error] As String = Nothing + + Select Case propertyName + Case "Speed" + [error] = Me.ValidateSpeed() + Case "NamePar" + [error] = Me.ValidateName() + + Case Else + 'Debug.Fail("Unexpected property being validated on Tool: " & propertyName) + End Select + Return [error] + End Function + + Private Function ValidateSpeed() As String + 'Dim MaxSpeed As Double + '' Da leggere dall'utensile impostato per questa lavorazione + 'If m_Speed > m_MaxSpeed Then + ' Return "Il valore di Speed non può essere maggiore di quello di MaxSpeed" + 'End If + Return Nothing + End Function + + Private Function ValidateName() As String + If bErrorMachiningName Then + Return "Nome non valido" + End If + Return Nothing + End Function + +#End Region ' Validation + +End Class + +''' +''' Class that represent a FamilyMachining in the treeview. +''' It's an element in the treeview that represent a folder, but also a machining family +''' +Public Class FamilyMachiningTreeViewItem + Inherits ParentItem + + Private m_MachiningType As MCH_MY + ''' + ''' Property that determines the machining type of the family + ''' + Public Property MachiningType As MCH_MY + Get + Return m_MachiningType + End Get + Set(value As MCH_MY) + m_MachiningType = value + End Set + End Property + + ''' + ''' Property that determines if the Machining is selected or not + ''' + Public Overrides Property IsSelected As Boolean + Get + Return m_isSelected + End Get + Set(value As Boolean) + If (value <> m_isSelected) Then + m_isSelected = value + End If + End Set + End Property + + ' Proprietà che permette di nascondere tutti i parametri di lavorazione grazie al binding ed al converter + Public ReadOnly Property Type As Integer + Get + Return MCH_MY.NONE + End Get + End Property + + ''' + ''' Constructor that receive the name of the FamilyMachiningTreeViewItem, the MachiningType, and set + ''' the picture(Folder.png) + ''' + Sub New(Name As String, MachiningType As MCH_MY) + MyBase.New(Name) + Me.MachiningType = MachiningType + Me.PictureString = "/Resources/TreeView/Folder.png" + End Sub + + Sub New(Name As String, PicturePath As String) + MyBase.New(Name) + Me.PictureString = PicturePath + End Sub + + Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean) + MyBase.New(Name, IsSelected, IsExpanded, IsActive) + End Sub + +End Class + +''' +''' Class that represent a Converter that use machining type and param type, to set the visibility state of the param type. +''' +Public Class MachiningParamVisibilityConverter + Implements IValueConverter + + Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert + Select Case CInt(value) + Case MCH_MY.NONE + Return Visibility.Hidden + Case MCH_MY.DRILLING + Return SharedFieldsClass.Drilling(CInt(parameter)) + Case MCH_MY.SAWING + Return SharedFieldsClass.Sawing(CInt(parameter)) + Case MCH_MY.MILLING + Return SharedFieldsClass.Milling(CInt(parameter)) + Case MCH_MY.POCKETING + Return SharedFieldsClass.Pocketing(CInt(parameter)) + Case MCH_MY.MORTISING + Return SharedFieldsClass.Mortising(CInt(parameter)) + Case MCH_MY.SAWROUGHING + Return SharedFieldsClass.Sawroughing(CInt(parameter)) + Case MCH_MY.SAWFINISHING + Return SharedFieldsClass.Sawfinishing(CInt(parameter)) + Case Else + Return Visibility.Hidden + End Select + End Function + + Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack + Throw New NotImplementedException + End Function + +End Class \ No newline at end of file diff --git a/MachiningsDbPage/MachiningsDbView.xaml b/MachiningsDbPage/MachiningsDbView.xaml new file mode 100644 index 0000000..8f32968 --- /dev/null +++ b/MachiningsDbPage/MachiningsDbView.xaml @@ -0,0 +1,1623 @@ + + + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProjectPage/DrawPanel/DrawPanelView.xaml.vb b/ProjectPage/DrawPanel/DrawPanelView.xaml.vb new file mode 100644 index 0000000..e5c4b29 --- /dev/null +++ b/ProjectPage/DrawPanel/DrawPanelView.xaml.vb @@ -0,0 +1,3 @@ +Public Class DrawPanelView + +End Class diff --git a/ProjectPage/DrawPanel/DrawPanelViewModel.vb b/ProjectPage/DrawPanel/DrawPanelViewModel.vb new file mode 100644 index 0000000..215bd08 --- /dev/null +++ b/ProjectPage/DrawPanel/DrawPanelViewModel.vb @@ -0,0 +1,1069 @@ +Namespace EgtCAM5 + + Public Class DrawPanelViewModel + Inherits ViewModelBase + + ' Definizione comandi + Private m_cmdPoint As ICommand + Private m_cmdLine2P As ICommand + Private m_cmdLinePDL As ICommand + Private m_cmdCircle As ICommand + Private m_cmdArcCSE As ICommand + Private m_cmdArc3P As ICommand + Private m_cmdArcPDP As ICommand + Private m_cmdFillet As ICommand + Private m_cmdRectangle2P As ICommand + Private m_cmdPolygon As ICommand + Private m_cmdText As ICommand + Private m_cmdPlane As ICommand + Private m_cmdExtrude As ICommand + Private m_cmdRevolve As ICommand + Private m_cmdScrew As ICommand + Private m_cmdRuled As ICommand + Private m_cmdMergeSurf As ICommand + Private m_cmdExplodeSurf As ICommand + Private m_cmdInvertSurf As ICommand + Private m_cmdDelete As ICommand + Private m_cmdChangeLayer As ICommand + Private m_cmdChangeColor As ICommand + Private m_cmdInvertCurve As ICommand + Private m_cmdChangeStartCurve As ICommand + Private m_cmdExtendCurve As ICommand + Private m_cmdBreakCurve As ICommand + Private m_cmdJoinCurve As ICommand + Private m_cmdExplodeCurve As ICommand + Private m_cmdSetCurveTh As ICommand + Private m_cmdMove As ICommand + Private m_cmdRotate As ICommand + Private m_cmdMirror As ICommand + Private m_cmdScale As ICommand + Private m_cmdOffset As ICommand + + + Sub New() + + End Sub + +#Region "PointCommand" + + ''' + ''' Returns a command that do Point. + ''' + Public ReadOnly Property PointCommand As ICommand + Get + If m_cmdPoint Is Nothing Then + m_cmdPoint = New RelayCommand(AddressOf Point, AddressOf CanPoint) + End If + Return m_cmdPoint + End Get + End Property + + ''' + ''' Execute the Point. This method is invoked by the PointCommand. + ''' + Public Sub Point(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.POINT) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanPoint(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' PointCommand + +#Region "Line2PCommand" + + ''' + ''' Returns a command that do Line2P. + ''' + Public ReadOnly Property Line2PCommand As ICommand + Get + If m_cmdLine2P Is Nothing Then + m_cmdLine2P = New RelayCommand(AddressOf Line2P, AddressOf CanLine2P) + End If + Return m_cmdLine2P + End Get + End Property + + ''' + ''' Execute the Line2P. This method is invoked by the Line2PCommand. + ''' + Public Sub Line2P(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.LINE2P) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanLine2P(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' Line2PCommand + +#Region "LinePDLCommand" + + ''' + ''' Returns a command that do LinePDL. + ''' + Public ReadOnly Property LinePDLCommand As ICommand + Get + If m_cmdLinePDL Is Nothing Then + m_cmdLinePDL = New RelayCommand(AddressOf LinePDL, AddressOf CanLinePDL) + End If + Return m_cmdLinePDL + End Get + End Property + + ''' + ''' Execute the LinePDL. This method is invoked by the LinePDLCommand. + ''' + Public Sub LinePDL(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.LINEPDL) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanLinePDL(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' LinePDLCommand + +#Region "CircleCommand" + + ''' + ''' Returns a command that do Circle. + ''' + Public ReadOnly Property CircleCommand As ICommand + Get + If m_cmdCircle Is Nothing Then + m_cmdCircle = New RelayCommand(AddressOf Circle, AddressOf CanCircle) + End If + Return m_cmdCircle + End Get + End Property + + ''' + ''' Execute the Circle. This method is invoked by the CircleCommand. + ''' + Public Sub Circle(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CIRCLE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCircle(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CircleCommand + +#Region "ArcCSECommand" + + ''' + ''' Returns a command that do ArcCSE. + ''' + Public ReadOnly Property ArcCSECommand As ICommand + Get + If m_cmdArcCSE Is Nothing Then + m_cmdArcCSE = New RelayCommand(AddressOf ArcCSE, AddressOf CanArcCSE) + End If + Return m_cmdArcCSE + End Get + End Property + + ''' + ''' Execute the ArcCSE. This method is invoked by the ArcCSECommand. + ''' + Public Sub ArcCSE(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.ARCCSE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanArcCSE(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ArcCSECommand + +#Region "Arc3PCommand" + + ''' + ''' Returns a command that do Arc3P. + ''' + Public ReadOnly Property Arc3PCommand As ICommand + Get + If m_cmdArc3P Is Nothing Then + m_cmdArc3P = New RelayCommand(AddressOf Arc3P, AddressOf CanArc3P) + End If + Return m_cmdArc3P + End Get + End Property + + ''' + ''' Execute the Arc3P. This method is invoked by the Arc3PCommand. + ''' + Public Sub Arc3P(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.ARC3P) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanArc3P(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' Arc3PCommand + +#Region "ArcPDPCommand" + + ''' + ''' Returns a command that do ArcPDP. + ''' + Public ReadOnly Property ArcPDPCommand As ICommand + Get + If m_cmdArcPDP Is Nothing Then + m_cmdArcPDP = New RelayCommand(AddressOf ArcPDP, AddressOf CanArcPDP) + End If + Return m_cmdArcPDP + End Get + End Property + + ''' + ''' Execute the ArcPDP. This method is invoked by the ArcPDPCommand. + ''' + Public Sub ArcPDP(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.ARCPDP) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanArcPDP(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ArcPDPCommand + +#Region "FilletCommand" + + ''' + ''' Returns a command that do Fillet. + ''' + Public ReadOnly Property FilletCommand As ICommand + Get + If m_cmdFillet Is Nothing Then + m_cmdFillet = New RelayCommand(AddressOf Fillet, AddressOf CanFillet) + End If + Return m_cmdFillet + End Get + End Property + + ''' + ''' Execute the Fillet. This method is invoked by the FilletCommand. + ''' + Public Sub Fillet(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.FILLET) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanFillet(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' FilletCommand + +#Region "Rectangle2PCommand" + + ''' + ''' Returns a command that do Rectangle2P. + ''' + Public ReadOnly Property Rectangle2PCommand As ICommand + Get + If m_cmdRectangle2P Is Nothing Then + m_cmdRectangle2P = New RelayCommand(AddressOf Rectangle2P, AddressOf CanRectangle2P) + End If + Return m_cmdRectangle2P + End Get + End Property + + ''' + ''' Execute the Rectangle2P. This method is invoked by the Rectangle2PCommand. + ''' + Public Sub Rectangle2P(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.RECTANGLE2P) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanRectangle2P(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' Rectangle2PCommand + +#Region "PolygonCommand" + + ''' + ''' Returns a command that do Polygon. + ''' + Public ReadOnly Property PolygonCommand As ICommand + Get + If m_cmdPolygon Is Nothing Then + m_cmdPolygon = New RelayCommand(AddressOf Polygon, AddressOf CanPolygon) + End If + Return m_cmdPolygon + End Get + End Property + + ''' + ''' Execute the Polygon. This method is invoked by the PolygonCommand. + ''' + Public Sub Polygon(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.POLYGON) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanPolygon(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' PolygonCommand + +#Region "TextCommand" + + ''' + ''' Returns a command that do Text. + ''' + Public ReadOnly Property TextCommand As ICommand + Get + If m_cmdText Is Nothing Then + m_cmdText = New RelayCommand(AddressOf Text, AddressOf CanText) + End If + Return m_cmdText + End Get + End Property + + ''' + ''' Execute the Text. This method is invoked by the TextCommand. + ''' + Public Sub Text(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.TEXT) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanText(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' TextCommand + +#Region "PlaneCommand" + + ''' + ''' Returns a command that do Plane. + ''' + Public ReadOnly Property PlaneCommand As ICommand + Get + If m_cmdPlane Is Nothing Then + m_cmdPlane = New RelayCommand(AddressOf Plane, AddressOf CanPlane) + End If + Return m_cmdPlane + End Get + End Property + + ''' + ''' Execute the Plane. This method is invoked by the PlaneCommand. + ''' + Public Sub Plane(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.PLANE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanPlane(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' PlaneCommand + +#Region "ExtrudeCommand" + + ''' + ''' Returns a command that do Extrude. + ''' + Public ReadOnly Property ExtrudeCommand As ICommand + Get + If m_cmdExtrude Is Nothing Then + m_cmdExtrude = New RelayCommand(AddressOf Extrude, AddressOf CanExtrude) + End If + Return m_cmdExtrude + End Get + End Property + + ''' + ''' Execute the Extrude. This method is invoked by the ExtrudeCommand. + ''' + Public Sub Extrude(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.EXTRUDE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanExtrude(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ExtrudeCommand + +#Region "RevolveCommand" + + ''' + ''' Returns a command that do Revolve. + ''' + Public ReadOnly Property RevolveCommand As ICommand + Get + If m_cmdRevolve Is Nothing Then + m_cmdRevolve = New RelayCommand(AddressOf Revolve, AddressOf CanRevolve) + End If + Return m_cmdRevolve + End Get + End Property + + ''' + ''' Execute the Revolve. This method is invoked by the RevolveCommand. + ''' + Public Sub Revolve(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.REVOLVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanRevolve(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' RevolveCommand + +#Region "ScrewCommand" + + ''' + ''' Returns a command that do Screw. + ''' + Public ReadOnly Property ScrewCommand As ICommand + Get + If m_cmdScrew Is Nothing Then + m_cmdScrew = New RelayCommand(AddressOf Screw, AddressOf CanScrew) + End If + Return m_cmdScrew + End Get + End Property + + ''' + ''' Execute the Screw. This method is invoked by the ScrewCommand. + ''' + Public Sub Screw(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.SCREW) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanScrew(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ScrewCommand + +#Region "RuledCommand" + + ''' + ''' Returns a command that do Ruled. + ''' + Public ReadOnly Property RuledCommand As ICommand + Get + If m_cmdRuled Is Nothing Then + m_cmdRuled = New RelayCommand(AddressOf Ruled, AddressOf CanRuled) + End If + Return m_cmdRuled + End Get + End Property + + ''' + ''' Execute the Ruled. This method is invoked by the RuledCommand. + ''' + Public Sub Ruled(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.RULED) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanRuled(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' RuledCommand + +#Region "MergeSurfCommand" + + ''' + ''' Returns a command that do MergeSurf. + ''' + Public ReadOnly Property MergeSurfCommand As ICommand + Get + If m_cmdMergeSurf Is Nothing Then + m_cmdMergeSurf = New RelayCommand(AddressOf MergeSurf, AddressOf CanMergeSurf) + End If + Return m_cmdMergeSurf + End Get + End Property + + ''' + ''' Execute the MergeSurf. This method is invoked by the MergeSurfCommand. + ''' + Public Sub MergeSurf(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.MERGESURF) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanMergeSurf(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' MergeSurfCommand + +#Region "ExplodeSurfCommand" + + ''' + ''' Returns a command that do ExplodeSurf. + ''' + Public ReadOnly Property ExplodeSurfCommand As ICommand + Get + If m_cmdExplodeSurf Is Nothing Then + m_cmdExplodeSurf = New RelayCommand(AddressOf ExplodeSurf, AddressOf CanExplodeSurf) + End If + Return m_cmdExplodeSurf + End Get + End Property + + ''' + ''' Execute the ExplodeSurf. This method is invoked by the ExplodeSurfCommand. + ''' + Public Sub ExplodeSurf(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.MERGESURF) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanExplodeSurf(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ExplodeSurfCommand + +#Region "InvertSurfCommand" + + ''' + ''' Returns a command that do InvertSurf. + ''' + Public ReadOnly Property InvertSurfCommand As ICommand + Get + If m_cmdInvertSurf Is Nothing Then + m_cmdInvertSurf = New RelayCommand(AddressOf InvertSurf, AddressOf CanInvertSurf) + End If + Return m_cmdInvertSurf + End Get + End Property + + ''' + ''' Execute the InvertSurf. This method is invoked by the InvertSurfCommand. + ''' + Public Sub InvertSurf(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.INVERTSURF) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanInvertSurf(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' InvertSurfCommand + +#Region "DeleteCommand" + + ''' + ''' Returns a command that do Delete. + ''' + Public ReadOnly Property DeleteCommand As ICommand + Get + If m_cmdDelete Is Nothing Then + m_cmdDelete = New RelayCommand(AddressOf Delete, AddressOf CanDelete) + End If + Return m_cmdDelete + End Get + End Property + + ''' + ''' Execute the Delete. This method is invoked by the DeleteCommand. + ''' + Public Sub Delete(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.DELETE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanDelete(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' DeleteCommand + +#Region "ChangeLayerCommand" + + ''' + ''' Returns a command that do ChangeLayer. + ''' + Public ReadOnly Property ChangeLayerCommand As ICommand + Get + If m_cmdChangeLayer Is Nothing Then + m_cmdChangeLayer = New RelayCommand(AddressOf ChangeLayer, AddressOf CanChangeLayer) + End If + Return m_cmdChangeLayer + End Get + End Property + + ''' + ''' Execute the ChangeLayer. This method is invoked by the ChangeLayerCommand. + ''' + Public Sub ChangeLayer(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CHANGELAYER) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanChangeLayer(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ChangeLayerCommand + +#Region "ChangeColorCommand" + + ''' + ''' Returns a command that do ChangeColor. + ''' + Public ReadOnly Property ChangeColorCommand As ICommand + Get + If m_cmdChangeColor Is Nothing Then + m_cmdChangeColor = New RelayCommand(AddressOf ChangeColor, AddressOf CanChangeColor) + End If + Return m_cmdChangeColor + End Get + End Property + + ''' + ''' Execute the ChangeColor. This method is invoked by the ChangeColorCommand. + ''' + Public Sub ChangeColor(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CHANGECOLOR) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanChangeColor(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ChangeColorCommand + +#Region "InvertCurveCommand" + + ''' + ''' Returns a command that do InvertCurve. + ''' + Public ReadOnly Property InvertCurveCommand As ICommand + Get + If m_cmdInvertCurve Is Nothing Then + m_cmdInvertCurve = New RelayCommand(AddressOf InvertCurve, AddressOf CanInvertCurve) + End If + Return m_cmdInvertCurve + End Get + End Property + + ''' + ''' Execute the InvertCurve. This method is invoked by the InvertCurveCommand. + ''' + Public Sub InvertCurve(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.INVERTCURVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanInvertCurve(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' InvertCurveCommand + +#Region "ChangeStartCurveCommand" + + ''' + ''' Returns a command that do ChangeStartCurve. + ''' + Public ReadOnly Property ChangeStartCurveCommand As ICommand + Get + If m_cmdChangeStartCurve Is Nothing Then + m_cmdChangeStartCurve = New RelayCommand(AddressOf ChangeStartCurve, AddressOf CanChangeStartCurve) + End If + Return m_cmdChangeStartCurve + End Get + End Property + + ''' + ''' Execute the ChangeStartCurve. This method is invoked by the InvertCurveCommand. + ''' + Public Sub ChangeStartCurve(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CHANGESTARTCURVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanChangeStartCurve(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ChangeStartCurveCommand + +#Region "ExtendCurveCommand" + + ''' + ''' Returns a command that do ExtendCurve. + ''' + Public ReadOnly Property ExtendCurveCommand As ICommand + Get + If m_cmdExtendCurve Is Nothing Then + m_cmdExtendCurve = New RelayCommand(AddressOf ExtendCurve, AddressOf CanExtendCurve) + End If + Return m_cmdExtendCurve + End Get + End Property + + ''' + ''' Execute the ExtendCurve. This method is invoked by the ExtendCurveCommand. + ''' + Public Sub ExtendCurve(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.EXTENDCURVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanExtendCurve(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ExtendCurveCommand + +#Region "BreakCurveCommand" + + ''' + ''' Returns a command that do BreakCurve. + ''' + Public ReadOnly Property BreakCurveCommand As ICommand + Get + If m_cmdBreakCurve Is Nothing Then + m_cmdBreakCurve = New RelayCommand(AddressOf BreakCurve, AddressOf CanBreakCurve) + End If + Return m_cmdBreakCurve + End Get + End Property + + ''' + ''' Execute the BreakCurve. This method is invoked by the BreakCurveCommand. + ''' + Public Sub BreakCurve(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.BREAKCURVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanBreakCurve(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' BreakCurveCommand + +#Region "JoinCurveCommand" + + ''' + ''' Returns a command that do JoinCurve. + ''' + Public ReadOnly Property JoinCurveCommand As ICommand + Get + If m_cmdJoinCurve Is Nothing Then + m_cmdJoinCurve = New RelayCommand(AddressOf JoinCurve, AddressOf CanJoinCurve) + End If + Return m_cmdJoinCurve + End Get + End Property + + ''' + ''' Execute the JoinCurve. This method is invoked by the JoinCurveCommand. + ''' + Public Sub JoinCurve(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.JOINCURVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanJoinCurve(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' JoinCurveCommand + +#Region "ExplodeCurveCommand" + + ''' + ''' Returns a command that do ExplodeCurve. + ''' + Public ReadOnly Property ExplodeCurveCommand As ICommand + Get + If m_cmdExplodeCurve Is Nothing Then + m_cmdExplodeCurve = New RelayCommand(AddressOf ExplodeCurve, AddressOf CanExplodeCurve) + End If + Return m_cmdExplodeCurve + End Get + End Property + + ''' + ''' Execute the ExplodeCurve. This method is invoked by the ExplodeCurveCommand. + ''' + Public Sub ExplodeCurve(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.JOINCURVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanExplodeCurve(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ExplodeCurveCommand + +#Region "SetCurveThCommand" + + ''' + ''' Returns a command that do SetCurveTh. + ''' + Public ReadOnly Property SetCurveThCommand As ICommand + Get + If m_cmdSetCurveTh Is Nothing Then + m_cmdSetCurveTh = New RelayCommand(AddressOf SetCurveTh, AddressOf CanSetCurveTh) + End If + Return m_cmdSetCurveTh + End Get + End Property + + ''' + ''' Execute the SetCurveTh. This method is invoked by the SetCurveThCommand. + ''' + Public Sub SetCurveTh(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.SETCURVETH) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanSetCurveTh(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' SetCurveThCommand + +#Region "MoveCommand" + + ''' + ''' Returns a command that do Move. + ''' + Public ReadOnly Property MoveCommand As ICommand + Get + If m_cmdMove Is Nothing Then + m_cmdMove = New RelayCommand(AddressOf Move, AddressOf CanMove) + End If + Return m_cmdMove + End Get + End Property + + ''' + ''' Execute the Move. This method is invoked by the MoveCommand. + ''' + Public Sub Move(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.MOVE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanMove(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' MoveCommand + +#Region "RotateCommand" + + ''' + ''' Returns a command that do Rotate. + ''' + Public ReadOnly Property RotateCommand As ICommand + Get + If m_cmdRotate Is Nothing Then + m_cmdRotate = New RelayCommand(AddressOf Rotate, AddressOf CanRotate) + End If + Return m_cmdRotate + End Get + End Property + + ''' + ''' Execute the Rotate. This method is invoked by the RotateCommand. + ''' + Public Sub Rotate(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.ROTATE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanRotate(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' RotateCommand + +#Region "MirrorCommand" + + ''' + ''' Returns a command that do Mirror. + ''' + Public ReadOnly Property MirrorCommand As ICommand + Get + If m_cmdMirror Is Nothing Then + m_cmdMirror = New RelayCommand(AddressOf Mirror, AddressOf CanMirror) + End If + Return m_cmdMirror + End Get + End Property + + ''' + ''' Execute the Mirror. This method is invoked by the MirrorCommand. + ''' + Public Sub Mirror(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.MIRROR) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanMirror(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' MirrorCommand + +#Region "ScaleCommand" + + ''' + ''' Returns a command that do Scale. + ''' + Public ReadOnly Property ScaleCommand As ICommand + Get + If m_cmdScale Is Nothing Then + m_cmdScale = New RelayCommand(AddressOf Scale, AddressOf CanScale) + End If + Return m_cmdScale + End Get + End Property + + ''' + ''' Execute the Scale. This method is invoked by the ScaleCommand. + ''' + Public Sub Scale(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.SCALE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanScale(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ScaleCommand + +#Region "OffsetCommand" + + ''' + ''' Returns a command that do Offset. + ''' + Public ReadOnly Property OffsetCommand As ICommand + Get + If m_cmdOffset Is Nothing Then + m_cmdOffset = New RelayCommand(AddressOf Offset, AddressOf CanOffset) + End If + Return m_cmdOffset + End Get + End Property + + ''' + ''' Execute the Offset. This method is invoked by the OffsetCommand. + ''' + Public Sub Offset(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.OFFSET) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanOffset(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' OffsetCommand + + End Class + +End Namespace \ No newline at end of file diff --git a/ProjectPage/GridViewPanel/GridViewPanelView.xaml b/ProjectPage/GridViewPanel/GridViewPanelView.xaml new file mode 100644 index 0000000..6c78dc4 --- /dev/null +++ b/ProjectPage/GridViewPanel/GridViewPanelView.xaml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProjectPage/GridViewPanel/GridViewPanelView.xaml.vb b/ProjectPage/GridViewPanel/GridViewPanelView.xaml.vb new file mode 100644 index 0000000..6845fe3 --- /dev/null +++ b/ProjectPage/GridViewPanel/GridViewPanelView.xaml.vb @@ -0,0 +1,3 @@ +Public Class GridViewPanelView + +End Class diff --git a/ProjectPage/GridViewPanel/GridViewPanelViewModel.vb b/ProjectPage/GridViewPanel/GridViewPanelViewModel.vb new file mode 100644 index 0000000..71c80c9 --- /dev/null +++ b/ProjectPage/GridViewPanel/GridViewPanelViewModel.vb @@ -0,0 +1,981 @@ +Namespace EgtCAM5 + + Public Class GridViewPanelViewModel + Inherits ViewModelBase + + Private m_TitleBarOrientation As Orientation + Public Property TitleBarOrientation As Orientation + Get + Return m_TitleBarOrientation + End Get + Set(value As Orientation) + m_TitleBarOrientation = value + End Set + End Property + + ' Definizione comandi + Private m_cmdWireframe As ICommand + Private m_cmdHiddenLine As ICommand + Private m_cmdShading As ICommand + 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_cmdCurveDir As ICommand + Private m_cmdAnalyze As ICommand + Private m_cmdGetDist As ICommand + Private m_cmdCPlaneTop As ICommand + Private m_cmdCPlaneFront As ICommand + Private m_cmdCPlaneRight As ICommand + Private m_cmdCPlaneBack As ICommand + Private m_cmdCPlaneLeft As ICommand + Private m_cmdCPlaneBottom As ICommand + Private m_cmdCPlaneView As ICommand + Private m_cmdCPlaneElevation As ICommand + Private m_cmdCPlaneOrigin As ICommand + Private m_cmdCPlaneRotate As ICommand + Private m_cmdCPlane3P As ICommand + Private m_cmdCPlanePerpObj As ICommand + Private m_cmdCPlaneObj As ICommand + + + ' Costruttore + Sub New() + + End Sub + +#Region "WireframeCommand" + + ''' + ''' Returns a command that manage the MainWindow_ContentRendered command + ''' + Public ReadOnly Property WireframeCommand() As ICommand + Get + If m_cmdWireframe Is Nothing Then + m_cmdWireframe = New RelayCommand(AddressOf Wireframe) + End If + Return m_cmdWireframe + End Get + End Property + + ''' + ''' Manage the MainWindow_ContentRendered event. This method is invoked by the cmdMainWindow_ContentRendered. + ''' + Public Sub Wireframe(ByVal param As Object) + ' Notify the ContentRendered event + Application.Msn.NotifyColleagues(Application.WIREFRAME) + End Sub + +#End Region ' WireframeCommand + +#Region "HiddenLineCommand" + + ''' + ''' Returns a command that swith the view mode to HiddenLine. + ''' + Public ReadOnly Property HiddenLineCommand As ICommand + Get + If m_cmdHiddenLine Is Nothing Then + m_cmdHiddenLine = New RelayCommand(AddressOf HiddenLine, AddressOf CanHiddenLine) + End If + Return m_cmdHiddenLine + End Get + End Property + + ''' + ''' Swith the view mode to HiddenLine. This method is invoked by the HiddenLineCommand. + ''' + Public Sub HiddenLine(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.HIDDENLINE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanHiddenLine(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' HiddenLineCommand + +#Region "ShadingCommand" + + ''' + ''' Returns a command that swith the view mode to Shading. + ''' + Public ReadOnly Property ShadingCommand As ICommand + Get + If m_cmdShading Is Nothing Then + m_cmdShading = New RelayCommand(AddressOf Shading, AddressOf CanShading) + End If + Return m_cmdShading + End Get + End Property + + ''' + ''' Swith the view mode to Shading. This method is invoked by the ShadingCommand. + ''' + Public Sub Shading(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.SHADING) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanShading(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' ShadingCommand + +#Region "ZoomAllCommand" + + ''' + ''' Returns a command that do ZoomAll. + ''' + Public ReadOnly Property ZoomAllCommand As ICommand + Get + If m_cmdZoomAll Is Nothing Then + m_cmdZoomAll = New RelayCommand(AddressOf ZoomAll, AddressOf CanZoomAll) + End If + Return m_cmdZoomAll + End Get + End Property + + ''' + ''' Execute the ZoomAll. This method is invoked by the ZoomAllCommand. + ''' + Public Sub ZoomAll(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.ZOOMALL) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanZoomAll(ByVal param As Object) As Boolean + Return True + End Function + +#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" + + ''' + ''' Returns a command that do TopView. + ''' + Public ReadOnly Property TopViewCommand As ICommand + Get + If m_cmdTopView Is Nothing Then + m_cmdTopView = New RelayCommand(AddressOf TopView, AddressOf CanTopView) + End If + Return m_cmdTopView + End Get + End Property + + ''' + ''' Execute the TopView. This method is invoked by the TopViewCommand. + ''' + Public Sub TopView(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.TOPVIEW) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanTopView(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' TopViewCommand + +#Region "FrontViewCommand" + + ''' + ''' Returns a command that do FrontView. + ''' + Public ReadOnly Property FrontViewCommand As ICommand + Get + If m_cmdFrontView Is Nothing Then + m_cmdFrontView = New RelayCommand(AddressOf FrontView, AddressOf CanFrontView) + End If + Return m_cmdFrontView + End Get + End Property + + ''' + ''' Execute the FrontView. This method is invoked by the FrontViewCommand. + ''' + Public Sub FrontView(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.FRONTVIEW) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanFrontView(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' FrontViewCommand + +#Region "LeftViewCommand" + + ''' + ''' Returns a command that do LeftView. + ''' + Public ReadOnly Property LeftViewCommand As ICommand + Get + If m_cmdLeftView Is Nothing Then + m_cmdLeftView = New RelayCommand(AddressOf LeftView, AddressOf CanLeftView) + End If + Return m_cmdLeftView + End Get + End Property + + ''' + ''' Execute the LeftView. This method is invoked by the LeftViewCommand. + ''' + Public Sub LeftView(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.LEFTVIEW) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanLeftView(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' LeftViewCommand + +#Region "BackViewCommand" + + ''' + ''' Returns a command that do BackView. + ''' + Public ReadOnly Property BackViewCommand As ICommand + Get + If m_cmdBackView Is Nothing Then + m_cmdBackView = New RelayCommand(AddressOf BackView, AddressOf CanBackView) + End If + Return m_cmdBackView + End Get + End Property + + ''' + ''' Execute the BackView. This method is invoked by the BackViewCommand. + ''' + Public Sub BackView(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.BACKVIEW) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanBackView(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' BackViewCommand + +#Region "RightViewCommand" + + ''' + ''' Returns a command that do RightView. + ''' + Public ReadOnly Property RightViewCommand As ICommand + Get + If m_cmdRightView Is Nothing Then + m_cmdRightView = New RelayCommand(AddressOf RightView, AddressOf CanRightView) + End If + Return m_cmdRightView + End Get + End Property + + ''' + ''' Execute the RightView. This method is invoked by the RightViewCommand. + ''' + Public Sub RightView(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.RIGHTVIEW) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanRightView(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' RightViewCommand + +#Region "IsoViewSWCommand" + + ''' + ''' Returns a command that do IsoViewSW. + ''' + Public ReadOnly Property IsoViewSWCommand As ICommand + Get + If m_cmdIsoViewSW Is Nothing Then + m_cmdIsoViewSW = New RelayCommand(AddressOf IsoViewSW, AddressOf CanIsoViewSW) + End If + Return m_cmdIsoViewSW + End Get + End Property + + ''' + ''' Execute the IsoViewSW. This method is invoked by the IsoViewSWCommand. + ''' + Public Sub IsoViewSW(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.ISOVIEWSW) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanIsoViewSW(ByVal param As Object) As Boolean + Return True + End Function + +#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 "CurveDirCommand" + + ''' + ''' Returns a command that do CurveDir. + ''' + Public ReadOnly Property CurveDirCommand As ICommand + Get + If m_cmdCurveDir Is Nothing Then + m_cmdCurveDir = New RelayCommand(AddressOf CurveDir, AddressOf CanCurveDir) + End If + Return m_cmdCurveDir + End Get + End Property + + ''' + ''' Execute the CurveDir. This method is invoked by the CurveDirCommand. + ''' + Public Sub CurveDir(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CURVEDIR) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCurveDir(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CurveDirCommand + +#Region "AnalyzeCommand" + + ''' + ''' Returns a command that do Analyze. + ''' + Public ReadOnly Property AnalyzeCommand As ICommand + Get + If m_cmdAnalyze Is Nothing Then + m_cmdAnalyze = New RelayCommand(AddressOf Analyze, AddressOf CanAnalyze) + End If + Return m_cmdAnalyze + End Get + End Property + + ''' + ''' Execute the Analyze. This method is invoked by the AnalyzeCommand. + ''' + Public Sub Analyze(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.ANALYZE) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanAnalyze(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' AnalyzeCommand + +#Region "GetDistCommand" + + ''' + ''' Returns a command that do GetDist. + ''' + Public ReadOnly Property GetDistCommand As ICommand + Get + If m_cmdGetDist Is Nothing Then + m_cmdGetDist = New RelayCommand(AddressOf GetDist, AddressOf CanGetDist) + End If + Return m_cmdGetDist + End Get + End Property + + ''' + ''' Execute the GetDist. This method is invoked by the GetDistCommand. + ''' + Public Sub GetDist(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.GETDIST) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanGetDist(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' GetDistCommand + +#Region "CPlaneTopCommand" + + ''' + ''' Returns a command that do CPlaneTop. + ''' + Public ReadOnly Property CPlaneTopCommand As ICommand + Get + If m_cmdCPlaneTop Is Nothing Then + m_cmdCPlaneTop = New RelayCommand(AddressOf CPlaneTop, AddressOf CanCPlaneTop) + End If + Return m_cmdCPlaneTop + End Get + End Property + + ''' + ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand. + ''' + Public Sub CPlaneTop(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANETOP) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneTop(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneTopCommand + +#Region "CPlaneFrontCommand" + + ''' + ''' Returns a command that do CPlaneFront. + ''' + Public ReadOnly Property CPlaneFrontCommand As ICommand + Get + If m_cmdCPlaneFront Is Nothing Then + m_cmdCPlaneFront = New RelayCommand(AddressOf CPlaneFront, AddressOf CanCPlaneFront) + End If + Return m_cmdCPlaneFront + End Get + End Property + + ''' + ''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand. + ''' + Public Sub CPlaneFront(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANEFRONT) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneFront(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneFrontCommand + +#Region "CPlaneRightCommand" + + ''' + ''' Returns a command that do CPlaneRight. + ''' + Public ReadOnly Property CPlaneRightCommand As ICommand + Get + If m_cmdCPlaneRight Is Nothing Then + m_cmdCPlaneRight = New RelayCommand(AddressOf CPlaneRight, AddressOf CanCPlaneRight) + End If + Return m_cmdCPlaneRight + End Get + End Property + + ''' + ''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand. + ''' + Public Sub CPlaneRight(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANERIGHT) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneRight(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneRightCommand + +#Region "CPlaneBackCommand" + + ''' + ''' Returns a command that do CPlaneBack. + ''' + Public ReadOnly Property CPlaneBackCommand As ICommand + Get + If m_cmdCPlaneBack Is Nothing Then + m_cmdCPlaneBack = New RelayCommand(AddressOf CPlaneBack, AddressOf CanCPlaneBack) + End If + Return m_cmdCPlaneBack + End Get + End Property + + ''' + ''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand. + ''' + Public Sub CPlaneBack(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANEBACK) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneBack(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneBackCommand + +#Region "CPlaneLeftCommand" + + ''' + ''' Returns a command that do CPlaneLeft. + ''' + Public ReadOnly Property CPlaneLeftCommand As ICommand + Get + If m_cmdCPlaneLeft Is Nothing Then + m_cmdCPlaneLeft = New RelayCommand(AddressOf CPlaneLeft, AddressOf CanCPlaneLeft) + End If + Return m_cmdCPlaneLeft + End Get + End Property + + ''' + ''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand. + ''' + Public Sub CPlaneLeft(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANELEFT) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneLeft(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneLeftCommand + +#Region "CPlaneBottomCommand" + + ''' + ''' Returns a command that do CPlaneBottom. + ''' + Public ReadOnly Property CPlaneBottomCommand As ICommand + Get + If m_cmdCPlaneBottom Is Nothing Then + m_cmdCPlaneBottom = New RelayCommand(AddressOf CPlaneBottom, AddressOf CanCPlaneBottom) + End If + Return m_cmdCPlaneBottom + End Get + End Property + + ''' + ''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand. + ''' + Public Sub CPlaneBottom(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANEBOTTOM) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneBottom(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneBottomCommand + +#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 "CPlaneElevationCommand" + + ''' + ''' Returns a command that do CPlaneElevation. + ''' + Public ReadOnly Property CPlaneElevationCommand As ICommand + Get + If m_cmdCPlaneElevation Is Nothing Then + m_cmdCPlaneElevation = New RelayCommand(AddressOf CPlaneElevation, AddressOf CanCPlaneElevation) + End If + Return m_cmdCPlaneElevation + End Get + End Property + + ''' + ''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand. + ''' + Public Sub CPlaneElevation(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANEELEVATION) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneElevation(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneElevationCommand + +#Region "CPlaneOriginCommand" + + ''' + ''' Returns a command that do CPlaneOrigin. + ''' + Public ReadOnly Property CPlaneOriginCommand As ICommand + Get + If m_cmdCPlaneOrigin Is Nothing Then + m_cmdCPlaneOrigin = New RelayCommand(AddressOf CPlaneOrigin, AddressOf CanCPlaneOrigin) + End If + Return m_cmdCPlaneOrigin + End Get + End Property + + ''' + ''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand. + ''' + Public Sub CPlaneOrigin(ByVal param As Object) + Application.Msn.NotifyColleagues(Application.CPLANEORIGIN) + End Sub + + ''' + ''' Returns always true. + ''' + Private Function CanCPlaneOrigin(ByVal param As Object) As Boolean + Return True + End Function + +#End Region ' CPlaneOriginCommand + +#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 Class + +End Namespace \ No newline at end of file diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml new file mode 100644 index 0000000..71660cb --- /dev/null +++ b/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml.vb b/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml.vb new file mode 100644 index 0000000..b165729 --- /dev/null +++ b/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelView.xaml.vb @@ -0,0 +1,3 @@ +Public Class DrawOptionPanelView + +End Class diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelViewModel.vb new file mode 100644 index 0000000..dfea028 --- /dev/null +++ b/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelViewModel.vb @@ -0,0 +1,150 @@ +Imports System.Collections.ObjectModel + +Namespace EgtCAM5 + + Public Class DrawOptionPanelViewModel + Inherits ViewModelBase + + ' GRAPHICAL ELEMENTS + Private m_ManageLayerExpander As ManageLayerExpanderView + Public ReadOnly Property ManageLayerExpander As ManageLayerExpanderView + Get + If IsNothing(m_ManageLayerExpander) Then + m_ManageLayerExpander = New ManageLayerExpanderView + m_ManageLayerExpander.DataContext = New ManageLayerExpanderViewModel + End If + Return m_ManageLayerExpander + End Get + End Property + + Private m_InputExpander As InputExpanderView + Public ReadOnly Property InputExpander As InputExpanderView + Get + If IsNothing(m_InputExpander) Then + m_InputExpander = New InputExpanderView + m_InputExpander.DataContext = New InputExpanderViewModel + End If + Return m_InputExpander + End Get + End Property + + Private m_InfoExpander As InfoExpanderView + Public ReadOnly Property InfoExpander As InfoExpanderView + Get + If IsNothing(m_InfoExpander) Then + m_InfoExpander = New InfoExpanderView + m_InfoExpander.DataContext = New InfoExpanderViewModel + End If + Return m_InfoExpander + End Get + End Property + + Private m_Title As String + Public Property Title As String + Get + Return m_Title + End Get + Set(value As String) + m_Title = value + OnPropertyChanged("Title") + End Set + End Property + + Private m_TextBlock As String + Public Property TextBlock As String + Get + Return m_TextBlock + End Get + Set(value As String) + m_TextBlock = value + OnPropertyChanged("TextBlock") + End Set + End Property + + Private m_TextBox As String + Public Property TextBox As String + Get + Return m_TextBox + End Get + Set(value As String) + m_TextBox = value + OnPropertyChanged("TextBox") + End Set + End Property + + Private m_CheckBoxText As String + Public Property CheckBoxText As String + Get + Return m_CheckBoxText + End Get + Set(value As String) + m_CheckBoxText = value + OnPropertyChanged("CheckBoxText") + End Set + End Property + + Private m_ComboItemsList As ObservableCollection(Of String) + Public Property ComboItemsList As ObservableCollection(Of String) + Get + Return m_ComboItemsList + End Get + Set(value As ObservableCollection(Of String)) + m_ComboItemsList = value + OnPropertyChanged("ComboItemsList") + End Set + End Property + + Private m_ComboSelectedItem As String + Public Property ComboSelectedItem As String + Get + Return m_ComboSelectedItem + End Get + Set(value As String) + m_ComboSelectedItem = value + OnPropertyChanged("ComboSelectedItem") + End Set + End Property + + Private m_ShowVisibility As Boolean + Public Property ShowVisibility As Boolean + Get + Return m_ShowVisibility + End Get + Set(value As Boolean) + m_ShowVisibility = value + OnPropertyChanged("ShowVisibility") + End Set + End Property + + Sub New() + Application.Msn.NotifyColleagues(Application.NOTIFYINPUTTEXT, TextBox) + End Sub + + Private Sub PrepareInputBox(ByRef sTitle As String, ByRef sLabel As String, ByRef sCheckLabel As String, + ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean) + Title = sTitle + TextBlock = sLabel + TextBox = "" + If sCheckLabel <> "" Then + CheckBoxText = sCheckLabel + End If + If bShowCombo Then + ComboItemsList.Clear() + End If + If bShowBtn Then + ShowVisibility = True + End If + 'InputText.Focus() + End Sub + + Private Sub ResetInputBox() + 'InputBox.Hide() + 'InputCheck.Hide() + 'InputCombo.Hide() + 'btnShow.Hide() + 'Scene1.Focus() + End Sub + + End Class + +End Namespace \ No newline at end of file diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml new file mode 100644 index 0000000..5275c6f --- /dev/null +++ b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml.vb b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml.vb new file mode 100644 index 0000000..77119ad --- /dev/null +++ b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml.vb @@ -0,0 +1,3 @@ +Public Class InfoExpanderView + +End Class diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb new file mode 100644 index 0000000..8bb9338 --- /dev/null +++ b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderViewModel.vb @@ -0,0 +1,7 @@ +Namespace EgtCAM5 + + Public Class InfoExpanderViewModel + + End Class + +End Namespace \ No newline at end of file diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml new file mode 100644 index 0000000..5c214e0 --- /dev/null +++ b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + +