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/MachiningsDbPage/MachiningsDbView.xaml.vb b/MachiningsDbPage/MachiningsDbView.xaml.vb
new file mode 100644
index 0000000..abeb6a6
--- /dev/null
+++ b/MachiningsDbPage/MachiningsDbView.xaml.vb
@@ -0,0 +1,3 @@
+Public Class MachiningsDbView
+
+End Class
diff --git a/MachiningsDbPage/MachiningsDbViewModel.vb b/MachiningsDbPage/MachiningsDbViewModel.vb
new file mode 100644
index 0000000..0b5f42d
--- /dev/null
+++ b/MachiningsDbPage/MachiningsDbViewModel.vb
@@ -0,0 +1,641 @@
+Imports System.Windows.Forms.Integration
+Imports System.Collections.ObjectModel
+Imports System.IO
+Imports EgtUILib
+
+Namespace EgtCAM5
+
+ Public Class MachiningsDbViewModel
+ Inherits TabViewModel
+
+ ' Lista delle macchine disponibili nel programma
+ Private m_MachinesList As New ObservableCollection(Of Machine)
+ Public Property MachinesList As ObservableCollection(Of Machine)
+ Get
+ Return m_MachinesList
+ End Get
+ Set(value As ObservableCollection(Of Machine))
+ m_MachinesList = value
+ End Set
+ End Property
+ ' Macchina correntemente selezionata e quindi attiva
+ Private m_SelectedMachine As Machine
+ Public Property SelectedMachine As Machine
+ Get
+ Return m_SelectedMachine
+ End Get
+ Set(value As Machine)
+ If value IsNot m_SelectedMachine Then
+ m_SelectedMachine = value
+ 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtSetCurrMachine(m_SelectedMachine.Name)
+ IniFile.m_sDbsCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
+ 'IniFile.m_sTdbCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
+ m_MachiningsList.Clear()
+ LoadSelectedMachineMachinings()
+ OnPropertyChanged("SelectedMachine")
+ End If
+ End Set
+ End Property
+
+ ' Lista delle lavorazioni
+ Private m_MachiningsList As New ObservableCollection(Of FamilyMachiningTreeViewItem)
+ Public Property MachiningsList As ObservableCollection(Of FamilyMachiningTreeViewItem)
+ Get
+ Return m_MachiningsList
+ End Get
+ Set(value As ObservableCollection(Of FamilyMachiningTreeViewItem))
+ m_MachiningsList = value
+ End Set
+ End Property
+
+ ' Definizione comandi
+ Private m_cmdNew As ICommand
+ Private m_cmdSave As ICommand
+ Private m_cmdRemove As ICommand
+
+ 'Definizione dei messaggi della pagina
+ Public ReadOnly Property InvertTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 51)
+ End Get
+ End Property
+
+ Public ReadOnly Property LeaveTabTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 52)
+ End Get
+ End Property
+
+ Public ReadOnly Property WorkSideTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 54)
+ End Get
+ End Property
+
+ Public ReadOnly Property HeadSideTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 55)
+ End Get
+ End Property
+
+ Public ReadOnly Property LeadInTypeTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 56)
+ End Get
+ End Property
+
+ Public ReadOnly Property ExtLinkTypeTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 57)
+ End Get
+ End Property
+
+ Public ReadOnly Property LeadOutTypeTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 58)
+ End Get
+ End Property
+
+ Public ReadOnly Property CurveUseTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 59)
+ End Get
+ End Property
+
+ Public ReadOnly Property StepTypeTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 60)
+ End Get
+ End Property
+
+ Public ReadOnly Property LeadLinkTypeTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 62)
+ End Get
+ End Property
+
+ Public ReadOnly Property SpeedTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 63)
+ End Get
+ End Property
+
+ Public ReadOnly Property FeedTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 64)
+ End Get
+ End Property
+
+ Public ReadOnly Property StartFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 65)
+ End Get
+ End Property
+
+ Public ReadOnly Property EndFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 66)
+ End Get
+ End Property
+
+ Public ReadOnly Property TipFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 67)
+ End Get
+ End Property
+
+ Public ReadOnly Property OffSrTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 68)
+ End Get
+ End Property
+
+ Public ReadOnly Property OffSlTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 69)
+ End Get
+ End Property
+
+ Public ReadOnly Property SideAngleTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 71)
+ End Get
+ End Property
+
+ Public ReadOnly Property ApproxTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 72)
+ End Get
+ End Property
+
+ Public ReadOnly Property StartPosTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 73)
+ End Get
+ End Property
+
+ Public ReadOnly Property StartSlowLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 74)
+ End Get
+ End Property
+
+ Public ReadOnly Property EndSlowLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 75)
+ End Get
+ End Property
+
+ Public ReadOnly Property ThrouAddLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 76)
+ End Get
+ End Property
+
+ Public ReadOnly Property StepParTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 77)
+ End Get
+ End Property
+
+ Public ReadOnly Property ReturnPosTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 78)
+ End Get
+ End Property
+
+ Public ReadOnly Property TabLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 80)
+ End Get
+ End Property
+
+ Public ReadOnly Property TabDistTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 81)
+ End Get
+ End Property
+
+ Public ReadOnly Property TabHeightTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 82)
+ End Get
+ End Property
+
+ Public ReadOnly Property TabAngleTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 83)
+ End Get
+ End Property
+
+ Public ReadOnly Property LiTangTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 84)
+ End Get
+ End Property
+
+ Public ReadOnly Property LiPerpTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 85)
+ End Get
+ End Property
+
+ Public ReadOnly Property LiElevTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 86)
+ End Get
+ End Property
+
+ Public ReadOnly Property LiCompLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 87)
+ End Get
+ End Property
+
+ Public ReadOnly Property LoTangTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 88)
+ End Get
+ End Property
+
+ Public ReadOnly Property LoPerpTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 89)
+ End Get
+ End Property
+
+ Public ReadOnly Property LoElevTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 90)
+ End Get
+ End Property
+
+ Public ReadOnly Property LoCompLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 91)
+ End Get
+ End Property
+
+ Public ReadOnly Property StartAddLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 92)
+ End Get
+ End Property
+
+ Public ReadOnly Property EndAddLenTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 93)
+ End Get
+ End Property
+
+ Public ReadOnly Property StepExtArcTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 95)
+ End Get
+ End Property
+
+ Public ReadOnly Property StepIntArcTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 96)
+ End Get
+ End Property
+
+ Public ReadOnly Property SideStepTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 97)
+ End Get
+ End Property
+
+ Public ReadOnly Property VertFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 98)
+ End Get
+ End Property
+
+ Public ReadOnly Property NameParTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 99)
+ End Get
+ End Property
+
+ Public ReadOnly Property ToolTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 100)
+ End Get
+ End Property
+
+ Public ReadOnly Property DepthStrTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 101)
+ End Get
+ End Property
+
+ Public ReadOnly Property UserNotesTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 104)
+ End Get
+ End Property
+
+ Public ReadOnly Property OverLapStrTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 105)
+ End Get
+ End Property
+
+ Public ReadOnly Property OffsetStrTxBl As String
+ Get
+ Return EgtMsg(MSG_MACHININGSDBPAGE + 106)
+ End Get
+ End Property
+
+
+ '''
+ ''' Constructor
+ '''
+ Sub New()
+ Me.sTabName = EgtMsg(MSG_MAINWINDOW + 4)
+ SearchMachine()
+
+ Application.Msn.Register(Application.REMOVEMACHINING, Sub(MachiningToRemove As MachiningTreeViewItem)
+ Remove(MachiningToRemove)
+ End Sub)
+ ' Quando chiamato, disattiva tutti gli item dell'albero o li riattiva a seconda che ci sia o meno un errore
+ Application.Msn.Register(Application.ERRORONMACHINING, Sub(WrongMachining As MachiningTreeViewItem)
+ For Each FamilyMachiningItem In MachiningsList
+ If IsNothing(WrongMachining) Then
+ FamilyMachiningItem.IsEnabled = True
+ Else
+ FamilyMachiningItem.IsEnabled = False
+ End If
+ For Each MachiningItem In FamilyMachiningItem.Items
+ If IsNothing(WrongMachining) Then
+ MachiningItem.IsEnabled = True
+ ElseIf MachiningItem IsNot WrongMachining Then
+ MachiningItem.IsEnabled = False
+ Else
+ MachiningItem.IsEnabled = True
+ End If
+ Next
+ Next
+ End Sub)
+ End Sub
+
+ '''
+ ''' Method that search the machines in the correct folder and add to the MachinesList those valid.
+ '''
+ Private Sub SearchMachine()
+ Dim TempArray As String() = Directory.GetDirectories(IniFile.m_sMachinesRoot)
+ For i As Integer = 0 To TempArray.Count - 1
+ Dim MachinePathIni As String = TempArray(i) & "\" & Path.GetFileName(TempArray(i)) & ".ini"
+ If File.Exists(MachinePathIni) Then
+ m_MachinesList.Add(New Machine With {.Name = Path.GetFileName(TempArray(i)), .MachineDirPath = TempArray(i)})
+ End If
+ Next
+ End Sub
+
+ '''
+ ''' Class that create the association Name/IniPath for the machine's
+ '''
+ Class Machine
+
+ Private m_sName As String
+ Public Property Name As String
+ Get
+ Return m_sName
+ End Get
+ Set(value As String)
+ m_sName = value
+ End Set
+ End Property
+
+ Friend MachineDirPath As String
+
+ End Class
+
+ '''
+ ''' Method that search the machines in the correct folder and add to the MachinesList those valid.
+ '''
+ Private Sub LoadSelectedMachineMachinings()
+ Dim ActiveMachiningsTypes() As MachiningsType = ReadActiveMachiningsFamilies()
+ For Each MachiningsType In ActiveMachiningsTypes
+ Dim FamilyTreeView As New FamilyMachiningTreeViewItem(MachiningsType.TypeName, MachiningsType.TypeId)
+ MachiningsList.Add(FamilyTreeView)
+ Dim MachiningName As String = String.Empty
+ If EgtMdbGetFirstMachining(MachiningsType.TypeId, MachiningName) Then
+ FamilyTreeView.Items.Add(New MachiningTreeViewItem(MachiningName, MachiningsType.TypeId))
+ While EgtMdbGetNextMachining(MachiningsType.TypeId, MachiningName)
+ FamilyTreeView.Items.Add(New MachiningTreeViewItem(MachiningName, MachiningsType.TypeId))
+ End While
+ End If
+ Next
+ ' Se esiste almeno una famiglia di lavorazioni, la seleziono
+ If MachiningsList.Count > 0 Then
+ MachiningsList(0).IsSelected = True
+ MachiningsList(0).NotifyPropertyChanged("IsSelected")
+ End If
+ End Sub
+
+ '''
+ ''' Method that search the machines in the correct folder and add to the MachinesList those valid.
+ '''
+ Private Function ReadActiveMachiningsFamilies() As MachiningsType()
+ Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.DRILLING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 1)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 2)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.MILLING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 3)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.POCKETING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 4)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.MORTISING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 5)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWROUGHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 6)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SAWFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 7)})
+ End If
+ Return ActiveMachiningsFamiliesList.ToArray
+ End Function
+
+ '''
+ ''' Structure that represent a tool's family, containing family type and family name
+ '''
+ Structure MachiningsType
+
+ Friend TypeId As MCH_MY
+ Friend TypeName As String
+
+ End Structure
+
+#Region "NewCommand"
+
+ '''
+ ''' Returns a command that create a new machining.
+ '''
+ Public ReadOnly Property NewCommand As ICommand
+ Get
+ If m_cmdNew Is Nothing Then
+ m_cmdNew = New RelayCommand(AddressOf NewPar, AddressOf CanNew)
+ End If
+ Return m_cmdNew
+ End Get
+ End Property
+
+ '''
+ ''' Creata the new machining. This method is invoked by the NewCommand.
+ '''
+ Public Sub NewPar(ByVal param As Object)
+ ' Verifico se sia selezionata una famiglia
+ Dim NewMachiningItem As MachiningTreeViewItem
+ If TypeOf param Is FamilyMachiningTreeViewItem Then
+ Dim MachiningFamily As FamilyMachiningTreeViewItem = DirectCast(param, FamilyMachiningTreeViewItem)
+ Dim NewName As String = MachiningFamily.Name
+ EgtMdbGetMachiningNewName(NewName)
+ If EgtMdbAddMachining(NewName, MachiningFamily.MachiningType) Then
+ NewMachiningItem = New MachiningTreeViewItem(NewName, DirectCast(MachiningFamily.Type, MCH_MY))
+ MachiningFamily.Items.Add(NewMachiningItem)
+ EgtMdbSaveCurrMachining()
+ NewMachiningItem.NewMachining = True
+ If Not MachiningFamily.IsExpanded Then MachiningFamily.IsExpanded = True
+ NewMachiningItem.IsSelected = True
+ NewMachiningItem.NotifyPropertyChanged("IsSelected")
+ End If
+ ' Verifico se sia selezionata una lavorazione
+ ElseIf TypeOf param Is MachiningTreeViewItem Then
+ Dim MachiningCopied As MachiningTreeViewItem = DirectCast(param, MachiningTreeViewItem)
+ Dim NewName As String = MachiningCopied.Name
+ EgtMdbGetMachiningNewName(NewName)
+ If EgtMdbCopyMachining(MachiningCopied.Name, NewName) Then
+ Dim CurrType As Integer
+ EgtMdbGetCurrMachiningParam(MCH_MP.TYPE, CurrType)
+ For Each MachiningFamily In MachiningsList
+ If (MachiningFamily.MachiningType And CurrType) <> 0 Then
+ NewMachiningItem = New MachiningTreeViewItem(NewName, DirectCast(MachiningFamily.Type, MCH_MY))
+ MachiningFamily.Items.Add(NewMachiningItem)
+ EgtMdbSaveCurrMachining()
+ NewMachiningItem.IsSelected = True
+ NewMachiningItem.NotifyPropertyChanged("IsSelected")
+ Exit For
+ End If
+ Next
+ End If
+ End If
+
+ End Sub
+
+ '''
+ ''' Returns true if the selected treeviewitem is valid for new tool creation.
+ '''
+ Private Function CanNew(ByVal param As Object) As Boolean
+ ' Verifico se sia selezionata una famiglia
+ If TypeOf param Is FamilyMachiningTreeViewItem Then
+ Return True
+ ' Verifico se sia selezionata una lavorazione
+ ElseIf TypeOf param Is MachiningTreeViewItem Then
+ ' Verifico che i parametri della lavorazione siano validi
+ Return DirectCast(param, MachiningTreeViewItem).IsValid
+ Else
+ Return False
+ End If
+ End Function
+
+#End Region ' NewCommand
+
+#Region "SaveCommand"
+
+ '''
+ ''' Returns a command that save the current selected machining.
+ '''
+ Public ReadOnly Property SaveCommand() As ICommand
+ Get
+ If m_cmdSave Is Nothing Then
+ m_cmdSave = New RelayCommand(AddressOf Save, AddressOf CanSave)
+ End If
+ Return m_cmdSave
+ End Get
+ End Property
+
+ '''
+ ''' Saves the current machining. This method is invoked by the SaveCommand.
+ '''
+ Public Sub Save(ByVal param As Object)
+ EgtMdbSaveCurrMachining()
+ EgtMdbSave()
+ End Sub
+
+ '''
+ ''' Returns true if the selected machining is valid and can be saved.
+ '''
+ Private Function CanSave(ByVal param As Object) As Boolean
+ ' Verifico che sia selezionata una lavorazione
+ If TypeOf param Is ToolTreeViewItem Then
+ ' Verifico che i parametri della lavorazione siano validi
+ Return DirectCast(param, ToolTreeViewItem).IsValid And EgtMdbIsCurrMachiningModified()
+ Else
+ Return False
+ End If
+ End Function
+
+#End Region ' SaveCommand
+
+#Region "RemoveCommand"
+
+ '''
+ ''' Returns a command that remove the current selected machining.
+ '''
+ Public ReadOnly Property RemoveCommand() As ICommand
+ Get
+ If m_cmdRemove Is Nothing Then
+ m_cmdRemove = New RelayCommand(AddressOf Remove, AddressOf CanRemove)
+ End If
+ Return m_cmdRemove
+ End Get
+ End Property
+
+ '''
+ ''' Remove the current selected machining from Db and TreeView. This method is invoked by the RemoveCommand.
+ '''
+ Public Sub Remove(ByVal param As Object)
+ Dim MachiningToRemove As MachiningTreeViewItem = DirectCast(param, MachiningTreeViewItem)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ ' Salvo il tipo di lavorazione per poterla cancellare
+ Dim MachiningType As Integer = MachiningToRemove.Type
+ ' Cancello la lavorazione
+ EgtMdbRemoveMachining(MachiningToRemove.Name)
+ ' Rimuovo il nome dell'albero
+ For Each MachiningFamily In MachiningsList
+ If (MachiningFamily.MachiningType And MachiningType) <> 0 Then
+ MachiningFamily.Items.Remove(MachiningToRemove)
+ End If
+ Next
+ Application.Msn.NotifyColleagues(Application.ERRORONMACHINING, Nothing)
+ End Sub
+
+ '''
+ ''' Returns true if the selected machining can be removed.
+ '''
+ Private Function CanRemove(ByVal param As Object) As Boolean
+ ' Verifico se sia selezionata una famiglia
+ If TypeOf param Is FamilyMachiningTreeViewItem Then
+ Return False
+ ' Verifico se sia selezionata una lavorazione
+ ElseIf TypeOf param Is MachiningTreeViewItem Then
+ Return True
+ Else
+ Return False
+ End If
+ End Function
+
+#End Region ' RemoveCommand
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/MainWindow/MainWindow.xaml b/MainWindow/MainWindow.xaml
new file mode 100644
index 0000000..7d2c990
--- /dev/null
+++ b/MainWindow/MainWindow.xaml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MainWindow/MainWindow.xaml.vb b/MainWindow/MainWindow.xaml.vb
new file mode 100644
index 0000000..ebaef57
--- /dev/null
+++ b/MainWindow/MainWindow.xaml.vb
@@ -0,0 +1,3 @@
+Class MainWindow
+
+End Class
diff --git a/MainWindow/MainWindowViewModel.vb b/MainWindow/MainWindowViewModel.vb
new file mode 100644
index 0000000..2d222b7
--- /dev/null
+++ b/MainWindow/MainWindowViewModel.vb
@@ -0,0 +1,499 @@
+Imports System.Collections.ObjectModel
+Imports System.Threading
+Imports System.Math
+Imports EgtUILib
+
+Namespace EgtCAM5
+
+ Public Class MainWindowViewModel
+ Inherits ViewModelBase
+
+#Region "FIELDS"
+
+ ' EGALTECH ENVIRONMENT FIELDS
+
+ Private m_objMutex As New Mutex
+ Private m_nInstance As Integer = 0
+ Private m_sDataRoot As String = String.Empty
+ Private m_sConfigDir As String = String.Empty
+ Private m_sTempDir As String = String.Empty
+ Private m_sMachinesRoot As String = String.Empty
+ Private m_sIniFile As String = String.Empty
+ Private m_nDebug As Integer = 0
+ Private m_nUserLevel As Integer = 1
+ 'Private m_bShowGrid As Boolean
+ 'Private m_bShowGridFrame As Boolean
+ 'Private m_bCPlaneTypePos As Boolean
+ 'Private m_bMmUnits As Boolean
+ 'Private WithEvents m_Controller As New Controller
+ 'Private m_MruFiles As New MruList
+ 'Private m_MruScripts As New MruList
+ 'Private m_bStopExec As Boolean = False
+ 'Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
+ 'Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
+
+ ' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
+
+ ' GRAPHICAL FIELDS
+ ' Event commands
+ ' MainWindow ContentRendered Event
+ Private m_cmdMainWindow_ContentRendered As ICommand
+ ' MainWindow Activated Event
+ Private m_cmdMainWindow_Activated As ICommand
+ ' MainWindow Deactivated Event
+ Private m_cmdMainWindow_Deactivated As ICommand
+ ' MainWindow Closing Event
+ Private m_cmdMainWindow_Closing As ICommand
+
+ ' GRAPHICAL FIELDS WITH PROPERTY
+
+ ' ObservableCollection that contains all the main TabControl pages
+ Private m_TabList As New ObservableCollection(Of TabViewModel)
+ Public Property TabList As ObservableCollection(Of TabViewModel)
+ Get
+ Return m_TabList
+ End Get
+ Set(value As ObservableCollection(Of TabViewModel))
+ m_TabList = value
+ End Set
+ End Property
+
+ ' Fields that contains current selected page in the main TabControl
+ Private m_SelectedTab As TabViewModel
+ Public Property SelectedTab As TabViewModel
+ Get
+ Return m_SelectedTab
+ End Get
+ Set(value As TabViewModel)
+ If value IsNot m_SelectedTab Then
+ m_SelectedTab = value
+ OnPropertyChanged("SelectedTab")
+ If TypeOf value Is ProjectViewModel Then
+ ProjectPageSelected = True
+ Else
+ ProjectPageSelected = False
+ End If
+ If TypeOf value Is ToolsDbViewModel Then
+ ' Esce dal gruppo di lavorazione corrente per poter aprire le macchine del database
+ EgtResetCurrMachGroup()
+ End If
+ End If
+ End Set
+ End Property
+
+ ' Fields that know if the ProjectPage is currently selected
+ Private m_ProjectPageSelected As Boolean
+ Public Property ProjectPageSelected As Boolean
+ Get
+ Return m_ProjectPageSelected
+ End Get
+ Set(value As Boolean)
+ If value <> m_ProjectPageSelected Then
+ m_ProjectPageSelected = value
+ If value Then
+ Application.Msn.NotifyColleagues(Application.PROJECTPAGE_SELECTED)
+ Else
+ Application.Msn.NotifyColleagues(Application.PROJECTPAGE_DESELECTED)
+ End If
+ End If
+ End Set
+ End Property
+
+ '
+ Private m_StatusBar As New StatusBarView
+ Private m_bfirst As Boolean = True
+ Public ReadOnly Property StatusBar As StatusBarView
+ Get
+ If m_bfirst Then
+ m_StatusBar.DataContext = New StatusBarViewModel
+ m_bfirst = False
+ End If
+ Return m_StatusBar
+ End Get
+ End Property
+#End Region
+
+#Region "CONSTRUCTOR"
+
+ Sub New()
+ '
+ Application.Msn.Register(Application.CLOSEAPPLICATION, Sub()
+ 'Application.Current.MainWindow.Close()
+ End Sub)
+ ' INITIALIZE EGALTECH ENVIRONMENT
+ InitializeEgtEnvironment()
+
+
+ ' INITIALIZE GRAPHICS
+ TabList.Add(New ProjectViewModel)
+ TabList.Add(New ToolsDbViewModel)
+ TabList.Add(New MachiningsDbViewModel)
+ SelectedTab = TabList(0)
+ End Sub
+
+#End Region
+
+#Region "COMMANDS"
+
+#Region "cmdMainWindow_Closing"
+
+ '''
+ ''' Returns a command that manage the MainWindow_Unloaded command
+ '''
+ Public ReadOnly Property cmdMainWindow_Closing() As ICommand
+ Get
+ If m_cmdMainWindow_Closing Is Nothing Then
+ m_cmdMainWindow_Closing = New RelayCommand(AddressOf MainWindow_Closing, AddressOf CanMainWindow_Closing)
+ End If
+ Return m_cmdMainWindow_Closing
+ End Get
+ End Property
+
+ '''
+ ''' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
+ '''
+ Public Sub MainWindow_Closing(ByVal param As Object)
+ '' Gestisco eventuale file corrente modificato
+ 'If Not m_Controller.ManageModified() Then
+ ' E.Cancel = True
+ ' Return
+ 'End If
+ '' Salvo modo di visualizzazione
+ 'WritePrivateProfileString(S_SCENE, K_SHOWMODE, EgtGetShowMode(), m_sIniFile)
+ '' Salvo stato visualizzazione direzione curve
+ 'WritePrivateProfileString(S_SCENE, K_CURVEDIR, If(EgtGetShowCurveDirection(), 1, 0), m_sIniFile)
+ '' Salvo stato visualizzazione griglia
+ 'WritePrivateProfileString(S_GRID, K_SHOWGRID, If(m_bShowGrid, 1, 0), m_sIniFile)
+ '' Salvo stato unità di misura per interfaccia utente
+ 'WritePrivateProfileString(S_SCENE, K_MMUNITS, If(m_bMmUnits, 1, 0), m_sIniFile)
+ ' Salvo posizione Form (se non minimizzato)
+ 'If Me.WindowState <> FormWindowState.Minimized Then
+ ' Dim nFlag As Integer = If(Me.WindowState = FormWindowState.Maximized, 1, 0)
+ ' WritePrivateProfileWinPos(S_GENERAL, K_WINPLACE, nFlag, Me.Left, Me.Top, Me.Width, Me.Height, m_sIniFile)
+ 'End If
+ ' Terminazione generale di EgtInterface
+ EgtExit()
+ ' Rilascio mutex
+ m_objMutex.Close()
+ ' Aggiorno istanze usate
+ Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
+ nTmp -= (1 << (m_nInstance - 1))
+ WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp)
+ '' Disabilito gestore Idle
+ 'RemoveHandler Application.Idle, AddressOf Application_Idle
+
+ End Sub
+
+ '''
+ ''' Returns true if the application can be closed
+ '''
+ Private Function CanMainWindow_Closing(ByVal param As Object) As Boolean
+ '' Impedisco uscita se script in esecuzione
+ 'If m_bScriptRunning Then
+ ' m_bStopScript = True
+ ' E.Cancel = True
+ ' Return
+ 'End If
+ Return True
+ End Function
+
+#End Region ' Closing Command
+
+#Region "cmdMainWindow_ContentRendered"
+
+ '''
+ ''' Returns a command that manage the MainWindow_ContentRendered command
+ '''
+ Public ReadOnly Property cmdMainWindow_ContentRendered() As ICommand
+ Get
+ If m_cmdMainWindow_ContentRendered Is Nothing Then
+ m_cmdMainWindow_ContentRendered = New RelayCommand(AddressOf MainWindow_ContentRendered)
+ End If
+ Return m_cmdMainWindow_ContentRendered
+ End Get
+ End Property
+
+ '''
+ ''' Manage the MainWindow_ContentRendered event. This method is invoked by the cmdMainWindow_ContentRendered.
+ '''
+ Public Sub MainWindow_ContentRendered(ByVal param As Object)
+ ' Notify the ContentRendered event
+ Application.Msn.NotifyColleagues(Application.MAINWINDOW_CONTENTRENDERED)
+ End Sub
+
+#End Region ' ContentRendered Command
+
+#Region "cmdMainWindow_Activated"
+
+ '''
+ ''' Returns a command that manage the MainWindow_ContentRendered command
+ '''
+ Public ReadOnly Property cmdMainWindow_Activated() As ICommand
+ Get
+ If m_cmdMainWindow_Activated Is Nothing Then
+ m_cmdMainWindow_Activated = New RelayCommand(AddressOf MainWindow_Activated)
+ End If
+ Return m_cmdMainWindow_Activated
+ End Get
+ End Property
+
+ '''
+ ''' Manage the MainWindow_ContentRendered event. This method is invoked by the cmdMainWindow_ContentRendered.
+ '''
+ Public Sub MainWindow_Activated(ByVal param As Object)
+ ' Notify the ContentRendered event
+ Application.Msn.NotifyColleagues(Application.MAINWINDOW_ACTIVATED)
+ End Sub
+
+#End Region ' Activated Command
+
+#Region "cmdMainWindow_Deactivated"
+
+ '''
+ ''' Returns a command that manage the MainWindow_ContentRendered command
+ '''
+ Public ReadOnly Property cmdMainWindow_Deactivated() As ICommand
+ Get
+ If m_cmdMainWindow_Deactivated Is Nothing Then
+ m_cmdMainWindow_Deactivated = New RelayCommand(AddressOf MainWindow_Deactivated)
+ End If
+ Return m_cmdMainWindow_Deactivated
+ End Get
+ End Property
+
+ '''
+ ''' Manage the MainWindow_ContentRendered event. This method is invoked by the cmdMainWindow_ContentRendered.
+ '''
+ Public Sub MainWindow_Deactivated(ByVal param As Object)
+ ' Notify the ContentRendered event
+ Application.Msn.NotifyColleagues(Application.MAINWINDOW_DEACTIVATED)
+ End Sub
+
+#End Region ' Deactivated Command
+
+#End Region
+
+#Region "METHODS"
+
+ '''
+ ''' Method that initialize EgalTech environment
+ '''
+ Private Sub InitializeEgtEnvironment()
+ '' Installo aggiornamento interfaccia
+ 'AddHandler System.Windows.Forms.Application.Idle, AddressOf Application_Idle
+ '' Abilito drag and drop
+ 'Me.AllowDrop = True
+ '' Title
+ 'EmitTitle()
+ ' Impostazione path radice per i dati
+ m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
+ If EgtUILib.GetPrivateProfileString(S_DATA, K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & DAT_FILE_NAME) = 0 Then
+ m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
+ End If
+ ' Impostazione direttorio di configurazione
+ m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
+ ' Impostazione direttorio per file temporanei
+ m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
+ ' Impostazione path Ini file
+ m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
+ ' Lo riporto nel modulo IniFile
+ IniFile.m_sIniFilePath = m_sIniFile
+ ' Impostazione direttorio per le macchine
+ If GetPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
+ m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
+ End If
+ IniFile.m_sMachinesRoot = m_sMachinesRoot
+ ' Verifico indice di istanza
+ ManageIstance()
+ ' Leggo e imposto chiave di protezione
+ Dim sLicFileName As String = String.Empty
+ GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
+ Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
+ Dim sKey As String = String.Empty
+ EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
+ EgtSetKey(sKey)
+ ' Inizializzazione generale di EgtInterface
+ m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
+ Dim sLogFile As String = m_sTempDir & "\" & GENLOG_FILE_NAME
+ Dim sLogMsg As String = My.Application.Info.Description.ToString() & " ver. " & My.Application.Info.Version.ToString()
+ EgtInit(m_nDebug, sLogFile, sLogMsg)
+ ' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
+ Dim sMsgDir As String = String.Empty
+ If GetPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
+ sMsgDir = m_sConfigDir
+ End If
+ ' Leggo file messaggi
+ Dim sMsgFile As String = String.Empty
+ GetPrivateProfileString(S_GENERAL, K_MESSAGES, "", sMsgFile)
+ Dim sMsgFilePath As String = sMsgDir & "\" & sMsgFile
+ If Not EgtLoadMessages(sMsgFilePath) Then
+ EgtOutLog("Error in EgtLoadMessages")
+ End If
+ ' Leggo e imposto livello utilizzatore
+ m_nUserLevel = GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1)
+ ' imposto dir font Nfe e font default
+ Dim sNfeDir As String = String.Empty
+ GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
+ Dim sDefFont As String = String.Empty
+ GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", sDefFont)
+ EgtSetFont(sNfeDir, sDefFont)
+ ' imposto dir di default per libreria Lua e lancio libreria di base
+ Dim sLuaLibsDir As String = String.Empty
+ GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
+ EgtSetLuaLibs(sLuaLibsDir)
+ Dim sLuaBaseLib As String = String.Empty
+ GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
+ EgtLuaRequire(sLuaBaseLib)
+ '' imposto unità di misura per interfaccia utente
+ 'm_bMmUnits = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1, m_sIniFile) <> 0)
+ 'UpdateStatusUnits()
+ '' imposto visualizzazione riferimento globale
+ 'Dim bShowGlobFrame As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWGFRAME, 1, m_sIniFile) <> 0)
+ 'EgtSetGlobFrameShow(bShowGlobFrame)
+ '' imposto i dati della griglia
+ 'LoadGridData()
+ '' imposto stato di visualizzazione della griglia
+ 'm_bShowGrid = (GetPrivateProfileInt(S_GRID, K_SHOWGRID, 1, m_sIniFile) <> 0)
+ 'm_bShowGridFrame = (GetPrivateProfileInt(S_GRID, K_SHOWFRAME, 1, m_sIniFile) <> 0)
+ 'UpdateStatusGrid()
+ '' imposto tipo coordinate
+ 'm_bCPlaneTypePos = True
+ 'Scene1.SetGridCursorPos(m_bCPlaneTypePos)
+ '' modo di visualizzazione
+ 'Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING, m_sIniFile)
+ 'If nShowMode = SM.WIREFRAME Then
+ ' btnWireFrame.Checked = True
+ 'ElseIf nShowMode = SM.HIDDENLINE Then
+ ' btnHiddenLine.Checked = True
+ 'Else
+ ' btnShading.Checked = True
+ 'End If
+ '' visualizzazione direzione curve
+ 'Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0, m_sIniFile)
+ 'chkCurveDir.Checked = (nShowCurveDir <> 0)
+ '' visualizzazione avanzata dei triangoli costituenti le superfici
+ 'Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1, m_sIniFile) <> 0)
+ 'EgtSetShowTriaAdv(bShowTriaAdv)
+ '' ObjTree non selezionato
+ 'm_nObjTreeOldId = GDB_ID.NULL
+ '' nascondo input box
+ 'ResetInputBox()
+ '' aggiungo voce per about box nel menù di sistema
+ 'Dim hSysMenu As IntPtr = GetSystemMenu(Handle, False)
+ 'If hSysMenu <> IntPtr.Zero Then
+ ' AppendMenu(hSysMenu, MF_SEPARATOR, 0, "")
+ ' AppendMenu(hSysMenu, MF_STRING, IDM_ABOUTBOX, "About TestEIn...")
+ 'End If
+ '' Visualizzo o nascondo TabTest
+ 'Dim bShowTabTest As Boolean = (GetPrivateProfileInt(S_TABSPECIAL, K_TSSHOW, 0, m_sIniFile) <> 0)
+ 'If Not bShowTabTest Then
+ ' TabControl2.TabPages.Remove(TabSpecial)
+ 'End If
+ '' Posizione e dimensioni del Form
+ 'If ModifierKeys <> Keys.Shift Then
+ ' Dim nFlag As Integer
+ ' Dim nLeft As Integer
+ ' Dim nTop As Integer
+ ' Dim nWidth As Integer
+ ' Dim nHeight As Integer
+ ' GetPrivateProfileWinPos(S_GENERAL, K_WINPLACE, nFlag, nLeft, nTop, nWidth, nHeight, m_sIniFile)
+ ' Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
+ ' Me.Location = New Point(nLeft, nTop)
+ ' Me.Size = New Size(nWidth, nHeight)
+ ' WindowState = If(nFlag = 1, FormWindowState.Maximized, FormWindowState.Normal)
+ 'End If
+ '' Impostazioni controller
+ 'm_Controller.SetScene(Scene1)
+ 'Dim bLuaReg As Boolean = (GetPrivateProfileInt(S_GENERAL, K_COMMANDLOG, 0, m_sIniFile) <> 0)
+ 'Dim sCmdLogFile As String = CMDLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+ 'If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
+ ' EgtOutLog("Command log not started")
+ ' If My.Application.CommandLineArgs.Count() = 0 Then
+ ' MessageBox.Show("Command log not started", "TestEIn Warning",
+ ' MessageBoxButtons.OK, MessageBoxIcon.Warning)
+ ' End If
+ 'End If
+ 'If m_Controller.GetCommandLog() Then
+ ' tsStatusReg.BackColor = Color.Lime
+ 'ElseIf bLuaReg Then
+ ' tsStatusReg.BackColor = Color.Red
+ 'End If
+ '' Impostazioni MruLists
+ 'm_MruFiles.Init(m_sIniFile, S_MRUFILES, 8)
+ 'm_MruScripts.Init(m_sIniFile, S_MRUSCRIPTS, 8)
+ '' Apro progetto vuoto
+ 'm_Controller.NewProject(True)
+ '' Impostazione Testi e ToolTips
+ 'SetMessages()
+ '' Installo funzione gestione eventi per lua
+ 'EgtSetProcessEvents(m_ProcEventsCallback)
+ '' Installo funzione output testo su status per lua
+ 'EgtSetOutText(m_OutTextCallback)
+
+ End Sub
+
+ '''
+ ''' Funzione che permette di gestire il numero di istanze del programma attive contemporaneamente
+ '''
+ Private Sub ManageIstance()
+ Dim bCreated As Boolean
+ Try
+ m_objMutex = New Mutex(False, "Global\EgtCAM5", bCreated)
+ Catch
+ bCreated = False
+ End Try
+ If bCreated Then
+ ' Prima istanza
+ m_nInstance = 1
+ ' Aggiorno stato istanze attive
+ WritePrivateProfileString(S_GENERAL, K_INSTANCES, m_nInstance.ToString)
+ Else
+ ' Leggo il massimo numero di istanze ammesse
+ Dim nMaxInst As Integer = GetPrivateProfileInt(S_GENERAL, K_MAXINST, 1)
+ nMaxInst = Max(1, Min(nMaxInst, 32))
+ ' Cerco il primo indice di istanza libero (max 32)
+ Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
+ m_nInstance = 1
+ Dim nMask As Integer = 1
+ While (nTmp And nMask) <> 0 And m_nInstance <= m_nInstance
+ m_nInstance += 1
+ nMask *= 2
+ End While
+ ' Se l'indice supera il massimo
+ If m_nInstance > nMaxInst Then
+ ' porto in primo piano la prima istanza
+ Dim bFound As Boolean = False
+ ' processi del programma a 32 bit
+ Dim localProc As Process() = Process.GetProcessesByName("EgtCAM5R32")
+ For Each p As Process In localProc
+ If p.Id <> Process.GetCurrentProcess().Id Then
+ bFound = True
+ ShowWindow(p.MainWindowHandle, SW.SHOWMAXIMIZED)
+ Exit For
+ End If
+ Next
+ ' se non trovati processi a 32 bit provo a 64 bit
+ If Not bFound Then
+ localProc = Process.GetProcessesByName("EgtCAM5R64")
+ For Each p As Process In localProc
+ If p.Id <> Process.GetCurrentProcess().Id Then
+ bFound = True
+ ShowWindow(p.MainWindowHandle, SW.SHOWMAXIMIZED)
+ Exit For
+ End If
+ Next
+ End If
+ ' esco dal programma
+ End
+ End If
+ ' Aggiorno stato istanze attive
+ nTmp += (1 << (m_nInstance - 1))
+ WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp)
+ End If
+ End Sub
+
+#End Region
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/Messenger.vb b/Messenger.vb
new file mode 100644
index 0000000..9ce4bcd
--- /dev/null
+++ b/Messenger.vb
@@ -0,0 +1,229 @@
+Imports System.Reflection
+
+'''
+''' Provides loosely-coupled messaging between
+''' various colleague objects. All references to objects
+''' are stored weakly, to prevent memory leaks.
+'''
+Public Class Messenger
+
+ Public Sub New()
+ End Sub
+
+ '''
+ ''' Registers a callback method to be invoked when a specific message is broadcasted.
+ '''
+ ''' The message to register for.
+ ''' The callback to be called when this message is broadcasted.
+ Public Sub Register(ByVal message As String, ByVal callback As [Delegate])
+
+ If String.IsNullOrEmpty(message) Then
+ Throw New ArgumentException("'message' cannot be null or empty.")
+ End If
+
+ If callback Is Nothing Then
+ Throw New ArgumentNullException("callback")
+ End If
+
+ Dim parameters As ParameterInfo() = callback.Method.GetParameters()
+
+ If parameters IsNot Nothing AndAlso parameters.Length > 1 Then
+ Throw New InvalidOperationException("The registered delegate can have no more than one parameter.")
+ End If
+
+ Dim parameterType As Type = If((parameters Is Nothing OrElse parameters.Length = 0), Nothing, parameters(0).ParameterType)
+ _messageToActionsMap.AddAction(message, callback.Target, callback.Method, parameterType)
+ End Sub
+
+ '''
+ ''' Notifies all registered parties that a message is being broadcasted.
+ '''
+ ''' The message to broadcast.
+ Public Sub NotifyColleagues(ByVal message As String)
+
+ If String.IsNullOrEmpty(message) Then
+ Throw New ArgumentException("'message' cannot be null or empty.")
+ End If
+
+ Dim actions = _messageToActionsMap.GetActions(message)
+
+ If actions IsNot Nothing Then
+ actions.ForEach(Function(action) action.DynamicInvoke())
+ End If
+
+ End Sub
+
+ '''
+ ''' Notifies all registered parties that a message is being broadcasted.
+ '''
+ ''' The message to broadcast
+ ''' The parameter to pass together with the message
+ Public Sub NotifyColleagues(ByVal message As String, ByVal parameter As Object)
+
+ If String.IsNullOrEmpty(message) Then
+ Throw New ArgumentException("'message' cannot be null or empty.")
+ End If
+
+ Dim actions = _messageToActionsMap.GetActions(message)
+
+ If actions IsNot Nothing Then
+ actions.ForEach(Function(action) action.DynamicInvoke(parameter))
+ End If
+
+ End Sub
+
+ '''
+ ''' This class is an implementation detail of the Messenger class.
+ '''
+ Private Class MessageToActionsMap
+ ' Stores a hash where the key is the message and the value is the list of callbacks to invoke.
+ ReadOnly _map As New Dictionary(Of String, List(Of WeakAction))()
+
+ Friend Sub New()
+ End Sub
+
+ '''
+ ''' Adds an action to the list.
+ '''
+ ''' The message to register.
+ ''' The target object to invoke, or null.
+ ''' The method to invoke.
+ ''' The type of the Action delegate.
+ Friend Sub AddAction(ByVal message As String, ByVal target As Object, ByVal method As MethodInfo, ByVal actionType As Type)
+
+ If message Is Nothing Then
+ Throw New ArgumentNullException("message")
+ End If
+
+ If method Is Nothing Then
+ Throw New ArgumentNullException("method")
+ End If
+
+ SyncLock _map
+
+ If Not _map.ContainsKey(message) Then
+ _map(message) = New List(Of WeakAction)()
+ End If
+
+ _map(message).Add(New WeakAction(target, method, actionType))
+ End SyncLock
+ End Sub
+
+ '''
+ ''' Gets the list of actions to be invoked for the specified message
+ '''
+ ''' The message to get the actions for
+ ''' Returns a list of actions that are registered to the specified message
+ Friend Function GetActions(ByVal message As String) As List(Of [Delegate])
+
+ If message Is Nothing Then
+ Throw New ArgumentNullException("message")
+ End If
+
+ Dim actions As List(Of [Delegate])
+ SyncLock _map
+
+ If Not _map.ContainsKey(message) Then
+ Return Nothing
+ End If
+
+ Dim weakActions As List(Of WeakAction) = _map(message)
+ actions = New List(Of [Delegate])(weakActions.Count)
+
+ For i As Integer = weakActions.Count - 1 To -1 + 1 Step -1
+
+ Dim weakAction As WeakAction = weakActions(i)
+
+ If weakAction Is Nothing Then
+ Continue For
+ End If
+
+ Dim action As [Delegate] = weakAction.CreateAction()
+
+ If action IsNot Nothing Then
+ actions.Add(action)
+
+ Else
+ ' The target object is dead, so get rid of the weak action.
+ weakActions.Remove(weakAction)
+ End If
+
+ Next
+
+ ' Delete the list from the map if it is now empty.
+ If weakActions.Count = 0 Then
+ _map.Remove(message)
+ End If
+
+ End SyncLock
+ Return actions
+ End Function
+
+ End Class
+
+ '''
+ ''' This class is an implementation detail of the MessageToActionsMap class.
+ '''
+ Private Class WeakAction
+ ReadOnly _delegateType As Type
+ ReadOnly _method As MethodInfo
+ ReadOnly _targetRef As WeakReference
+
+ '''
+ ''' Constructs a WeakAction.
+ '''
+ ''' The object on which the target method is invoked, or null if the method is static.
+ ''' The MethodInfo used to create the Action.
+ ''' The type of parameter to be passed to the action. Pass null if there is no parameter.
+ Friend Sub New(ByVal target As Object, ByVal method As MethodInfo, ByVal parameterType As Type)
+
+ If target Is Nothing Then
+ _targetRef = Nothing
+
+ Else
+ _targetRef = New WeakReference(target)
+ End If
+
+ _method = method
+
+ If parameterType Is Nothing Then
+ _delegateType = GetType(Action)
+
+ Else
+ _delegateType = GetType(Action(Of )).MakeGenericType(parameterType)
+ End If
+
+ End Sub
+
+ '''
+ ''' Creates a "throw away" delegate to invoke the method on the target, or null if the target object is dead.
+ '''
+ Friend Function CreateAction() As [Delegate]
+
+ ' Rehydrate into a real Action object, so that the method can be invoked.
+ If _targetRef Is Nothing Then
+ Return [Delegate].CreateDelegate(_delegateType, _method)
+
+ Else
+
+ Try
+
+ Dim target As Object = _targetRef.Target
+
+ If target IsNot Nothing Then
+ Return [Delegate].CreateDelegate(_delegateType, target, _method)
+ End If
+
+ Catch
+ End Try
+
+ End If
+
+ Return Nothing
+ End Function
+
+ End Class
+
+ ReadOnly _messageToActionsMap As New MessageToActionsMap()
+
+End Class
\ No newline at end of file
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
new file mode 100644
index 0000000..89c27b7
--- /dev/null
+++ b/My Project/AssemblyInfo.vb
@@ -0,0 +1,59 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+Imports System.Globalization
+Imports System.Resources
+Imports System.Windows
+
+' General Information about an assembly is controlled through the following
+' set of attributes. Change these attribute values to modify the information
+' associated with an assembly.
+
+' Review the values of the assembly attributes
+
+
+
+
+
+
+
+
+
+'In order to begin building localizable applications, set
+'CultureYouAreCodingWith in your .vbproj file
+'inside a . For example, if you are using US english
+'in your source files, set the to "en-US". Then uncomment the
+'NeutralResourceLanguage attribute below. Update the "en-US" in the line
+'below to match the UICulture setting in the project file.
+
+'
+
+
+'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
+'1st parameter: where theme specific resource dictionaries are located
+'(used if a resource is not found in the page,
+' or application resource dictionaries)
+
+'2nd parameter: where the generic resource dictionary is located
+'(used if a resource is not found in the page,
+'app, and any theme specific resource dictionaries)
+
+
+
+
+'The following GUID is for the ID of the typelib if this project is exposed to COM
+
+
+' Version information for an assembly consists of the following four values:
+'
+' Major Version
+' Minor Version
+' Build Number
+' Revision
+'
+' You can specify all the values or you can default the Build and Revision Numbers
+' by using the '*' as shown below:
+'
+
+
+
diff --git a/My Project/MyExtensions/MyWpfExtension.vb b/My Project/MyExtensions/MyWpfExtension.vb
new file mode 100644
index 0000000..2f5639e
--- /dev/null
+++ b/My Project/MyExtensions/MyWpfExtension.vb
@@ -0,0 +1,121 @@
+#If _MyType <> "Empty" Then
+
+Namespace My
+ '''
+ ''' Module used to define the properties that are available in the My Namespace for WPF
+ '''
+ '''
+ _
+ Module MyWpfExtension
+ Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer)
+ Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User)
+ Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows)
+ Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log)
+ '''
+ ''' Returns the application object for the running application
+ '''
+ _
+ Friend ReadOnly Property Application() As Application
+ Get
+ Return CType(Global.System.Windows.Application.Current, Application)
+ End Get
+ End Property
+ '''
+ ''' Returns information about the host computer.
+ '''
+ _
+ Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer
+ Get
+ Return s_Computer.GetInstance()
+ End Get
+ End Property
+ '''
+ ''' Returns information for the current user. If you wish to run the application with the current
+ ''' Windows user credentials, call My.User.InitializeWithWindowsUser().
+ '''
+ _
+ Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User
+ Get
+ Return s_User.GetInstance()
+ End Get
+ End Property
+ '''
+ ''' Returns the application log. The listeners can be configured by the application's configuration file.
+ '''
+ _
+ Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log
+ Get
+ Return s_Log.GetInstance()
+ End Get
+ End Property
+
+ '''
+ ''' Returns the collection of Windows defined in the project.
+ '''
+ _
+ Friend ReadOnly Property Windows() As MyWindows
+ _
+ Get
+ Return s_Windows.GetInstance()
+ End Get
+ End Property
+ _
+ _
+ Friend NotInheritable Class MyWindows
+ _
+ Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T
+ If Instance Is Nothing Then
+ If s_WindowBeingCreated IsNot Nothing Then
+ If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then
+ Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.")
+ End If
+ Else
+ s_WindowBeingCreated = New Global.System.Collections.Hashtable()
+ End If
+ s_WindowBeingCreated.Add(GetType(T), Nothing)
+ Return New T()
+ s_WindowBeingCreated.Remove(GetType(T))
+ Else
+ Return Instance
+ End If
+ End Function
+ _
+ _
+ Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T)
+ instance = Nothing
+ End Sub
+ _
+ _
+ Public Sub New()
+ MyBase.New()
+ End Sub
+ Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable
+ Public Overrides Function Equals(ByVal o As Object) As Boolean
+ Return MyBase.Equals(o)
+ End Function
+ Public Overrides Function GetHashCode() As Integer
+ Return MyBase.GetHashCode
+ End Function
+ _
+ _
+ Friend Overloads Function [GetType]() As Global.System.Type
+ Return GetType(MyWindows)
+ End Function
+ Public Overrides Function ToString() As String
+ Return MyBase.ToString
+ End Function
+ End Class
+ End Module
+End Namespace
+Partial Class Application
+ Inherits Global.System.Windows.Application
+ _
+ _
+ Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo
+ _
+ Get
+ Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly())
+ End Get
+ End Property
+End Class
+#End If
\ No newline at end of file
diff --git a/My Project/Resources.Designer.vb b/My Project/Resources.Designer.vb
new file mode 100644
index 0000000..82312b8
--- /dev/null
+++ b/My Project/Resources.Designer.vb
@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.34209
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+
+ 'This class was auto-generated by the StronglyTypedResourceBuilder
+ 'class via a tool like ResGen or Visual Studio.
+ 'To add or remove a member, edit your .ResX file then rerun ResGen
+ 'with the /str option, or rebuild your VS project.
+ '''
+ ''' A strongly-typed resource class, for looking up localized strings, etc.
+ '''
+ _
+ Friend Module Resources
+
+ Private resourceMan As Global.System.Resources.ResourceManager
+
+ Private resourceCulture As Global.System.Globalization.CultureInfo
+
+ '''
+ ''' Returns the cached ResourceManager instance used by this class.
+ '''
+ _
+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+ Get
+ If Object.ReferenceEquals(resourceMan, Nothing) Then
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("EgtCAM5.Resources", GetType(Resources).Assembly)
+ resourceMan = temp
+ End If
+ Return resourceMan
+ End Get
+ End Property
+
+ '''
+ ''' Overrides the current thread's CurrentUICulture property for all
+ ''' resource lookups using this strongly typed resource class.
+ '''
+ _
+ Friend Property Culture() As Global.System.Globalization.CultureInfo
+ Get
+ Return resourceCulture
+ End Get
+ Set
+ resourceCulture = value
+ End Set
+ End Property
+ End Module
+End Namespace
diff --git a/My Project/Resources.resx b/My Project/Resources.resx
new file mode 100644
index 0000000..ffecec8
--- /dev/null
+++ b/My Project/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/My Project/Settings.Designer.vb b/My Project/Settings.Designer.vb
new file mode 100644
index 0000000..ff32405
--- /dev/null
+++ b/My Project/Settings.Designer.vb
@@ -0,0 +1,71 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.34209
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+
+ _
+Partial Friend NotInheritable Class MySettings
+ Inherits Global.System.Configuration.ApplicationSettingsBase
+
+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+
+#Region "My.Settings Auto-Save Functionality"
+#If _MyType = "WindowsForms" Then
+ Private Shared addedHandler As Boolean
+
+ Private Shared addedHandlerLockObject As New Object
+
+ _
+ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
+ If My.Application.SaveMySettingsOnExit Then
+ My.Settings.Save()
+ End If
+ End Sub
+#End If
+#End Region
+
+ Public Shared ReadOnly Property [Default]() As MySettings
+ Get
+
+#If _MyType = "WindowsForms" Then
+ If Not addedHandler Then
+ SyncLock addedHandlerLockObject
+ If Not addedHandler Then
+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+ addedHandler = True
+ End If
+ End SyncLock
+ End If
+#End If
+ Return defaultInstance
+ End Get
+ End Property
+End Class
+
+Namespace My
+
+ _
+ Friend Module MySettingsProperty
+
+ _
+ Friend ReadOnly Property Settings() As Global.EgtCAM5.MySettings
+ Get
+ Return Global.EgtCAM5.MySettings.Default
+ End Get
+ End Property
+ End Module
+End Namespace
diff --git a/My Project/Settings.settings b/My Project/Settings.settings
new file mode 100644
index 0000000..2b428d2
--- /dev/null
+++ b/My Project/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProjectPage/DrawPanel/DrawPanelView.xaml b/ProjectPage/DrawPanel/DrawPanelView.xaml
new file mode 100644
index 0000000..5d51a24
--- /dev/null
+++ b/ProjectPage/DrawPanel/DrawPanelView.xaml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml.vb b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml.vb
new file mode 100644
index 0000000..b774417
--- /dev/null
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderView.xaml.vb
@@ -0,0 +1,3 @@
+Public Class InputExpanderView
+
+End Class
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
new file mode 100644
index 0000000..b572c85
--- /dev/null
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderViewModel.vb
@@ -0,0 +1,7 @@
+Namespace EgtCAM5
+
+ Public Class InputExpanderViewModel
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
new file mode 100644
index 0000000..f085313
--- /dev/null
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml.vb b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml.vb
new file mode 100644
index 0000000..5aacc44
--- /dev/null
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml.vb
@@ -0,0 +1,3 @@
+Public Class ManageLayerExpanderView
+
+End Class
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
new file mode 100644
index 0000000..51f25ef
--- /dev/null
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
@@ -0,0 +1,7 @@
+Namespace EgtCAM5
+
+ Public Class ManageLayerExpanderViewModel
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/ProjectPage/ProjectView.xaml b/ProjectPage/ProjectView.xaml
new file mode 100644
index 0000000..ea38875
--- /dev/null
+++ b/ProjectPage/ProjectView.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/ProjectPage/ProjectView.xaml.vb b/ProjectPage/ProjectView.xaml.vb
new file mode 100644
index 0000000..80bd19a
--- /dev/null
+++ b/ProjectPage/ProjectView.xaml.vb
@@ -0,0 +1,12 @@
+Imports EgtUILib
+
+Public Class ProjectView
+
+ Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs)
+ ' Inizializzo la scena
+ 'If Not ProjectScene.Init() Then
+ ' EgtOutLog("Errore nella creazione della scena")
+ 'End If
+ End Sub
+
+End Class
diff --git a/ProjectPage/ProjectViewModel.vb b/ProjectPage/ProjectViewModel.vb
new file mode 100644
index 0000000..5230a67
--- /dev/null
+++ b/ProjectPage/ProjectViewModel.vb
@@ -0,0 +1,605 @@
+Imports System.Windows.Forms.Integration
+Imports System.IO
+Imports EgtUILib
+
+Namespace EgtCAM5
+
+ Public Class ProjectViewModel
+ Inherits TabViewModel
+
+#Region "FIELDS"
+
+ 'PROJECT PAGE'S PANELS
+ Private m_GridViewPanel As BaseWindowView
+ Private m_DrawPanel As BaseWindowView
+ Private m_DrawOptionPanel As BaseWindowView
+
+ 'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
+ ' Reference to the ProjectScene
+ Private WithEvents m_ProjectScene As New Scene
+ ' Reference to the ProjectSceneHost
+ Private SceneHost As WindowsFormsHost
+ ' Property used to bind the scene to the WindowsFormsHost in XAML
+ Private m_bfirst As Boolean = True
+ Public ReadOnly Property ProjectSceneHost As WindowsFormsHost
+ Get
+ If m_bfirst Then
+ SceneHost = New WindowsFormsHost() With {.Child = m_ProjectScene}
+ If Not m_ProjectScene.Init() Then
+ EgtOutLog("Error in Project scene creation")
+ ' Chiudo il programma
+ Application.Msn.NotifyColleagues(Application.CLOSEAPPLICATION)
+ End If
+ IniFile.m_ProjectSceneContext = m_ProjectScene.GetCtx
+ ' inizializzo gestore lavorazioni
+ EgtInitMachMgr(IniFile.m_sMachinesRoot)
+ EgtOpenFile("c:\EgtData\Varie\Temp\Fiera02.Nge")
+ EgtZoom(ZM.ALL)
+ m_bfirst = False
+ End If
+ Return SceneHost
+ End Get
+ End Property
+ ' Scene controller
+ Private WithEvents m_Controller As New Controller
+
+#End Region
+
+#Region "EGTUILIB FIELDS"
+
+ Private m_bScriptRunning As Boolean = False
+
+ ' Variabile per implementazione eventi
+ Private m_InputText As String
+#End Region
+
+#Region "CONSTRUCTOR"
+
+ Sub New()
+ Me.sTabName = EgtMsg(MSG_MAINWINDOW + 1)
+ m_GridViewPanel = New BaseWindowView
+ m_GridViewPanel.DataContext = New GridViewPanelViewModel
+ m_GridViewPanel.Show()
+ m_DrawPanel = New BaseWindowView
+ m_DrawPanel.DataContext = New DrawPanelViewModel
+ m_DrawPanel.Show()
+ m_DrawOptionPanel = New BaseWindowView
+ m_DrawOptionPanel.DataContext = New DrawOptionPanelViewModel
+ m_DrawOptionPanel.Show()
+ ManagePanelVisibility()
+ RegisterDrawPanelCommands()
+ 'Impostazioni Controller
+ m_Controller.SetScene(m_ProjectScene)
+ 'Dim bLuaReg As Boolean = (GetPrivateProfileInt(S_GENERAL, K_COMMANDLOG, 0, m_sIniFile) <> 0)
+ 'Dim sCmdLogFile As String = CMDLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+ 'If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
+ ' EgtOutLog("Command log not started")
+ ' 'If My.Application.CommandLineArgs.Count() = 0 Then
+ ' ' MessageBox.Show("Command log not started", "TestEIn Warning",
+ ' ' MessageBoxButtons.OK, MessageBoxIcon.Warning)
+ ' 'End If
+ 'End If
+
+
+ ' MESSAGGI PER IL CONTROLLER
+ Application.Msn.Register(Application.NOTIFYINPUTTEXT, Sub(sInputText As String)
+ m_InputText = sInputText
+ End Sub)
+
+ End Sub
+
+#End Region
+
+#Region "METHODS"
+
+ '''
+ ''' Method that manage the visibility of the ProjectPage's Panels
+ '''
+ Sub ManagePanelVisibility()
+ Application.Msn.Register(Application.PROJECTPAGE_SELECTED, Sub()
+ m_GridViewPanel.Visibility = Visibility.Visible
+ m_DrawPanel.Visibility = Visibility.Visible
+ m_DrawOptionPanel.Visibility = Visibility.Visible
+ End Sub)
+ Application.Msn.Register(Application.PROJECTPAGE_DESELECTED, Sub()
+ m_GridViewPanel.Visibility = Visibility.Hidden
+ m_DrawPanel.Visibility = Visibility.Hidden
+ m_DrawOptionPanel.Visibility = Visibility.Hidden
+ End Sub)
+
+ End Sub
+
+ '''
+ ''' Method that manage the visibility of the ProjectPage's Panels
+ '''
+ Sub RegisterDrawPanelCommands()
+ Application.Msn.Register(Application.WIREFRAME, Sub()
+ m_ProjectScene.WireFrame()
+ End Sub)
+ Application.Msn.Register(Application.HIDDENLINE, Sub()
+ m_ProjectScene.HiddenLine()
+ End Sub)
+ Application.Msn.Register(Application.SHADING, Sub()
+ m_ProjectScene.Shading()
+ End Sub)
+ Application.Msn.Register(Application.ZOOMALL, Sub()
+ m_ProjectScene.ZoomAll()
+ End Sub)
+ Application.Msn.Register(Application.ZOOMIN, Sub()
+ m_ProjectScene.ZoomIn()
+ End Sub)
+ Application.Msn.Register(Application.ZOOMOUT, Sub()
+ m_ProjectScene.ZoomOut()
+ End Sub)
+ Application.Msn.Register(Application.TOPVIEW, Sub()
+ m_ProjectScene.TopView()
+ End Sub)
+ Application.Msn.Register(Application.FRONTVIEW, Sub()
+ m_ProjectScene.FrontView()
+ End Sub)
+ Application.Msn.Register(Application.LEFTVIEW, Sub()
+ m_ProjectScene.LeftView()
+ End Sub)
+ Application.Msn.Register(Application.BACKVIEW, Sub()
+ m_ProjectScene.BackView()
+ End Sub)
+ Application.Msn.Register(Application.RIGHTVIEW, Sub()
+ m_ProjectScene.RightView()
+ End Sub)
+ Application.Msn.Register(Application.ISOVIEWSW, Sub()
+ m_ProjectScene.IsoViewSW()
+ End Sub)
+ Application.Msn.Register(Application.ISOVIEWSE, Sub()
+ m_ProjectScene.IsoViewSE()
+ End Sub)
+ Application.Msn.Register(Application.ISOVIEWNE, Sub()
+ m_ProjectScene.IsoViewNE()
+ End Sub)
+ Application.Msn.Register(Application.ISOVIEWNW, Sub()
+ m_ProjectScene.IsoViewNW()
+ End Sub)
+ Application.Msn.Register(Application.CURVEDIR, Sub()
+
+ End Sub)
+ Application.Msn.Register(Application.ANALYZE, Sub()
+
+ End Sub)
+ Application.Msn.Register(Application.GETDIST, Sub()
+
+ End Sub)
+ Application.Msn.Register(Application.CPLANETOP, Sub()
+ m_Controller.SetLastInteger(Controller.GRID_TYPE.TOP)
+ m_Controller.ExecuteCommand(Controller.CMD.GRID)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEFRONT, Sub()
+ m_Controller.SetLastInteger(Controller.GRID_TYPE.FRONT)
+ m_Controller.ExecuteCommand(Controller.CMD.GRID)
+ End Sub)
+ Application.Msn.Register(Application.CPLANERIGHT, Sub()
+ m_Controller.SetLastInteger(Controller.GRID_TYPE.RIGHT)
+ m_Controller.ExecuteCommand(Controller.CMD.GRID)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEBACK, Sub()
+ m_Controller.SetLastInteger(Controller.GRID_TYPE.BACK)
+ m_Controller.ExecuteCommand(Controller.CMD.GRID)
+ End Sub)
+ Application.Msn.Register(Application.CPLANELEFT, Sub()
+ m_Controller.SetLastInteger(Controller.GRID_TYPE.LEFT)
+ m_Controller.ExecuteCommand(Controller.CMD.GRID)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEBOTTOM, Sub()
+ m_Controller.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
+ m_Controller.ExecuteCommand(Controller.CMD.GRID)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEVIEW, Sub()
+ m_Controller.SetLastInteger(Controller.GRID_TYPE.VIEW)
+ m_Controller.ExecuteCommand(Controller.CMD.GRID)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEELEVATION, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEORIGIN, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEROTATE, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.GRID_ROTATE)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.CPLANE3P, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.GRID_3P)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEPERPOBJ, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
+ End Sub)
+ Application.Msn.Register(Application.CPLANEOBJ, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.GRID_OBJ)
+ End Sub)
+ Application.Msn.Register(Application.POINT, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
+ m_Controller.ExecuteCommand(Controller.CMD.FRAME)
+ ElseIf (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.VECTOR)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.POINT)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.LINE2P, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
+ m_Controller.SetContinue()
+ 'EmitStripStatusOutput(EgtMsg(399)) ' Continue : 'L' with line, 'A' with arc
+ End If
+ m_Controller.ExecuteCommand(Controller.CMD.LINE2P)
+ End Sub)
+ Application.Msn.Register(Application.LINEPDL, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.LINEPDL)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.LINEPVL)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.CIRCLE, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.CIRCLECP)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.CIRCLECD)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.ARCCSE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.ARCCSE)
+ End Sub)
+ Application.Msn.Register(Application.ARC3P, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.ARC3P)
+ End Sub)
+ Application.Msn.Register(Application.ARCPDP, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
+ m_Controller.SetContinue()
+ 'EmitStripStatusOutput(EgtMsg(399)) ' Continue : 'L' with line, 'A' with arc
+ End If
+ m_Controller.ExecuteCommand(Controller.CMD.ARCPDP)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.ARCPVP)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.FILLET, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.FILLET)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.CHAMFER)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.RECTANGLE2P, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.RECTANGLE2P)
+ End Sub)
+ Application.Msn.Register(Application.POLYGON, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.POLYGON)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.POLYGONSIDE)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.TEXT, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.TEXT)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.TEXTPLUS)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.PLANE, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.REGION)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.PLANE)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.EXTRUDE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.EXTRUDE)
+ End Sub)
+ Application.Msn.Register(Application.REVOLVE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.REVOLVE)
+ End Sub)
+ Application.Msn.Register(Application.SCREW, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.SCREW)
+ End Sub)
+ Application.Msn.Register(Application.RULED, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.RULED)
+ End Sub)
+ Application.Msn.Register(Application.MERGESURF, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.MERGESURF)
+ End Sub)
+ Application.Msn.Register(Application.EXPLODESURF, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.EXPLODESURF)
+ End Sub)
+ Application.Msn.Register(Application.INVERTSURF, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.INVERTSURF)
+ End Sub)
+ Application.Msn.Register(Application.DELETE, Sub()
+ m_Controller.SetLastInteger(GDB_ID.SEL)
+ m_Controller.ExecuteCommand(Controller.CMD.DELETE)
+ End Sub)
+ Application.Msn.Register(Application.CHANGELAYER, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.CHANGELAYER)
+ End Sub)
+ Application.Msn.Register(Application.CHANGECOLOR, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
+ m_Controller.ExecuteCommand(Controller.CMD.CHANGEALPHA)
+ ElseIf (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.RESETCOLOR)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.CHANGECOLOR)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.INVERTCURVE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.INVERTCURVE)
+ End Sub)
+ Application.Msn.Register(Application.CHANGESTARTCURVE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.CHANGESTARTCURVE)
+ End Sub)
+ Application.Msn.Register(Application.EXTENDCURVE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.TRIMEXTENDCURVE)
+ End Sub)
+ Application.Msn.Register(Application.BREAKCURVE, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.BREAKCURVE)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.SPLITCURVE)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.JOINCURVE, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.SetLastBoolean(False)
+ Else
+ m_Controller.SetLastBoolean(True)
+ End If
+ m_Controller.ExecuteCommand(Controller.CMD.JOINCURVE)
+ End Sub)
+ Application.Msn.Register(Application.EXPLODECURVE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.EXPLODECURVE)
+ End Sub)
+ Application.Msn.Register(Application.SETCURVETH, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.SETCURVETHICKNESS)
+ End Sub)
+ Application.Msn.Register(Application.MOVE, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.MOVE)
+ End Sub)
+ Application.Msn.Register(Application.ROTATE, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.ROTATE)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.ROTATE3D)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.MIRROR, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.MIRROR)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.MIRROR3D)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.SCALE, Sub()
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ m_Controller.ExecuteCommand(Controller.CMD.SCALE)
+ Else
+ m_Controller.ExecuteCommand(Controller.CMD.SCALE3D)
+ End If
+ End Sub)
+ Application.Msn.Register(Application.OFFSET, Sub()
+ m_Controller.ExecuteCommand(Controller.CMD.OFFSET)
+ End Sub)
+
+ End Sub
+
+#End Region
+
+#Region "SCENE EVENTS"
+
+ Private Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String) Handles m_ProjectScene.OnCursorPos
+ Application.Msn.NotifyColleagues(Application.NOTIFYCURRPOSCHANGED, sCursorPos)
+ End Sub
+
+ Private Sub OnMouseSelectedAll(ByVal sender As Object) Handles m_ProjectScene.OnMouseSelectedAll
+ m_Controller.MouseSelectedAll()
+ End Sub
+
+ Private Sub OnMouseDeselectedAll(ByVal sender As Object) Handles m_ProjectScene.OnMouseDeselectedAll
+ m_Controller.MouseDeselectedAll()
+ End Sub
+
+ Private Sub OnMouseSelectedObj(ByVal sender As Object, ByVal nId As Integer, ByVal bLast As Boolean) Handles m_ProjectScene.OnMouseSelectedObj
+ m_Controller.MouseSelectedObj(nId, bLast)
+ End Sub
+
+ Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPart
+ m_Controller.MouseSelectedPart(nId)
+ End Sub
+
+ Private Sub OnMouseSelectedLayer(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedLayer
+ m_Controller.MouseSelectedLayer(nId)
+ End Sub
+
+ Private Sub OnMouseSelectedPath(ByVal sender As Object, ByVal nId As Integer, ByVal bHaltOnFork As Boolean) Handles m_ProjectScene.OnMouseSelectedPath
+ m_Controller.MouseSelectedPath(nId, bHaltOnFork)
+ End Sub
+
+ Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer) Handles m_ProjectScene.OnMousePointFromSelection
+ m_Controller.SetPointFromSelection(nId, PtP, nAux)
+ End Sub
+
+ Private Sub OnMouseDone(ByVal sender As Object) Handles m_ProjectScene.OnMouseDone
+ m_Controller.Done(m_InputText)
+ End Sub
+
+ Private Sub OnMouseSelectedPoint(ByVal sender As Object, ByVal PtP As Point3d, ByVal nSep As SEP, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPoint
+ Dim bDone As Boolean = (Keyboard.Modifiers And ModifierKeys.Control) <> ModifierKeys.Control
+ m_Controller.MouseSelectedPoint(PtP, nSep, nId, bDone)
+ End Sub
+
+ Private Sub OnMouseSelectedDir(ByVal sender As Object, ByVal VtDir As Vector3d) Handles m_ProjectScene.OnMouseSelectedDir
+ m_Controller.SetLastVector3d(VtDir)
+ End Sub
+
+ Private Sub OnMouseMoveSelPoint(ByVal sender As Object, ByVal PtP As Point3d) Handles m_ProjectScene.OnMouseMoveSelPoint
+ m_Controller.MouseMoveInSelectionPoint(PtP)
+ End Sub
+
+ ' Private Sub OnMouseAnalyzed(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseAnalyzed
+ ' UpdateObjInObjTree(nId)
+ ' SelectIdInObjTree(nId)
+ ' End Sub
+
+ Private Sub OnShowDistance(ByVal sender As Object, ByVal sDistance As String) Handles m_ProjectScene.OnShowDistance
+ Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, sDistance)
+ End Sub
+
+#End Region
+
+#Region "CONTROLLER EVENTS"
+
+ Private Sub OnNewProject(ByVal sender As Object, ByVal bOk As Boolean) Handles m_Controller.OnNewProject
+ If Not bOk Then
+ MessageBox.Show(EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
+ End If
+ End Sub
+
+ ' Private Sub OnOpeningProject(ByVal sender As Object) Handles m_Controller.OnOpeningProject
+ ' ClearObjTree()
+ ' End Sub
+
+ Private Sub OnOpenProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnOpenProject
+ WritePrivateProfileString(S_GENERAL, K_LASTNGEDIR, Path.GetDirectoryName(sFile))
+ 'If bOk Then
+ ' m_MruFiles.Add(sFile)
+ 'Else
+ ' m_MruFiles.Remove(sFile)
+ ' Dim sMsg As String = EgtMsg(10003) & " '" & sFile & "'" 'Error opening file
+ ' MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
+ 'End If
+ End Sub
+
+ Private Sub OnSavingProject(ByVal sender As Object) Handles m_Controller.OnSavingProject
+ End Sub
+
+ Private Sub OnSavedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnSavedProject
+ WritePrivateProfileString(S_GENERAL, K_LASTNGEDIR, Path.GetDirectoryName(sFile))
+ 'If bOk Then
+ ' m_MruFiles.Add(sFile)
+ 'Else
+ ' m_MruFiles.Remove(sFile)
+ ' Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
+ ' MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButtons.OK, MessageBoxIcon.Error) ' Error
+ 'End If
+ End Sub
+
+ Private Sub OnSavingObject(ByVal sender As Object) Handles m_Controller.OnSavingObject
+ End Sub
+
+ Private Sub OnSavedObject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnSavedObject
+ WritePrivateProfileString(S_GENERAL, K_LASTNGEOBJDIR, Path.GetDirectoryName(sFile))
+ 'If bOk Then
+ ' m_MruFiles.Add(sFile)
+ 'Else
+ ' m_MruFiles.Remove(sFile)
+ ' Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
+ ' MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButtons.OK, MessageBoxIcon.Error) ' Error
+ 'End If
+ End Sub
+
+ Private Sub OnImportingProject(ByVal sender As Object, ByVal bOkType As Boolean) Handles m_Controller.OnImportingProject
+ If bOkType Then
+ 'ClearObjTree()
+ Else
+ MessageBox.Show(EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
+ End If
+ End Sub
+
+ Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnImportedProject
+ WritePrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile))
+ If Not bOk Then
+ Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
+ MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
+ End If
+ End Sub
+
+ Private Sub OnExportingProject(ByVal sender As Object) Handles m_Controller.OnExportingProject
+ End Sub
+
+ Private Sub OnExportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnExportedProject
+ WritePrivateProfileString(S_GENERAL, K_LASTEXPDIR, Path.GetDirectoryName(sFile))
+ If Not bOk Then
+ Dim sMsg As String = EgtMsg(10007) & " '" & sFile & "'" 'Error exporting file
+ MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
+ End If
+ End Sub
+
+ Private Sub OnExecutingScript(ByVal sender As Object) Handles m_Controller.OnExecutingScript
+ 'ClearObjTree()
+ 'Abilito progress e bottone stop
+ Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSPROGRESS, 0)
+ Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSSTOP_ISENABLED, True)
+ ' Dichiaro script in esecuzione
+ m_bScriptRunning = True
+ End Sub
+
+ Private Sub OnExecutedScript(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean, ByVal sError As String) Handles m_Controller.OnExecutedScript
+ ' Salvo path dello script in lista recenti
+ WritePrivateProfileString(S_GENERAL, K_LASTLUADIR, Path.GetDirectoryName(sFile))
+ 'If bOk Then
+ ' m_MruScripts.Add(sFile)
+ 'Else
+ ' m_MruScripts.Remove(sFile)
+ ' MessageBox.Show(sError, EgtMsg(10001), MessageBoxButtons.OK, MessageBoxIcon.Error) ' Error
+ 'End If
+ ' Disabilito progress e bottone stop
+ Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSPROGRESS, 0)
+ Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSSTOP_ISENABLED, False)
+ '' Dichiaro terminata esecuzione script
+ m_bScriptRunning = False
+ End Sub
+
+ Private Sub OnPrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByVal sCheckLabel As String,
+ ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean) Handles m_Controller.PrepareInputBox
+ 'PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn)
+ End Sub
+
+ ' Private Sub OnSetInputBoxText(ByVal sText As String) Handles m_Controller.SetInputBoxText
+ ' SetInputBoxText(sText)
+ ' End Sub
+
+ ' Private Sub OnSetInputBoxCheck(ByVal bCheck As Boolean) Handles m_Controller.SetInputBoxCheck
+ ' SetInputBoxCheck(bCheck)
+ ' End Sub
+
+ ' Private Sub OnAddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) Handles m_Controller.AddInputBoxCombo
+ ' AddInputBoxCombo(sText, bSelected)
+ ' End Sub
+
+ ' Private Sub OnUpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean) Handles m_Controller.UpdateUI
+ ' ' pulisco input e relativi messaggi
+ ' ResetInputBox()
+ ' If m_Controller.GetContinue() Then
+ ' EmitStripStatusOutput(EgtMsg(399)) ' Continue : 'L' with line, 'A' with arc
+ ' Else
+ ' EmitStripStatusOutput("")
+ ' End If
+ ' ' aggiorno dati correnti
+ ' EmitTitle()
+ ' EmitCurrPartLayer()
+ ' If bReloadUI Then
+ ' LoadObjTree()
+ ' Else
+ ' UpdateObjTree()
+ ' End If
+ ' End Sub
+
+ ' Private Sub OutputInfo(ByVal sender As Object, ByVal sText As String) Handles m_Controller.OutputInfo
+ ' EmitStripStatusOutput(sText)
+ ' End Sub
+
+#End Region
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/Resources/DrawPanel/Arc3P.png b/Resources/DrawPanel/Arc3P.png
new file mode 100644
index 0000000..1df2af4
Binary files /dev/null and b/Resources/DrawPanel/Arc3P.png differ
diff --git a/Resources/DrawPanel/ArcCSE.png b/Resources/DrawPanel/ArcCSE.png
new file mode 100644
index 0000000..64e2aee
Binary files /dev/null and b/Resources/DrawPanel/ArcCSE.png differ
diff --git a/Resources/DrawPanel/ArcPDP.png b/Resources/DrawPanel/ArcPDP.png
new file mode 100644
index 0000000..75735e6
Binary files /dev/null and b/Resources/DrawPanel/ArcPDP.png differ
diff --git a/Resources/DrawPanel/BreakCurve.png b/Resources/DrawPanel/BreakCurve.png
new file mode 100644
index 0000000..183d4a2
Binary files /dev/null and b/Resources/DrawPanel/BreakCurve.png differ
diff --git a/Resources/DrawPanel/ChangeColor.png b/Resources/DrawPanel/ChangeColor.png
new file mode 100644
index 0000000..3497b6b
Binary files /dev/null and b/Resources/DrawPanel/ChangeColor.png differ
diff --git a/Resources/DrawPanel/ChangeLayer.png b/Resources/DrawPanel/ChangeLayer.png
new file mode 100644
index 0000000..cb06885
Binary files /dev/null and b/Resources/DrawPanel/ChangeLayer.png differ
diff --git a/Resources/DrawPanel/ChangeStart.png b/Resources/DrawPanel/ChangeStart.png
new file mode 100644
index 0000000..1321300
Binary files /dev/null and b/Resources/DrawPanel/ChangeStart.png differ
diff --git a/Resources/DrawPanel/Circle.png b/Resources/DrawPanel/Circle.png
new file mode 100644
index 0000000..0d3c0d2
Binary files /dev/null and b/Resources/DrawPanel/Circle.png differ
diff --git a/Resources/DrawPanel/Delete.png b/Resources/DrawPanel/Delete.png
new file mode 100644
index 0000000..b90063f
Binary files /dev/null and b/Resources/DrawPanel/Delete.png differ
diff --git a/Resources/DrawPanel/ExplodeCurve.png b/Resources/DrawPanel/ExplodeCurve.png
new file mode 100644
index 0000000..be9e1c7
Binary files /dev/null and b/Resources/DrawPanel/ExplodeCurve.png differ
diff --git a/Resources/DrawPanel/ExplodeSurf.png b/Resources/DrawPanel/ExplodeSurf.png
new file mode 100644
index 0000000..4fa84f0
Binary files /dev/null and b/Resources/DrawPanel/ExplodeSurf.png differ
diff --git a/Resources/DrawPanel/ExtendCurve.png b/Resources/DrawPanel/ExtendCurve.png
new file mode 100644
index 0000000..cbf8d91
Binary files /dev/null and b/Resources/DrawPanel/ExtendCurve.png differ
diff --git a/Resources/DrawPanel/Extrude.png b/Resources/DrawPanel/Extrude.png
new file mode 100644
index 0000000..1b245f2
Binary files /dev/null and b/Resources/DrawPanel/Extrude.png differ
diff --git a/Resources/DrawPanel/Fillet.png b/Resources/DrawPanel/Fillet.png
new file mode 100644
index 0000000..b40c377
Binary files /dev/null and b/Resources/DrawPanel/Fillet.png differ
diff --git a/Resources/DrawPanel/InvertCurve.png b/Resources/DrawPanel/InvertCurve.png
new file mode 100644
index 0000000..e10899d
Binary files /dev/null and b/Resources/DrawPanel/InvertCurve.png differ
diff --git a/Resources/DrawPanel/InvertSurf.png b/Resources/DrawPanel/InvertSurf.png
new file mode 100644
index 0000000..4471d6e
Binary files /dev/null and b/Resources/DrawPanel/InvertSurf.png differ
diff --git a/Resources/DrawPanel/JoinCurve.png b/Resources/DrawPanel/JoinCurve.png
new file mode 100644
index 0000000..2e4e4d7
Binary files /dev/null and b/Resources/DrawPanel/JoinCurve.png differ
diff --git a/Resources/DrawPanel/Line2P.png b/Resources/DrawPanel/Line2P.png
new file mode 100644
index 0000000..2690838
Binary files /dev/null and b/Resources/DrawPanel/Line2P.png differ
diff --git a/Resources/DrawPanel/LinePDL.png b/Resources/DrawPanel/LinePDL.png
new file mode 100644
index 0000000..043fe98
Binary files /dev/null and b/Resources/DrawPanel/LinePDL.png differ
diff --git a/Resources/DrawPanel/MergeSurf.png b/Resources/DrawPanel/MergeSurf.png
new file mode 100644
index 0000000..f3f6ed3
Binary files /dev/null and b/Resources/DrawPanel/MergeSurf.png differ
diff --git a/Resources/DrawPanel/Mirror.png b/Resources/DrawPanel/Mirror.png
new file mode 100644
index 0000000..c8edab7
Binary files /dev/null and b/Resources/DrawPanel/Mirror.png differ
diff --git a/Resources/DrawPanel/Move.png b/Resources/DrawPanel/Move.png
new file mode 100644
index 0000000..78ab3a2
Binary files /dev/null and b/Resources/DrawPanel/Move.png differ
diff --git a/Resources/DrawPanel/Offset.png b/Resources/DrawPanel/Offset.png
new file mode 100644
index 0000000..34afc2a
Binary files /dev/null and b/Resources/DrawPanel/Offset.png differ
diff --git a/Resources/DrawPanel/Plane.png b/Resources/DrawPanel/Plane.png
new file mode 100644
index 0000000..bb85fcb
Binary files /dev/null and b/Resources/DrawPanel/Plane.png differ
diff --git a/Resources/DrawPanel/Point.png b/Resources/DrawPanel/Point.png
new file mode 100644
index 0000000..5a43bfe
Binary files /dev/null and b/Resources/DrawPanel/Point.png differ
diff --git a/Resources/DrawPanel/Polygon.png b/Resources/DrawPanel/Polygon.png
new file mode 100644
index 0000000..fe09e3a
Binary files /dev/null and b/Resources/DrawPanel/Polygon.png differ
diff --git a/Resources/DrawPanel/Rectangle2P.png b/Resources/DrawPanel/Rectangle2P.png
new file mode 100644
index 0000000..51bb0a7
Binary files /dev/null and b/Resources/DrawPanel/Rectangle2P.png differ
diff --git a/Resources/DrawPanel/Revolve.png b/Resources/DrawPanel/Revolve.png
new file mode 100644
index 0000000..821795f
Binary files /dev/null and b/Resources/DrawPanel/Revolve.png differ
diff --git a/Resources/DrawPanel/Rotate.png b/Resources/DrawPanel/Rotate.png
new file mode 100644
index 0000000..ec86735
Binary files /dev/null and b/Resources/DrawPanel/Rotate.png differ
diff --git a/Resources/DrawPanel/Ruled.png b/Resources/DrawPanel/Ruled.png
new file mode 100644
index 0000000..25aa70c
Binary files /dev/null and b/Resources/DrawPanel/Ruled.png differ
diff --git a/Resources/DrawPanel/Scale.png b/Resources/DrawPanel/Scale.png
new file mode 100644
index 0000000..ab5f447
Binary files /dev/null and b/Resources/DrawPanel/Scale.png differ
diff --git a/Resources/DrawPanel/Screw.png b/Resources/DrawPanel/Screw.png
new file mode 100644
index 0000000..f9d5227
Binary files /dev/null and b/Resources/DrawPanel/Screw.png differ
diff --git a/Resources/DrawPanel/Text.png b/Resources/DrawPanel/Text.png
new file mode 100644
index 0000000..c7af3e0
Binary files /dev/null and b/Resources/DrawPanel/Text.png differ
diff --git a/Resources/DrawPanel/ThickCurve.png b/Resources/DrawPanel/ThickCurve.png
new file mode 100644
index 0000000..03ac50c
Binary files /dev/null and b/Resources/DrawPanel/ThickCurve.png differ
diff --git a/Resources/GridViewPanel/Analyze.png b/Resources/GridViewPanel/Analyze.png
new file mode 100644
index 0000000..e322f1d
Binary files /dev/null and b/Resources/GridViewPanel/Analyze.png differ
diff --git a/Resources/GridViewPanel/Cplane3POINTS.png b/Resources/GridViewPanel/Cplane3POINTS.png
new file mode 100644
index 0000000..71f0b59
Binary files /dev/null and b/Resources/GridViewPanel/Cplane3POINTS.png differ
diff --git a/Resources/GridViewPanel/CplaneBACK.png b/Resources/GridViewPanel/CplaneBACK.png
new file mode 100644
index 0000000..ce01e8f
Binary files /dev/null and b/Resources/GridViewPanel/CplaneBACK.png differ
diff --git a/Resources/GridViewPanel/CplaneBOTTOM.png b/Resources/GridViewPanel/CplaneBOTTOM.png
new file mode 100644
index 0000000..ea0f75d
Binary files /dev/null and b/Resources/GridViewPanel/CplaneBOTTOM.png differ
diff --git a/Resources/GridViewPanel/CplaneELEVATION.png b/Resources/GridViewPanel/CplaneELEVATION.png
new file mode 100644
index 0000000..d6f309a
Binary files /dev/null and b/Resources/GridViewPanel/CplaneELEVATION.png differ
diff --git a/Resources/GridViewPanel/CplaneFRONT.png b/Resources/GridViewPanel/CplaneFRONT.png
new file mode 100644
index 0000000..ff80dd6
Binary files /dev/null and b/Resources/GridViewPanel/CplaneFRONT.png differ
diff --git a/Resources/GridViewPanel/CplaneLEFT.png b/Resources/GridViewPanel/CplaneLEFT.png
new file mode 100644
index 0000000..3d69e7d
Binary files /dev/null and b/Resources/GridViewPanel/CplaneLEFT.png differ
diff --git a/Resources/GridViewPanel/CplaneOBJECT.png b/Resources/GridViewPanel/CplaneOBJECT.png
new file mode 100644
index 0000000..bca8d05
Binary files /dev/null and b/Resources/GridViewPanel/CplaneOBJECT.png differ
diff --git a/Resources/GridViewPanel/CplaneORIGIN.png b/Resources/GridViewPanel/CplaneORIGIN.png
new file mode 100644
index 0000000..d406718
Binary files /dev/null and b/Resources/GridViewPanel/CplaneORIGIN.png differ
diff --git a/Resources/GridViewPanel/CplanePERPCURVE.png b/Resources/GridViewPanel/CplanePERPCURVE.png
new file mode 100644
index 0000000..636423a
Binary files /dev/null and b/Resources/GridViewPanel/CplanePERPCURVE.png differ
diff --git a/Resources/GridViewPanel/CplaneRIGHT.png b/Resources/GridViewPanel/CplaneRIGHT.png
new file mode 100644
index 0000000..39c93bf
Binary files /dev/null and b/Resources/GridViewPanel/CplaneRIGHT.png differ
diff --git a/Resources/GridViewPanel/CplaneROTATE.png b/Resources/GridViewPanel/CplaneROTATE.png
new file mode 100644
index 0000000..fd62b08
Binary files /dev/null and b/Resources/GridViewPanel/CplaneROTATE.png differ
diff --git a/Resources/GridViewPanel/CplaneTOP.png b/Resources/GridViewPanel/CplaneTOP.png
new file mode 100644
index 0000000..3e0b243
Binary files /dev/null and b/Resources/GridViewPanel/CplaneTOP.png differ
diff --git a/Resources/GridViewPanel/CplaneView.png b/Resources/GridViewPanel/CplaneView.png
new file mode 100644
index 0000000..eebf88f
Binary files /dev/null and b/Resources/GridViewPanel/CplaneView.png differ
diff --git a/Resources/GridViewPanel/CurveDir.png b/Resources/GridViewPanel/CurveDir.png
new file mode 100644
index 0000000..f7e12b5
Binary files /dev/null and b/Resources/GridViewPanel/CurveDir.png differ
diff --git a/Resources/GridViewPanel/GetDist.png b/Resources/GridViewPanel/GetDist.png
new file mode 100644
index 0000000..520e406
Binary files /dev/null and b/Resources/GridViewPanel/GetDist.png differ
diff --git a/Resources/GridViewPanel/LookFromBACK.png b/Resources/GridViewPanel/LookFromBACK.png
new file mode 100644
index 0000000..629ea9c
Binary files /dev/null and b/Resources/GridViewPanel/LookFromBACK.png differ
diff --git a/Resources/GridViewPanel/LookFromBOTTOM.png b/Resources/GridViewPanel/LookFromBOTTOM.png
new file mode 100644
index 0000000..6a48b64
Binary files /dev/null and b/Resources/GridViewPanel/LookFromBOTTOM.png differ
diff --git a/Resources/GridViewPanel/LookFromFRONT.png b/Resources/GridViewPanel/LookFromFRONT.png
new file mode 100644
index 0000000..08abc99
Binary files /dev/null and b/Resources/GridViewPanel/LookFromFRONT.png differ
diff --git a/Resources/GridViewPanel/LookFromGrid.png b/Resources/GridViewPanel/LookFromGrid.png
new file mode 100644
index 0000000..afe0f68
Binary files /dev/null and b/Resources/GridViewPanel/LookFromGrid.png differ
diff --git a/Resources/GridViewPanel/LookFromISO_NE.png b/Resources/GridViewPanel/LookFromISO_NE.png
new file mode 100644
index 0000000..e0c71ba
Binary files /dev/null and b/Resources/GridViewPanel/LookFromISO_NE.png differ
diff --git a/Resources/GridViewPanel/LookFromISO_NW.png b/Resources/GridViewPanel/LookFromISO_NW.png
new file mode 100644
index 0000000..203e290
Binary files /dev/null and b/Resources/GridViewPanel/LookFromISO_NW.png differ
diff --git a/Resources/GridViewPanel/LookFromISO_SE.png b/Resources/GridViewPanel/LookFromISO_SE.png
new file mode 100644
index 0000000..2891088
Binary files /dev/null and b/Resources/GridViewPanel/LookFromISO_SE.png differ
diff --git a/Resources/GridViewPanel/LookFromISO_SO.png b/Resources/GridViewPanel/LookFromISO_SO.png
new file mode 100644
index 0000000..909e25e
Binary files /dev/null and b/Resources/GridViewPanel/LookFromISO_SO.png differ
diff --git a/Resources/GridViewPanel/LookFromISO_SW.png b/Resources/GridViewPanel/LookFromISO_SW.png
new file mode 100644
index 0000000..b905e27
Binary files /dev/null and b/Resources/GridViewPanel/LookFromISO_SW.png differ
diff --git a/Resources/GridViewPanel/LookFromLEFT.png b/Resources/GridViewPanel/LookFromLEFT.png
new file mode 100644
index 0000000..d4a4e85
Binary files /dev/null and b/Resources/GridViewPanel/LookFromLEFT.png differ
diff --git a/Resources/GridViewPanel/LookFromRIGHT.png b/Resources/GridViewPanel/LookFromRIGHT.png
new file mode 100644
index 0000000..f182c1a
Binary files /dev/null and b/Resources/GridViewPanel/LookFromRIGHT.png differ
diff --git a/Resources/GridViewPanel/LookFromTOP.png b/Resources/GridViewPanel/LookFromTOP.png
new file mode 100644
index 0000000..214358d
Binary files /dev/null and b/Resources/GridViewPanel/LookFromTOP.png differ
diff --git a/Resources/GridViewPanel/LookToCplane.png b/Resources/GridViewPanel/LookToCplane.png
new file mode 100644
index 0000000..a154497
Binary files /dev/null and b/Resources/GridViewPanel/LookToCplane.png differ
diff --git a/Resources/GridViewPanel/RenderingHL.png b/Resources/GridViewPanel/RenderingHL.png
new file mode 100644
index 0000000..8aa5a3a
Binary files /dev/null and b/Resources/GridViewPanel/RenderingHL.png differ
diff --git a/Resources/GridViewPanel/RenderingSH.png b/Resources/GridViewPanel/RenderingSH.png
new file mode 100644
index 0000000..0c6690d
Binary files /dev/null and b/Resources/GridViewPanel/RenderingSH.png differ
diff --git a/Resources/GridViewPanel/RenderingWF.png b/Resources/GridViewPanel/RenderingWF.png
new file mode 100644
index 0000000..1f2de62
Binary files /dev/null and b/Resources/GridViewPanel/RenderingWF.png differ
diff --git a/Resources/GridViewPanel/ZoomAll.png b/Resources/GridViewPanel/ZoomAll.png
new file mode 100644
index 0000000..e1a27d1
Binary files /dev/null and b/Resources/GridViewPanel/ZoomAll.png differ
diff --git a/Resources/GridViewPanel/ZoomIn.png b/Resources/GridViewPanel/ZoomIn.png
new file mode 100644
index 0000000..b370a3e
Binary files /dev/null and b/Resources/GridViewPanel/ZoomIn.png differ
diff --git a/Resources/GridViewPanel/ZoomOut.png b/Resources/GridViewPanel/ZoomOut.png
new file mode 100644
index 0000000..187a1a0
Binary files /dev/null and b/Resources/GridViewPanel/ZoomOut.png differ
diff --git a/Resources/TreeView/Folder.png b/Resources/TreeView/Folder.png
new file mode 100644
index 0000000..2c1339d
Binary files /dev/null and b/Resources/TreeView/Folder.png differ
diff --git a/SharedFieldsClass.vb b/SharedFieldsClass.vb
new file mode 100644
index 0000000..c7313a4
--- /dev/null
+++ b/SharedFieldsClass.vb
@@ -0,0 +1,607 @@
+Module SharedFieldsClass
+
+ ' Array che contiene il valore della proprietà visibility per ogni campo dell'utensile
+ Friend Drill_Std(26) As Visibility
+ Friend Drill_Long(26) As Visibility
+ Friend Saw_Std(26) As Visibility
+ Friend Saw_Flat(26) As Visibility
+ Friend Mill_Std(26) As Visibility
+ Friend Mill_NoTip(26) As Visibility
+ Friend Mortise_Std(26) As Visibility
+ Friend Compo(26) As Visibility
+
+ ' Array che contiene il valore della proprietà visibility per ogni campo della lavorazione
+ Friend Milling(49) As Visibility
+ Friend Drilling(49) As Visibility
+ Friend Sawing(49) As Visibility
+ Friend Pocketing(49) As Visibility
+ Friend Mortising(49) As Visibility
+ Friend Sawroughing(49) As Visibility
+ Friend Sawfinishing(49) As Visibility
+
+ Sub New()
+ ' Parametri drill standard
+ Drill_Std(0) = Visibility.Visible ' Corrector
+ Drill_Std(1) = Visibility.Visible ' ExitPar
+ Drill_Std(2) = Visibility.Visible ' Type
+ Drill_Std(3) = Visibility.Hidden ' Coolant
+ Drill_Std(4) = Visibility.Hidden ' CornRad
+ Drill_Std(5) = Visibility.Visible ' Diam
+ Drill_Std(6) = Visibility.Visible ' TotDiam
+ Drill_Std(7) = Visibility.Visible ' Feed
+ Drill_Std(8) = Visibility.Visible ' EndFeed
+ Drill_Std(9) = Visibility.Visible ' StartFeed
+ Drill_Std(10) = Visibility.Visible ' TipFeed
+ Drill_Std(11) = Visibility.Visible ' Len
+ Drill_Std(12) = Visibility.Visible ' TotLen
+ Drill_Std(13) = Visibility.Visible ' MaxMat
+ Drill_Std(14) = Visibility.Visible ' LonOffset
+ Drill_Std(15) = Visibility.Visible ' RadOffset
+ Drill_Std(16) = Visibility.Visible ' Speed
+ Drill_Std(17) = Visibility.Hidden ' SideAng
+ Drill_Std(18) = Visibility.Visible ' MaxSpeed
+ Drill_Std(19) = Visibility.Hidden ' Thick
+ Drill_Std(20) = Visibility.Hidden ' MaxAbsorption
+ Drill_Std(21) = Visibility.Hidden ' MinFeed
+ Drill_Std(22) = Visibility.Visible ' Draw
+ Drill_Std(23) = Visibility.Visible ' Head
+ Drill_Std(24) = Visibility.Visible ' NamePar
+ Drill_Std(25) = Visibility.Visible ' UserNotes
+ Drill_Std(26) = Visibility.Visible ' TcPOs
+ ' Parametri drill long
+ Drill_Long(0) = Visibility.Visible ' Corrector
+ Drill_Long(1) = Visibility.Visible ' ExitPar
+ Drill_Long(2) = Visibility.Visible ' Type
+ Drill_Long(3) = Visibility.Hidden ' Coolant
+ Drill_Long(4) = Visibility.Hidden ' CornRad
+ Drill_Long(5) = Visibility.Visible ' Diam
+ Drill_Long(6) = Visibility.Visible ' TotDiam
+ Drill_Long(7) = Visibility.Visible ' Feed
+ Drill_Long(8) = Visibility.Visible ' EndFeed
+ Drill_Long(9) = Visibility.Visible ' StartFeed
+ Drill_Long(10) = Visibility.Visible ' TipFeed
+ Drill_Long(11) = Visibility.Visible ' Len
+ Drill_Long(12) = Visibility.Visible ' TotLen
+ Drill_Long(13) = Visibility.Visible ' MaxMat
+ Drill_Long(14) = Visibility.Visible ' LonOffset
+ Drill_Long(15) = Visibility.Visible ' RadOffset
+ Drill_Long(16) = Visibility.Visible ' Speed
+ Drill_Long(17) = Visibility.Hidden ' SideAng
+ Drill_Long(18) = Visibility.Visible ' MaxSpeed
+ Drill_Long(19) = Visibility.Hidden ' Thick
+ Drill_Long(20) = Visibility.Hidden ' MaxAbsorption
+ Drill_Long(21) = Visibility.Hidden ' MinFeed
+ Drill_Long(22) = Visibility.Visible ' Draw
+ Drill_Long(23) = Visibility.Visible ' Head
+ Drill_Long(24) = Visibility.Visible ' NamePar
+ Drill_Long(25) = Visibility.Visible ' UserNotes
+ Drill_Long(26) = Visibility.Visible ' TcPOs
+ 'Parametri Saw Standard
+ Saw_Std(0) = Visibility.Visible ' Corrector
+ Saw_Std(1) = Visibility.Visible ' ExitPar
+ Saw_Std(2) = Visibility.Visible ' Type
+ Saw_Std(3) = Visibility.Hidden ' Coolant
+ Saw_Std(4) = Visibility.Hidden ' CornRad
+ Saw_Std(5) = Visibility.Visible ' Diam
+ Saw_Std(6) = Visibility.Visible ' TotDiam
+ Saw_Std(7) = Visibility.Visible ' Feed
+ Saw_Std(8) = Visibility.Visible ' EndFeed
+ Saw_Std(9) = Visibility.Visible ' StartFeed
+ Saw_Std(10) = Visibility.Visible ' TipFeed
+ Saw_Std(11) = Visibility.Visible ' Len
+ Saw_Std(12) = Visibility.Visible ' TotLen
+ Saw_Std(13) = Visibility.Visible ' MaxMat
+ Saw_Std(14) = Visibility.Visible ' LonOffset
+ Saw_Std(15) = Visibility.Visible ' RadOffset
+ Saw_Std(16) = Visibility.Visible ' Speed
+ Saw_Std(17) = Visibility.Hidden ' SideAng
+ Saw_Std(18) = Visibility.Visible ' MaxSpeed
+ Saw_Std(19) = Visibility.Visible ' Thick
+ Saw_Std(20) = Visibility.Hidden ' MaxAbsorption
+ Saw_Std(21) = Visibility.Hidden ' MinFeed
+ Saw_Std(22) = Visibility.Visible ' Draw
+ Saw_Std(23) = Visibility.Visible ' Head
+ Saw_Std(24) = Visibility.Visible ' NamePar
+ Saw_Std(25) = Visibility.Visible ' UserNotes
+ Saw_Std(26) = Visibility.Visible ' TcPOs
+ 'Parametri Saw Flat
+ Saw_Flat(0) = Visibility.Visible ' Corrector
+ Saw_Flat(1) = Visibility.Visible ' ExitPar
+ Saw_Flat(2) = Visibility.Visible ' Type
+ Saw_Flat(3) = Visibility.Hidden ' Coolant
+ Saw_Flat(4) = Visibility.Hidden ' CornRad
+ Saw_Flat(5) = Visibility.Visible ' Diam
+ Saw_Flat(6) = Visibility.Visible ' TotDiam
+ Saw_Flat(7) = Visibility.Visible ' Feed
+ Saw_Flat(8) = Visibility.Visible ' EndFeed
+ Saw_Flat(9) = Visibility.Visible ' StartFeed
+ Saw_Flat(10) = Visibility.Visible ' TipFeed
+ Saw_Flat(11) = Visibility.Visible ' Len
+ Saw_Flat(12) = Visibility.Visible ' TotLen
+ Saw_Flat(13) = Visibility.Visible ' MaxMat
+ Saw_Flat(14) = Visibility.Visible ' LonOffset
+ Saw_Flat(15) = Visibility.Visible ' RadOffset
+ Saw_Flat(16) = Visibility.Visible ' Speed
+ Saw_Flat(17) = Visibility.Hidden ' SideAng
+ Saw_Flat(18) = Visibility.Visible ' MaxSpeed
+ Saw_Flat(19) = Visibility.Visible ' Thick
+ Saw_Flat(20) = Visibility.Hidden ' MaxAbsorption
+ Saw_Flat(21) = Visibility.Hidden ' MinFeed
+ Saw_Flat(22) = Visibility.Visible ' Draw
+ Saw_Flat(23) = Visibility.Visible ' Head
+ Saw_Flat(24) = Visibility.Visible ' NamePar
+ Saw_Flat(25) = Visibility.Visible ' UserNotes
+ Saw_Flat(26) = Visibility.Visible ' TcPOs
+ 'Parametri Mill standard
+ Mill_Std(0) = Visibility.Visible ' Corrector
+ Mill_Std(1) = Visibility.Visible ' ExitPar
+ Mill_Std(2) = Visibility.Visible ' Type
+ Mill_Std(3) = Visibility.Hidden ' Coolant
+ Mill_Std(4) = Visibility.Visible ' CornRad
+ Mill_Std(5) = Visibility.Visible ' Diam
+ Mill_Std(6) = Visibility.Visible ' TotDiam
+ Mill_Std(7) = Visibility.Visible ' Feed
+ Mill_Std(8) = Visibility.Visible ' EndFeed
+ Mill_Std(9) = Visibility.Visible ' StartFeed
+ Mill_Std(10) = Visibility.Visible ' TipFeed
+ Mill_Std(11) = Visibility.Visible ' Len
+ Mill_Std(12) = Visibility.Visible ' TotLen
+ Mill_Std(13) = Visibility.Visible ' MaxMat
+ Mill_Std(14) = Visibility.Visible ' LonOffset
+ Mill_Std(15) = Visibility.Visible ' RadOffset
+ Mill_Std(16) = Visibility.Visible ' Speed
+ Mill_Std(17) = Visibility.Visible ' SideAng
+ Mill_Std(18) = Visibility.Visible ' MaxSpeed
+ Mill_Std(19) = Visibility.Hidden ' Thick
+ Mill_Std(20) = Visibility.Hidden ' MaxAbsorption
+ Mill_Std(21) = Visibility.Hidden ' MinFeed
+ Mill_Std(22) = Visibility.Visible ' Draw
+ Mill_Std(23) = Visibility.Visible ' Head
+ Mill_Std(24) = Visibility.Visible ' NamePar
+ Mill_Std(25) = Visibility.Visible ' UserNotes
+ Mill_Std(26) = Visibility.Visible ' TcPOs
+ 'Parametri Mill NoTip
+ Mill_NoTip(0) = Visibility.Visible ' Corrector
+ Mill_NoTip(1) = Visibility.Visible ' ExitPar
+ Mill_NoTip(2) = Visibility.Visible ' Type
+ Mill_NoTip(3) = Visibility.Hidden ' Coolant
+ Mill_NoTip(4) = Visibility.Visible ' CornRad
+ Mill_NoTip(5) = Visibility.Visible ' Diam
+ Mill_NoTip(6) = Visibility.Visible ' TotDiam
+ Mill_NoTip(7) = Visibility.Visible ' Feed
+ Mill_NoTip(8) = Visibility.Visible ' EndFeed
+ Mill_NoTip(9) = Visibility.Visible ' StartFeed
+ Mill_NoTip(10) = Visibility.Visible ' TipFeed
+ Mill_NoTip(11) = Visibility.Visible ' Len
+ Mill_NoTip(12) = Visibility.Visible ' TotLen
+ Mill_NoTip(13) = Visibility.Visible ' MaxMat
+ Mill_NoTip(14) = Visibility.Visible ' LonOffset
+ Mill_NoTip(15) = Visibility.Visible ' RadOffset
+ Mill_NoTip(16) = Visibility.Visible ' Speed
+ Mill_NoTip(17) = Visibility.Visible ' SideAng
+ Mill_NoTip(18) = Visibility.Visible ' MaxSpeed
+ Mill_NoTip(19) = Visibility.Hidden ' Thick
+ Mill_NoTip(20) = Visibility.Hidden ' MaxAbsorption
+ Mill_NoTip(21) = Visibility.Hidden ' MinFeed
+ Mill_NoTip(22) = Visibility.Visible ' Draw
+ Mill_NoTip(23) = Visibility.Visible ' Head
+ Mill_NoTip(24) = Visibility.Visible ' NamePar
+ Mill_NoTip(25) = Visibility.Visible ' UserNotes
+ Mill_NoTip(26) = Visibility.Visible ' TcPOs
+ 'Parametri Mortise Standard
+ Mortise_Std(0) = Visibility.Hidden ' Corrector
+ Mortise_Std(1) = Visibility.Visible ' ExitPar
+ Mortise_Std(2) = Visibility.Visible ' Type
+ Mortise_Std(3) = Visibility.Hidden ' Coolant
+ Mortise_Std(4) = Visibility.Visible ' CornRad
+ Mortise_Std(5) = Visibility.Visible ' Diam
+ Mortise_Std(6) = Visibility.Visible ' TotDiam
+ Mortise_Std(7) = Visibility.Visible ' Feed
+ Mortise_Std(8) = Visibility.Visible ' EndFeed
+ Mortise_Std(9) = Visibility.Visible ' StartFeed
+ Mortise_Std(10) = Visibility.Visible ' TipFeed
+ Mortise_Std(11) = Visibility.Visible ' Len
+ Mortise_Std(12) = Visibility.Visible ' TotLen
+ Mortise_Std(13) = Visibility.Visible ' MaxMat
+ Mortise_Std(14) = Visibility.Visible ' LonOffset
+ Mortise_Std(15) = Visibility.Visible ' RadOffset
+ Mortise_Std(16) = Visibility.Visible ' Speed
+ Mortise_Std(17) = Visibility.Hidden ' SideAng
+ Mortise_Std(18) = Visibility.Visible ' MaxSpeed
+ Mortise_Std(19) = Visibility.Visible ' Thick
+ Mortise_Std(20) = Visibility.Hidden ' MaxAbsorption
+ Mortise_Std(21) = Visibility.Hidden ' MinFeed
+ Mortise_Std(22) = Visibility.Visible ' Draw
+ Mortise_Std(23) = Visibility.Visible ' Head
+ Mortise_Std(24) = Visibility.Visible ' NamePar
+ Mortise_Std(25) = Visibility.Visible ' UserNotes
+ Mortise_Std(26) = Visibility.Visible ' TcPOs
+ 'Parametri Compo
+ Compo(0) = Visibility.Hidden ' Corrector
+ Compo(1) = Visibility.Visible ' ExitPar
+ Compo(2) = Visibility.Visible ' Type
+ Compo(3) = Visibility.Hidden ' Coolant
+ Compo(4) = Visibility.Hidden ' CornRad
+ Compo(5) = Visibility.Visible ' Diam
+ Compo(6) = Visibility.Visible ' TotDiam
+ Compo(7) = Visibility.Visible ' Feed
+ Compo(8) = Visibility.Visible ' EndFeed
+ Compo(9) = Visibility.Visible ' StartFeed
+ Compo(10) = Visibility.Visible ' TipFeed
+ Compo(11) = Visibility.Visible ' Len
+ Compo(12) = Visibility.Visible ' TotLen
+ Compo(13) = Visibility.Visible ' MaxMat
+ Compo(14) = Visibility.Visible ' LonOffset
+ Compo(15) = Visibility.Visible ' RadOffset
+ Compo(16) = Visibility.Visible ' Speed
+ Compo(17) = Visibility.Hidden ' SideAng
+ Compo(18) = Visibility.Visible ' MaxSpeed
+ Compo(19) = Visibility.Hidden ' Thick
+ Compo(20) = Visibility.Hidden ' MaxAbsorption
+ Compo(21) = Visibility.Hidden ' MinFeed
+ Compo(22) = Visibility.Visible ' Draw
+ Compo(23) = Visibility.Visible ' Head
+ Compo(24) = Visibility.Visible ' NamePar
+ Compo(25) = Visibility.Visible ' UserNotes
+ Compo(26) = Visibility.Visible ' TcPOs
+ ' Parametri Milling
+ Milling(0) = Visibility.Visible ' Invert
+ Milling(1) = Visibility.Visible ' LeaveTab
+ Milling(2) = Visibility.Visible ' Type
+ Milling(3) = Visibility.Visible ' WorkSide
+ Milling(4) = Visibility.Visible ' HeadSide
+ Milling(5) = Visibility.Visible ' LeadInType
+ Milling(6) = Visibility.Visible ' ExtLinkType
+ Milling(7) = Visibility.Visible ' LeadOutType
+ Milling(8) = Visibility.Visible ' CurveUse
+ Milling(9) = Visibility.Visible ' StepType
+ Milling(10) = Visibility.Visible ' LeadLinkType
+ Milling(11) = Visibility.Visible ' Speed
+ Milling(12) = Visibility.Visible ' Feed
+ Milling(13) = Visibility.Visible ' StartFeed
+ Milling(14) = Visibility.Visible ' EndFeed
+ Milling(15) = Visibility.Visible ' TipFeed
+ Milling(16) = Visibility.Visible ' OffSr
+ Milling(17) = Visibility.Visible ' OffSl
+ Milling(18) = Visibility.Visible ' SideAngle
+ Milling(19) = Visibility.Visible ' Approx
+ Milling(20) = Visibility.Visible ' StartPos
+ Milling(21) = Visibility.Hidden ' StartSlowLen
+ Milling(22) = Visibility.Visible ' EndSlowLen
+ Milling(23) = Visibility.Hidden ' ThroughAddlen
+ Milling(24) = Visibility.Visible ' StepPar
+ Milling(25) = Visibility.Visible ' ReturnPos
+ Milling(26) = Visibility.Visible ' TabLen
+ Milling(27) = Visibility.Visible ' TabDist
+ Milling(28) = Visibility.Visible ' TabHeight
+ Milling(29) = Visibility.Visible ' TabAngle
+ Milling(30) = Visibility.Visible ' LiTang
+ Milling(31) = Visibility.Visible ' LiPerp
+ Milling(32) = Visibility.Visible ' LiElev
+ Milling(33) = Visibility.Visible ' LiCompLen
+ Milling(34) = Visibility.Visible ' LoTang
+ Milling(35) = Visibility.Visible ' LoPerp
+ Milling(36) = Visibility.Visible ' LoElev
+ Milling(37) = Visibility.Visible ' LoCompLen
+ Milling(38) = Visibility.Visible ' StartAddLen
+ Milling(39) = Visibility.Visible ' EndAddLen
+ Milling(40) = Visibility.Visible ' StepExtArc
+ Milling(41) = Visibility.Visible ' StepIntArc
+ Milling(42) = Visibility.Visible ' SideStep
+ Milling(43) = Visibility.Visible ' VertFeed
+ Milling(44) = Visibility.Visible ' NamePar
+ Milling(45) = Visibility.Visible ' Tool
+ Milling(46) = Visibility.Visible ' DepthStr
+ Milling(47) = Visibility.Visible ' UserNotes
+ Milling(48) = Visibility.Visible ' OverLapStr
+ Milling(49) = Visibility.Hidden ' OffsetStr
+ ' Parametri Drilling
+ Drilling(0) = Visibility.Visible ' Invert
+ Drilling(1) = Visibility.Hidden ' LeaveTab
+ Drilling(2) = Visibility.Visible ' Type
+ Drilling(3) = Visibility.Hidden ' WorkSide
+ Drilling(4) = Visibility.Visible ' HeadSide
+ Drilling(5) = Visibility.Visible ' LeadInType
+ Drilling(6) = Visibility.Visible ' ExtLinkType
+ Drilling(7) = Visibility.Hidden ' LeadOutType
+ Drilling(8) = Visibility.Visible ' CurveUse
+ Drilling(9) = Visibility.Visible ' StepType
+ Drilling(10) = Visibility.Visible ' LeadLinkType
+ Drilling(11) = Visibility.Visible ' Speed
+ Drilling(12) = Visibility.Visible ' Feed
+ Drilling(13) = Visibility.Visible ' StartFeed
+ Drilling(14) = Visibility.Visible ' EndFeed
+ Drilling(15) = Visibility.Visible ' TipFeed
+ Drilling(16) = Visibility.Hidden ' OffSr
+ Drilling(17) = Visibility.Hidden ' OffSl
+ Drilling(18) = Visibility.Hidden ' SideAngle
+ Drilling(19) = Visibility.Visible ' Approx
+ Drilling(20) = Visibility.Visible ' StartPos
+ Drilling(21) = Visibility.Hidden ' StartSlowLen
+ Drilling(22) = Visibility.Visible ' EndSlowLen
+ Drilling(23) = Visibility.Hidden ' ThroughAddlen
+ Drilling(24) = Visibility.Visible ' StepPar
+ Drilling(25) = Visibility.Visible ' ReturnPos
+ Drilling(26) = Visibility.Hidden ' TabLen
+ Drilling(27) = Visibility.Hidden ' TabDist
+ Drilling(28) = Visibility.Hidden ' TabHeight
+ Drilling(29) = Visibility.Hidden ' TabAngle
+ Drilling(30) = Visibility.Hidden ' LiTang
+ Drilling(31) = Visibility.Hidden ' LiPerp
+ Drilling(32) = Visibility.Hidden ' LiElev
+ Drilling(33) = Visibility.Hidden ' LiCompLen
+ Drilling(34) = Visibility.Hidden ' LoTang
+ Drilling(35) = Visibility.Hidden ' LoPerp
+ Drilling(36) = Visibility.Hidden ' LoElev
+ Drilling(37) = Visibility.Hidden ' LoCompLen
+ Drilling(38) = Visibility.Hidden ' StartAddLen
+ Drilling(39) = Visibility.Hidden ' EndAddLen
+ Drilling(40) = Visibility.Visible ' StepExtArc
+ Drilling(41) = Visibility.Visible ' StepIntArc
+ Drilling(42) = Visibility.Visible ' SideStep
+ Drilling(43) = Visibility.Visible ' VertFeed
+ Drilling(44) = Visibility.Visible ' NamePar
+ Drilling(45) = Visibility.Visible ' Tool
+ Drilling(46) = Visibility.Visible ' DepthStr
+ Drilling(47) = Visibility.Visible ' UserNotes
+ Drilling(48) = Visibility.Hidden ' OverLapStr
+ Drilling(49) = Visibility.Visible ' OffsetStr
+ ' Parametri Sawing
+ Sawing(0) = Visibility.Visible ' Invert
+ Sawing(1) = Visibility.Visible ' LeaveTab
+ Sawing(2) = Visibility.Visible ' Type
+ Sawing(3) = Visibility.Visible ' WorkSide
+ Sawing(4) = Visibility.Visible ' HeadSide
+ Sawing(5) = Visibility.Visible ' LeadInType
+ Sawing(6) = Visibility.Visible ' ExtLinkType
+ Sawing(7) = Visibility.Visible ' LeadOutType
+ Sawing(8) = Visibility.Visible ' CurveUse
+ Sawing(9) = Visibility.Visible ' StepType
+ Sawing(10) = Visibility.Hidden ' LeadLinkType
+ Sawing(11) = Visibility.Visible ' Speed
+ Sawing(12) = Visibility.Visible ' Feed
+ Sawing(13) = Visibility.Visible ' StartFeed
+ Sawing(14) = Visibility.Visible ' EndFeed
+ Sawing(15) = Visibility.Visible ' TipFeed
+ Sawing(16) = Visibility.Visible ' OffSr
+ Sawing(17) = Visibility.Visible ' OffSl
+ Sawing(18) = Visibility.Visible ' SideAngle
+ Sawing(19) = Visibility.Visible ' Approx
+ Sawing(20) = Visibility.Visible ' StartPos
+ Sawing(21) = Visibility.Hidden ' StartSlowLen
+ Sawing(22) = Visibility.Visible ' EndSlowLen
+ Sawing(23) = Visibility.Hidden ' ThroughAddlen
+ Sawing(24) = Visibility.Visible ' StepPar
+ Sawing(25) = Visibility.Visible ' ReturnPos
+ Sawing(26) = Visibility.Hidden ' TabLen
+ Sawing(27) = Visibility.Hidden ' TabDist
+ Sawing(28) = Visibility.Hidden ' TabHeight
+ Sawing(29) = Visibility.Hidden ' TabAngle
+ Sawing(30) = Visibility.Visible ' LiTang
+ Sawing(31) = Visibility.Visible ' LiPerp
+ Sawing(32) = Visibility.Visible ' LiElev
+ Sawing(33) = Visibility.Visible ' LiCompLen
+ Sawing(34) = Visibility.Visible ' LoTang
+ Sawing(35) = Visibility.Visible ' LoPerp
+ Sawing(36) = Visibility.Visible ' LoElev
+ Sawing(37) = Visibility.Visible ' LoCompLen
+ Sawing(38) = Visibility.Visible ' StartAddLen
+ Sawing(39) = Visibility.Visible ' EndAddLen
+ Sawing(40) = Visibility.Visible ' StepExtArc
+ Sawing(41) = Visibility.Visible ' StepIntArc
+ Sawing(42) = Visibility.Visible ' SideStep
+ Sawing(43) = Visibility.Visible ' VertFeed
+ Sawing(44) = Visibility.Visible ' NamePar
+ Sawing(45) = Visibility.Visible ' Tool
+ Sawing(46) = Visibility.Visible ' DepthStr
+ Sawing(47) = Visibility.Visible ' UserNotes
+ Sawing(48) = Visibility.Visible ' OverLapStr
+ Sawing(49) = Visibility.Hidden ' OffsetStr
+ ' Parametri Pocketing
+ Pocketing(0) = Visibility.Visible ' Invert
+ Pocketing(1) = Visibility.Hidden ' LeaveTab
+ Pocketing(2) = Visibility.Visible ' Type
+ Pocketing(3) = Visibility.Hidden ' WorkSide
+ Pocketing(4) = Visibility.Hidden ' HeadSide
+ Pocketing(5) = Visibility.Hidden ' LeadInType
+ Pocketing(6) = Visibility.Hidden ' ExtLinkType
+ Pocketing(7) = Visibility.Hidden ' LeadOutType
+ Pocketing(8) = Visibility.Hidden ' CurveUse
+ Pocketing(9) = Visibility.Hidden ' StepType
+ Pocketing(10) = Visibility.Visible ' LeadLinkType
+ Pocketing(11) = Visibility.Visible ' Speed
+ Pocketing(12) = Visibility.Visible ' Feed
+ Pocketing(13) = Visibility.Visible ' StartFeed
+ Pocketing(14) = Visibility.Visible ' EndFeed
+ Pocketing(15) = Visibility.Visible ' TipFeed
+ Pocketing(16) = Visibility.Hidden ' OffSr
+ Pocketing(17) = Visibility.Hidden ' OffSl
+ Pocketing(18) = Visibility.Hidden ' SideAngle
+ Pocketing(19) = Visibility.Hidden ' Approx
+ Pocketing(20) = Visibility.Visible ' StartPos
+ Pocketing(21) = Visibility.Hidden ' StartSlowLen
+ Pocketing(22) = Visibility.Hidden ' EndSlowLen
+ Pocketing(23) = Visibility.Hidden ' ThroughAddlen
+ Pocketing(24) = Visibility.Hidden ' StepPar
+ Pocketing(25) = Visibility.Visible ' ReturnPos
+ Pocketing(26) = Visibility.Hidden ' TabLen
+ Pocketing(27) = Visibility.Hidden ' TabDist
+ Pocketing(28) = Visibility.Hidden ' TabHeight
+ Pocketing(29) = Visibility.Hidden ' TabAngle
+ Pocketing(30) = Visibility.Hidden ' LiTang
+ Pocketing(31) = Visibility.Hidden ' LiPerp
+ Pocketing(32) = Visibility.Hidden ' LiElev
+ Pocketing(33) = Visibility.Hidden ' LiCompLen
+ Pocketing(34) = Visibility.Hidden ' LoTang
+ Pocketing(35) = Visibility.Hidden ' LoPerp
+ Pocketing(36) = Visibility.Hidden ' LoElev
+ Pocketing(37) = Visibility.Hidden ' LoCompLen
+ Pocketing(38) = Visibility.Hidden ' StartAddLen
+ Pocketing(39) = Visibility.Hidden ' EndAddLen
+ Pocketing(40) = Visibility.Hidden ' StepExtArc
+ Pocketing(41) = Visibility.Hidden ' StepIntArc
+ Pocketing(42) = Visibility.Hidden ' SideStep
+ Pocketing(43) = Visibility.Hidden ' VertFeed
+ Pocketing(44) = Visibility.Visible ' NamePar
+ Pocketing(45) = Visibility.Visible ' Tool
+ Pocketing(46) = Visibility.Visible ' DepthStr
+ Pocketing(47) = Visibility.Visible ' UserNotes
+ Pocketing(48) = Visibility.Hidden ' OverLapStr
+ Pocketing(49) = Visibility.Hidden ' OffsetStr
+ ' Parametri Mortising
+ Mortising(0) = Visibility.Visible ' Invert
+ Mortising(1) = Visibility.Hidden ' LeaveTab
+ Mortising(2) = Visibility.Visible ' Type
+ Mortising(3) = Visibility.Hidden ' WorkSide
+ Mortising(4) = Visibility.Hidden ' HeadSide
+ Mortising(5) = Visibility.Hidden ' LeadInType
+ Mortising(6) = Visibility.Hidden ' ExtLinkType
+ Mortising(7) = Visibility.Hidden ' LeadOutType
+ Mortising(8) = Visibility.Hidden ' CurveUse
+ Mortising(9) = Visibility.Hidden ' StepType
+ Mortising(10) = Visibility.Hidden ' LeadLinkType
+ Mortising(11) = Visibility.Visible ' Speed
+ Mortising(12) = Visibility.Visible ' Feed
+ Mortising(13) = Visibility.Visible ' StartFeed
+ Mortising(14) = Visibility.Visible ' EndFeed
+ Mortising(15) = Visibility.Visible ' TipFeed
+ Mortising(16) = Visibility.Hidden ' OffSr
+ Mortising(17) = Visibility.Hidden ' OffSl
+ Mortising(18) = Visibility.Hidden ' SideAngle
+ Mortising(19) = Visibility.Hidden ' Approx
+ Mortising(20) = Visibility.Visible ' StartPos
+ Mortising(21) = Visibility.Hidden ' StartSlowLen
+ Mortising(22) = Visibility.Hidden ' EndSlowLen
+ Mortising(23) = Visibility.Hidden ' ThroughAddlen
+ Mortising(24) = Visibility.Hidden ' StepPar
+ Mortising(25) = Visibility.Visible ' Returnpos
+ Mortising(26) = Visibility.Hidden ' TabLen
+ Mortising(27) = Visibility.Hidden ' TabDist
+ Mortising(28) = Visibility.Hidden ' TabHeight
+ Mortising(29) = Visibility.Hidden ' TabAngle
+ Mortising(30) = Visibility.Hidden ' LiTang
+ Mortising(31) = Visibility.Hidden ' LiPerp
+ Mortising(32) = Visibility.Hidden ' LiElev
+ Mortising(33) = Visibility.Hidden ' LiCompLen
+ Mortising(34) = Visibility.Hidden ' LoTang
+ Mortising(35) = Visibility.Hidden ' LoPerp
+ Mortising(36) = Visibility.Hidden ' LoElev
+ Mortising(37) = Visibility.Hidden ' LoCompLen
+ Mortising(38) = Visibility.Hidden ' StartAddLen
+ Mortising(39) = Visibility.Hidden ' EndAddLen
+ Mortising(40) = Visibility.Hidden ' StepExtArc
+ Mortising(41) = Visibility.Hidden ' StepIntArc
+ Mortising(42) = Visibility.Hidden ' SideStep
+ Mortising(43) = Visibility.Hidden ' VertFeed
+ Mortising(44) = Visibility.Visible ' Name
+ Mortising(45) = Visibility.Visible ' Tool
+ Mortising(46) = Visibility.Visible ' DepthStr
+ Mortising(47) = Visibility.Visible ' UserNotes
+ Mortising(48) = Visibility.Hidden ' OverLapStr
+ Mortising(49) = Visibility.Hidden ' OffsetStr
+ ' Parametri Sawroughing
+ Sawroughing(0) = Visibility.Visible ' Invert
+ Sawroughing(1) = Visibility.Hidden ' LeaveTab
+ Sawroughing(2) = Visibility.Visible ' Type
+ Sawroughing(3) = Visibility.Hidden ' WorkSide
+ Sawroughing(4) = Visibility.Visible ' HeadSide
+ Sawroughing(5) = Visibility.Visible ' LeadInType
+ Sawroughing(6) = Visibility.Hidden ' ExtLinkType
+ Sawroughing(7) = Visibility.Hidden ' LeadOutType
+ Sawroughing(8) = Visibility.Hidden ' CurveUse
+ Sawroughing(9) = Visibility.Visible ' StepType
+ Sawroughing(10) = Visibility.Visible ' LeadLinkType
+ Sawroughing(11) = Visibility.Visible ' Speed
+ Sawroughing(12) = Visibility.Visible ' Feed
+ Sawroughing(13) = Visibility.Visible ' StartFeed
+ Sawroughing(14) = Visibility.Visible ' EndFeed
+ Sawroughing(15) = Visibility.Visible ' TipFeed
+ Sawroughing(16) = Visibility.Hidden ' OffSr
+ Sawroughing(17) = Visibility.Hidden ' OffSl
+ Sawroughing(18) = Visibility.Hidden ' SideAngle
+ Sawroughing(19) = Visibility.Hidden ' Approx
+ Sawroughing(20) = Visibility.Visible ' StartPos
+ Sawroughing(21) = Visibility.Hidden ' StartSlowLen
+ Sawroughing(22) = Visibility.Hidden ' EndSlowLen
+ Sawroughing(23) = Visibility.Hidden ' ThroughAddlen
+ Sawroughing(24) = Visibility.Visible ' StepPar
+ Sawroughing(25) = Visibility.Visible ' Returnpos
+ Sawroughing(26) = Visibility.Hidden ' TabLen
+ Sawroughing(27) = Visibility.Hidden ' TabDist
+ Sawroughing(28) = Visibility.Hidden ' TabHeight
+ Sawroughing(29) = Visibility.Hidden ' TabAngle
+ Sawroughing(30) = Visibility.Hidden ' LiTang
+ Sawroughing(31) = Visibility.Hidden ' LiPerp
+ Sawroughing(32) = Visibility.Hidden ' LiElev
+ Sawroughing(33) = Visibility.Hidden ' LiCompLen
+ Sawroughing(34) = Visibility.Hidden ' LoTang
+ Sawroughing(35) = Visibility.Hidden ' LoPerp
+ Sawroughing(36) = Visibility.Hidden ' LoElev
+ Sawroughing(37) = Visibility.Hidden ' LoCompLen
+ Sawroughing(38) = Visibility.Hidden ' StartAddLen
+ Sawroughing(39) = Visibility.Hidden ' EndAddLen
+ Sawroughing(40) = Visibility.Hidden ' StepExtArc
+ Sawroughing(41) = Visibility.Hidden ' StepIntArc
+ Sawroughing(42) = Visibility.Visible ' SideStep
+ Sawroughing(43) = Visibility.Visible ' VertFeed
+ Sawroughing(44) = Visibility.Visible ' Name
+ Sawroughing(45) = Visibility.Visible ' Tool
+ Sawroughing(46) = Visibility.Visible ' DepthStr
+ Sawroughing(47) = Visibility.Visible ' UserNotes
+ Sawroughing(48) = Visibility.Hidden ' OverLapStr
+ Sawroughing(49) = Visibility.Hidden ' OffsetStr
+ ' Parametri Sawfinishing
+ Sawfinishing(0) = Visibility.Visible ' Invert
+ Sawfinishing(1) = Visibility.Hidden ' LeaveTab
+ Sawfinishing(2) = Visibility.Visible ' Type
+ Sawfinishing(3) = Visibility.Hidden ' WorkSide
+ Sawfinishing(4) = Visibility.Visible ' HeadSide
+ Sawfinishing(5) = Visibility.Visible ' LeadInType
+ Sawfinishing(6) = Visibility.Hidden ' ExtLinkType
+ Sawfinishing(7) = Visibility.Hidden ' LeadOutType
+ Sawfinishing(8) = Visibility.Hidden ' CurveUse
+ Sawfinishing(9) = Visibility.Visible ' StepType
+ Sawfinishing(10) = Visibility.Visible ' LeadLinkType
+ Sawfinishing(11) = Visibility.Visible ' Speed
+ Sawfinishing(12) = Visibility.Visible ' Feed
+ Sawfinishing(13) = Visibility.Visible ' StartFeed
+ Sawfinishing(14) = Visibility.Visible ' EndFeed
+ Sawfinishing(15) = Visibility.Visible ' TipFeed
+ Sawfinishing(16) = Visibility.Hidden ' OffSr
+ Sawfinishing(17) = Visibility.Hidden ' OffSl
+ Sawfinishing(18) = Visibility.Hidden ' SideAngle
+ Sawfinishing(19) = Visibility.Hidden ' Approx
+ Sawfinishing(20) = Visibility.Visible ' StartPos
+ Sawfinishing(21) = Visibility.Hidden ' StartSlowLen
+ Sawfinishing(22) = Visibility.Hidden ' EndSlowLen
+ Sawfinishing(23) = Visibility.Hidden ' ThroughAddlen
+ Sawfinishing(24) = Visibility.Visible ' StepPar
+ Sawfinishing(25) = Visibility.Visible ' Returnpos
+ Sawfinishing(26) = Visibility.Hidden ' TabLen
+ Sawfinishing(27) = Visibility.Hidden ' TabDist
+ Sawfinishing(28) = Visibility.Hidden ' TabHeight
+ Sawfinishing(29) = Visibility.Hidden ' TabAngle
+ Sawfinishing(30) = Visibility.Hidden ' LiTang
+ Sawfinishing(31) = Visibility.Hidden ' LiPerp
+ Sawfinishing(32) = Visibility.Hidden ' LiElev
+ Sawfinishing(33) = Visibility.Hidden ' LiCompLen
+ Sawfinishing(34) = Visibility.Hidden ' LoTang
+ Sawfinishing(35) = Visibility.Hidden ' LoPerp
+ Sawfinishing(36) = Visibility.Hidden ' LoElev
+ Sawfinishing(37) = Visibility.Hidden ' LoCompLen
+ Sawfinishing(38) = Visibility.Hidden ' StartAddLen
+ Sawfinishing(39) = Visibility.Hidden ' EndAddLen
+ Sawfinishing(40) = Visibility.Hidden ' StepExtArc
+ Sawfinishing(41) = Visibility.Hidden ' StepIntArc
+ Sawfinishing(42) = Visibility.Visible ' SideStep
+ Sawfinishing(43) = Visibility.Visible ' VertFeed
+ Sawfinishing(44) = Visibility.Visible ' Name
+ Sawfinishing(45) = Visibility.Visible ' Tool
+ Sawfinishing(46) = Visibility.Visible ' DepthStr
+ Sawfinishing(47) = Visibility.Visible ' UserNotes
+ Sawfinishing(48) = Visibility.Hidden ' OverLapStr
+ Sawfinishing(49) = Visibility.Hidden ' OffsetStr
+
+ End Sub
+
+End Module
diff --git a/StatusBar/StatusBarView.xaml b/StatusBar/StatusBarView.xaml
new file mode 100644
index 0000000..307d4b3
--- /dev/null
+++ b/StatusBar/StatusBarView.xaml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/StatusBar/StatusBarView.xaml.vb b/StatusBar/StatusBarView.xaml.vb
new file mode 100644
index 0000000..d2bcf10
--- /dev/null
+++ b/StatusBar/StatusBarView.xaml.vb
@@ -0,0 +1,3 @@
+Public Class StatusBarView
+
+End Class
diff --git a/StatusBar/StatusBarViewModel.vb b/StatusBar/StatusBarViewModel.vb
new file mode 100644
index 0000000..91332a8
--- /dev/null
+++ b/StatusBar/StatusBarViewModel.vb
@@ -0,0 +1,68 @@
+Namespace EgtCAM5
+
+ Public Class StatusBarViewModel
+ Inherits ViewModelBase
+
+ ' GRAPHICAL ELEMENTS
+ Private m_StatusOutput As String
+ Public Property StatusOutput As String
+ Get
+ Return m_StatusOutput
+ End Get
+ Set(value As String)
+ m_StatusOutput = value
+ OnPropertyChanged("StatusOutput")
+ End Set
+ End Property
+
+ Private m_StatusCurrPos As String
+ Public Property StatusCurrPos As String
+ Get
+ Return m_StatusCurrPos
+ End Get
+ Set(value As String)
+ m_StatusCurrPos = value
+ OnPropertyChanged("StatusCurrPos")
+ End Set
+ End Property
+
+ Private m_StatusProgress As Integer
+ Public Property StatusProgress As Integer
+ Get
+ Return m_StatusProgress
+ End Get
+ Set(value As Integer)
+ m_StatusProgress = value
+ OnPropertyChanged("StatusProgress")
+ End Set
+ End Property
+
+ Private m_StatusStop_IsEnabled As Boolean
+ Public Property StatusStop_IsEnabled As Boolean
+ Get
+ Return m_StatusStop_IsEnabled
+ End Get
+ Set(value As Boolean)
+ m_StatusStop_IsEnabled = value
+ OnPropertyChanged("StatusStop_IsEnabled")
+ End Set
+ End Property
+
+ Sub New()
+ Application.Msn.Register(Application.NOTIFYCURRPOSCHANGED, Sub(sCursorPos As String)
+ StatusCurrPos = sCursorPos
+ End Sub)
+ Application.Msn.Register(Application.NOTIFYSTATUSOUTPUT, Sub(sStatusOutput As String)
+ StatusOutput = sStatusOutput
+ End Sub)
+ Application.Msn.Register(Application.NOTIFYSTATUSPROGRESS, Sub(sStatusProgress As Integer)
+ StatusProgress = sStatusProgress
+ End Sub)
+ Application.Msn.Register(Application.NOTIFYSTATUSSTOP_ISENABLED, Sub(sStatusStop As Boolean)
+ StatusStop_IsEnabled = sStatusStop
+ End Sub)
+ End Sub
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/ToolsDbPage/ToolTreeView.vb b/ToolsDbPage/ToolTreeView.vb
new file mode 100644
index 0000000..6b2e7ff
--- /dev/null
+++ b/ToolsDbPage/ToolTreeView.vb
@@ -0,0 +1,1126 @@
+Imports System.Collections.ObjectModel
+Imports System.ComponentModel
+Imports System.Text.RegularExpressions
+Imports System.IO
+Imports EgtUILib
+Imports EgtWPFLib5
+Imports EgtCAM5.Utility
+
+'''
+''' Class that represent a Tool in the treeview.
+''' It's an element in the treeview that represent the child of familytooltreeviewitem, but also the class that read and write in the tool's database
+'''
+Public Class ToolTreeViewItem
+ Inherits ChildItem
+ Implements IDataErrorInfo
+
+ 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.ERRORONTOOL, Nothing)
+ Else
+ m_ErrorOnTool = True
+ Application.Msn.NotifyColleagues(Application.ERRORONTOOL, Me)
+ End If
+ End Set
+ End Property
+
+#Region "Tool Property"
+
+ ' Variabile che indica se c'è un errore nel nome dell'utensile (ad esempio nome già utilizzato)
+ Dim bErrorToolName 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
+ EgtTdbGetCurrToolParam(MCH_TP.NAME, sNamePar)
+ Return sNamePar
+ End Get
+ Set(value As String)
+ bErrorToolName = False
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ If EgtTdbSetCurrToolParam(MCH_TP.NAME, value) Then
+ Name = value
+ Else
+ bErrorToolName = True
+ End If
+ End Set
+ End Property
+
+ ' Variabile che indica se l'utensile è appena stato creato
+ Dim m_NewTool As Boolean = False
+ Public Property NewTool As Boolean
+ Get
+ Return m_NewTool
+ End Get
+ Set(value As Boolean)
+ m_NewTool = value
+ End Set
+ End Property
+
+ '''
+ ''' Property that determines if the Tool 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 Tool is selected, set it as current and notify all tool's property
+ ' to refresh them values with those of the new selected tool
+ If value Then
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrTool(Me.Name)
+ NotifyPropertyChanged("Corr")
+ NotifyPropertyChanged("ExitPar")
+ NotifyPropertyChanged("Type")
+ NotifyPropertyChanged("Coolant")
+ NotifyPropertyChanged("CornRad")
+ NotifyPropertyChanged("Diam")
+ NotifyPropertyChanged("TotDiam")
+ NotifyPropertyChanged("Feed")
+ NotifyPropertyChanged("EndFeed")
+ NotifyPropertyChanged("StartFeed")
+ NotifyPropertyChanged("TipFeed")
+ NotifyPropertyChanged("Len")
+ NotifyPropertyChanged("TotLen")
+ NotifyPropertyChanged("MaxMat")
+ NotifyPropertyChanged("LonOffset")
+ NotifyPropertyChanged("RadOffset")
+ NotifyPropertyChanged("Speed")
+ NotifyPropertyChanged("SideAng")
+ NotifyPropertyChanged("MaxSpeed")
+ NotifyPropertyChanged("Thick")
+ NotifyPropertyChanged("MaxAbsorption")
+ NotifyPropertyChanged("MinFeed")
+ NotifyPropertyChanged("Draw")
+ NotifyPropertyChanged("Head")
+ NotifyPropertyChanged("NamePar")
+ NotifyPropertyChanged("UserNotes")
+ NotifyPropertyChanged("TcPos")
+ ' Aggiorno disegno utensile
+ UpdateSceneToolDraw(DrawUpdateSource.DRAW)
+ ' Otherwhise Tool is deselected, so it and the database will be saved to
+ ' keep the modify effective
+ Else
+ If EgtTdbIsCurrToolModified() And Me.IsValid Then
+
+ Select Case MsgBox("Save the modified tool?", MsgBoxStyle.YesNo, "SAVE")
+ Case MsgBoxResult.Yes
+ m_NewTool = False
+ EgtTdbSaveCurrTool()
+ SaveToolDraw()
+ EgtTdbSave()
+ Case MsgBoxResult.No
+ If m_NewTool Then
+ Application.Msn.NotifyColleagues(Application.REMOVETOOL, Me)
+ End If
+ 'EgtTdbRemoveTool(Me.Name)
+ 'EgtTdbSave()
+ End Select
+ End If
+ End If
+
+ End If
+
+ End Set
+
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Corrector
+ '''
+ Public Property Corr As Integer
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim nCorr As Integer = 0
+ EgtTdbGetCurrToolParam(MCH_TP.CORR, nCorr)
+ Return nCorr
+ End Get
+ Set(value As Integer)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.CORR, value)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Exit
+ '''
+ Public Property ExitPar As Integer
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim nExitPar As Integer = 0
+ EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExitPar)
+ Return nExitPar
+ End Get
+ Set(value As Integer)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.EXIT_, value)
+ End Set
+ End Property
+
+ Dim m_Type As Integer
+ '''
+ ''' Property that read and write to the tool's database the Type
+ '''
+ Public Property Type As Integer
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dType As Integer = 0
+ Dim x = EgtTdbGetCurrToolParam(MCH_TP.TYPE, dType)
+ m_Type = dType
+ Return dType
+ End Get
+ Set(value As Integer)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ m_Type = value
+ EgtTdbSetCurrToolParam(MCH_TP.TYPE, value)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Coolant
+ '''
+ Public Property Coolant As Integer
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim nCoolant As Integer = 0
+ EgtTdbGetCurrToolParam(MCH_TP.COOLANT, nCoolant)
+ Return nCoolant
+ End Get
+ Set(value As Integer)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.COOLANT, value)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Corner Radius
+ '''
+ Public Property CornRad As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dCornRad As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.CORNRAD, dCornRad)
+ Return LenToString(dCornRad, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dCornRad As Double = 0
+ StringToLen(value, dCornRad)
+ EgtTdbSetCurrToolParam(MCH_TP.CORNRAD, dCornRad)
+ End Set
+ End Property
+
+ Dim m_Diam As Double
+ '''
+ ''' Property that read and write to the tool's database the Diameter
+ '''
+ Public Property Diam As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dDiam As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
+ m_Diam = dDiam
+ Return LenToString(dDiam, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dDiam As Double = 0
+ StringToLen(value, dDiam)
+ m_Diam = dDiam
+ UpdateSceneToolDraw(DrawUpdateSource.DIAM)
+ EgtTdbSetCurrToolParam(MCH_TP.DIAM, dDiam)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Total Diameter
+ '''
+ Public Property TotDiam As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dTotDiam As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.TOTDIAM, dTotDiam)
+ Return LenToString(dTotDiam, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dTotDiam As Double = 0
+ StringToLen(value, dTotDiam)
+ EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dTotDiam)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Feed
+ '''
+ Public Property Feed As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dFeed As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
+ Return LenToString(dFeed, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dFeed As Double = 0
+ StringToLen(value, dFeed)
+ EgtTdbSetCurrToolParam(MCH_TP.FEED, dFeed)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the End Feed
+ '''
+ Public Property EndFeed As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dEndFeed As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.ENDFEED, dEndFeed)
+ Return LenToString(dEndFeed, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dEndFeed As Double = 0
+ StringToLen(value, dEndFeed)
+ EgtTdbSetCurrToolParam(MCH_TP.ENDFEED, dEndFeed)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Start Feed
+ '''
+ Public Property StartFeed As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dStartFeed As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.STARTFEED, dStartFeed)
+ Return LenToString(dStartFeed, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dStartFeed As Double = 0
+ StringToLen(value, dStartFeed)
+ EgtTdbSetCurrToolParam(MCH_TP.STARTFEED, dStartFeed)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Tip Feed
+ '''
+ Public Property TipFeed As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dTipFeed As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.TIPFEED, dTipFeed)
+ Return LenToString(dTipFeed, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dTipFeed As Double = 0
+ StringToLen(value, dTipFeed)
+ EgtTdbSetCurrToolParam(MCH_TP.TIPFEED, dTipFeed)
+ End Set
+ End Property
+
+ Dim m_Len As Double
+ '''
+ ''' Property that read and write to the tool's database the Len
+ '''
+ Public Property Len As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dLen As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen)
+ m_Len = dLen
+ Return LenToString(dLen, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dLen As Double = 0
+ StringToLen(value, dLen)
+ m_Len = dLen
+ UpdateSceneToolDraw(DrawUpdateSource.LEN)
+ EgtTdbSetCurrToolParam(MCH_TP.LEN, dLen)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Total Len
+ '''
+ Public Property TotLen As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dTotLen As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.TOTLEN, dTotLen)
+ Return LenToString(dTotLen, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dTotLen As Double = 0
+ StringToLen(value, dTotLen)
+ EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dTotLen)
+ End Set
+ End Property
+
+ Dim m_MaxMat As Double
+ '''
+ ''' Property that read and write to the tool's database the Max Material
+ '''
+ Public Property MaxMat As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMaxMat As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dMaxMat)
+ m_MaxMat = dMaxMat
+ Return LenToString(dMaxMat, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMaxMat As Double = 0
+ StringToLen(value, dMaxMat)
+ m_MaxMat = dMaxMat
+ UpdateSceneToolDraw(DrawUpdateSource.MAXMAT)
+ EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, dMaxMat)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Lon Offset
+ '''
+ Public Property LonOffset As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dLonOffset As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.LONOFFSET, dLonOffset)
+ Return LenToString(dLonOffset, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dLonOffset As Double = 0
+ StringToLen(value, dLonOffset)
+ EgtTdbSetCurrToolParam(MCH_TP.LONOFFSET, dLonOffset)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Rad Offset
+ '''
+ Public Property RadOffset As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dRadOffset As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.RADOFFSET, dRadOffset)
+ Return LenToString(dRadOffset, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dRadOffset As Double = 0
+ StringToLen(value, dRadOffset)
+ EgtTdbSetCurrToolParam(MCH_TP.RADOFFSET, dRadOffset)
+ End Set
+ End Property
+
+ Dim m_Speed As Double
+ '''
+ ''' Property that read and write to the tool's database the Speed
+ '''
+ Public Property Speed As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dSpeed As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
+ Return DoubleToString(dSpeed, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dSpeed As Double = 0
+ StringToDouble(value, dSpeed)
+ m_Speed = dSpeed
+ EgtTdbSetCurrToolParam(MCH_TP.SPEED, dSpeed)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Side Angle
+ '''
+ Public Property SideAng As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dSideAng As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.SIDEANG, dSideAng)
+ Return LenToString(dSideAng, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dSideAng As Double = 0
+ StringToLen(value, dSideAng)
+ EgtTdbSetCurrToolParam(MCH_TP.SIDEANG, dSideAng)
+ End Set
+ End Property
+
+ Dim m_MaxSpeed As Double
+ '''
+ ''' Property that read and write to the tool's database the Max Speed
+ '''
+ Public Property MaxSpeed As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMaxSpeed As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.MAXSPEED, dMaxSpeed)
+ m_MaxSpeed = dMaxSpeed
+ Return DoubleToString(dMaxSpeed, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMaxSpeed As Double = 0
+ StringToDouble(value, dMaxSpeed)
+ m_MaxSpeed = dMaxSpeed
+ NotifyPropertyChanged("Speed")
+ EgtTdbSetCurrToolParam(MCH_TP.MAXSPEED, dMaxSpeed)
+ End Set
+ End Property
+
+ Dim m_Thick As Double
+ '''
+ ''' Property that read and write to the tool's database the Thick
+ '''
+ Public Property Thick As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dThick As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
+ m_Thick = dThick
+ Return LenToString(dThick, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dThick As Double = 0
+ StringToLen(value, dThick)
+ m_Thick = dThick
+ UpdateSceneToolDraw(DrawUpdateSource.THICK)
+ EgtTdbSetCurrToolParam(MCH_TP.THICK, dThick)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Max Absorption
+ '''
+ Public Property MaxAbsorption As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMaxAbsorption As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.MAXABSORPTION, dMaxAbsorption)
+ Return LenToString(dMaxAbsorption, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMaxAbsorption As Double = 0
+ StringToLen(value, dMaxAbsorption)
+ EgtTdbSetCurrToolParam(MCH_TP.MAXABSORPTION, dMaxAbsorption)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Min Feed
+ '''
+ Public Property MinFeed As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMinFeed As Double = 0
+ EgtTdbGetCurrToolParam(MCH_TP.MINFEED, dMinFeed)
+ Return LenToString(dMinFeed, 3)
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim dMinFeed As Double = 0
+ StringToLen(value, dMinFeed)
+ EgtTdbSetCurrToolParam(MCH_TP.MINFEED, dMinFeed)
+ End Set
+ End Property
+
+ Private m_Draw As String
+ '''
+ ''' Property that read and write to the tool's database the Draw
+ '''
+ Public Property Draw As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim sDraw As String = String.Empty
+ EgtTdbGetCurrToolParam(MCH_TP.DRAW, sDraw)
+ m_Draw = sDraw
+ Return sDraw
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ If value = ToolDrawUUIDName Then
+ value = m_Draw
+ ElseIf value = ToolDrawUUIDName.Substring(0, ToolDrawUUIDName.Length - 1) Then
+ value = String.Empty
+ End If
+ m_Draw = value
+ UpdateSceneToolDraw(DrawUpdateSource.DRAW)
+ EgtTdbSetCurrToolParam(MCH_TP.DRAW, value)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Head
+ '''
+ Public Property Head As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim sHead As String = String.Empty
+ EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHead)
+ Return sHead
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.HEAD, value)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the User Notes
+ '''
+ Public Property UserNotes As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim sUserNotes As String = String.Empty
+ EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, sUserNotes)
+ Return sUserNotes
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, value)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Tc Pos
+ '''
+ Public Property TcPos As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim sTcPos As String = String.Empty
+ EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTcPos)
+ Return sTcPos
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.TCPOS, value)
+ End Set
+ End Property
+
+ '''
+ ''' Property that read and write to the tool's database the Uuid
+ '''
+ Public Property Uuid As String
+ Get
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim sUuid As String = String.Empty
+ EgtTdbGetCurrToolParam(MCH_TP.UUID, sUuid)
+ Return sUuid
+ End Get
+ Set(value As String)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.UUID, value)
+ End Set
+ End Property
+
+#End Region ' Tool Property
+
+#Region "Constructors"
+
+ 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 Region ' Constructors
+
+#Region "ToolSceneUpdate"
+
+ ' Enum che indica le proprietà di disegno dell'utensile
+ Friend Enum DrawUpdateSource
+ DIAM = 0
+ LEN = 1
+ MAXMAT = 2
+ THICK = 3
+ DRAW = 4
+ End Enum
+
+ ' Variabili che segnalano errori nel disegno dell'utensile
+ Dim bToolMakerError As Boolean = False
+ Dim bDrawNameExistError As Boolean = False
+ Dim bDrawNameError As Boolean = False
+ Dim bDrawingError As Boolean = False
+
+ Private Sub UpdateSceneToolDraw(UpdateSource As DrawUpdateSource)
+ ' Azzero errori
+ bToolMakerError = False
+ bDrawNameError = False
+ bDrawNameExistError = False
+ bDrawingError = False
+
+ 'Select Case UpdateSource
+ ' Case DrawUpdateSource.DIAM, DrawUpdateSource.LEN, DrawUpdateSource.MAXMAT, DrawUpdateSource.THICK
+
+ ' Case DrawUpdateSource.DRAW
+
+ 'End Select
+ ' Verifico proprietà draw
+ If m_Draw = String.Empty OrElse IsUUID(Path.GetFileNameWithoutExtension(m_Draw)) Then
+ CreateToolDraw(UpdateSource)
+ Else
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ If IsNgeFile(m_Draw) Then
+ If EgtOpenFile(IniFile.m_sTdbCurrMachToolsDirPath & "\" & m_Draw) Then
+ EgtSetView(VT.TOP, False)
+ EgtZoom(ZM.ALL)
+ Else
+ ' Errore
+ bDrawNameExistError = True
+ EgtNewFile()
+ EgtSetView(VT.TOP, False)
+ EgtZoom(ZM.ALL)
+ End If
+ Else
+ ' Errore
+ bDrawNameError = True
+ EgtNewFile()
+ EgtSetView(VT.TOP, False)
+ EgtZoom(ZM.ALL)
+ End If
+ End If
+ NotifyPropertyChanged("Draw")
+ NotifyPropertyChanged("MaxMat")
+ NotifyPropertyChanged("Thick")
+ NotifyPropertyChanged("Diam")
+ NotifyPropertyChanged("Len")
+ End Sub
+
+ Private Sub CreateToolDraw(UpdateSource As DrawUpdateSource)
+ ' Carico il relativo ToolHolder
+ Dim ToolHolder As String = String.Empty
+ ToolHolder = LoadToolHolder()
+ If Not LoadToolMaker() OrElse Not CreateToolDraw(ToolHolder, UpdateSource) Then
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ EgtNewFile()
+ End If
+ ' Aggiorno visualizzazione
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ EgtSetView(VT.TOP, False)
+ EgtZoom(ZM.ALL)
+ ' Salvo il
+ End Sub
+
+ '''
+ ''' Mathod that load the toolholder for the current tool (based on his head), or return an empty string
+ '''
+ Private Function LoadToolHolder() As String
+ Dim sHolder As String = String.Empty
+ EgtUILib.GetPrivateProfileString(S_TOOLHOLDER, Head & "." & ExitPar.ToString(), "", sHolder, IniFile.m_sDbsCurrMachIniFilePath)
+ If String.IsNullOrWhiteSpace(sHolder) Then
+ Return String.Empty
+ Else
+ Dim sHolderPath As String = String.Empty
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbGetToolHolderDir(sHolderPath)
+ sHolderPath += "\" & sHolder
+ Return sHolderPath
+ End If
+ End Function
+
+ Private Function LoadToolMaker() As Boolean
+ Dim sMaker As String = String.Empty
+ EgtUILib.GetPrivateProfileString(S_TOOLS, ConvertTypeToString(Type), "", sMaker, IniFile.m_sDbsCurrMachIniFilePath)
+ If String.IsNullOrWhiteSpace(sMaker) Then bToolMakerError = True
+ Return EgtLuaExecFile(IniFile.m_sToolMakersDir & "\" & sMaker)
+ End Function
+
+ Private Function ConvertTypeToString(Type As Integer) As String
+ Select Case Type
+ Case MCH_TY.DRILL_STD, MCH_TY.DRILL_LONG
+ Return "StandardDrillMaker"
+ Case MCH_TY.SAW_STD, MCH_TY.SAW_FLAT
+ Return "StandardSawMaker"
+ Case MCH_TY.MILL_STD, MCH_TY.MILL_NOTIP
+ Return "StandardMillMaker"
+ Case MCH_TY.MORTISE_STD
+ Return "StandardMortiseMaker"
+ Case MCH_TY.COMPO
+ Return "StandardCompoMaker"
+ End Select
+ End Function
+
+ Private Function CreateToolDraw(ToolHolder As String, UpdateSource As DrawUpdateSource) As Boolean
+ Select Case Type
+ Case MCH_TY.DRILL_STD
+ ' passo all'ambiente di disegno dell'utensile
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ ' imposto dati utensile
+ EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
+ EgtLuaSetGlobNumVar("TOOL.LEN", m_Len)
+ EgtLuaSetGlobNumVar("TOOL.DIAM", m_Diam)
+ EgtLuaSetGlobNumVar("TOOL.MAXMAT", m_MaxMat)
+ Case MCH_TY.SAW_STD
+ ' passo all'ambiente di disegno dell'utensile
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ ' imposto dati utensile
+ EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
+ EgtLuaSetGlobNumVar("TOOL.LEN", m_Len)
+ EgtLuaSetGlobNumVar("TOOL.DIAM", m_Diam)
+ Dim dCore As Double = If(Len >= Thick, m_Thick - 1, 2 * m_Len - m_Thick)
+ EgtLuaSetGlobNumVar("TOOL.CORE", dCore)
+ EgtLuaSetGlobNumVar("TOOL.THICK", m_Thick)
+ EgtLuaSetGlobNumVar("TOOL.MAXMAT", m_MaxMat)
+ Case MCH_TY.MILL_STD
+ ' passo all'ambiente di disegno dell'utensile
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ ' imposto dati utensile
+ EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
+ EgtLuaSetGlobNumVar("TOOL.LEN", m_Len)
+ EgtLuaSetGlobNumVar("TOOL.DIAM", m_Diam)
+ EgtLuaSetGlobNumVar("TOOL.MAXMAT", m_MaxMat)
+ Case Else
+ bDrawingError = True
+ Draw = String.Empty
+ Return False
+ End Select
+ ' eseguo creazione utensile
+ EgtLuaExecLine("CreateTool()")
+ ' recupero errore
+ Dim nErr As Integer = 999
+ EgtLuaGetGlobIntVar("TOOL.ERR", nErr)
+ bDrawingError = Not (nErr = 0)
+ If bDrawingError And UpdateSource <> DrawUpdateSource.DRAW Then Draw = String.Empty
+ Return (nErr = 0)
+ End Function
+
+ Private Function SaveToolDraw() As Boolean
+ If m_Type = MCH_TY.DRILL_STD Or m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.MILL_STD Then
+ Dim x = EgtGetCurrentContext()
+ ' nome e direttorio del file da salvare
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim sDrawName As String = Uuid
+ sDrawName = sDrawName & ".nge"
+ Dim sPath As String = String.Empty
+ EgtTdbGetToolDir(sPath)
+ sPath = sPath & "\" & sDrawName
+ ' passo all'ambiente di disegno dell'utensile
+ Dim r = EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ Dim y = EgtGetCurrentContext()
+ ' nascondo layer ausiliario
+ Dim nAuxId As Integer = GDB_ID.NULL
+ nAuxId = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "AUX")
+ EgtSetStatus(nAuxId, GDB_ST.OFF)
+ ' se lama devo ruotare -90 deg attorno a Z+
+ If m_Type = MCH_TY.SAW_STD Then
+ EgtRotate(EgtGetFirstGroupInGroup(GDB_ID.ROOT), Point3d.ORIG(), Vector3d.Z_AX(), -90, GDB_RT.GLOB)
+ End If
+ ' salvo il modello
+ Dim z = EgtGetCurrentContext()
+ Dim bOk As Boolean = EgtSaveFile(sPath, NGE.CMPTEXT)
+ Dim e = EgtGetCurrentContext()
+ ' eseguo controrotazione per lama
+ If m_Type = MCH_TY.SAW_STD Then
+ EgtRotate(EgtGetFirstGroupInGroup(GDB_ID.ROOT), Point3d.ORIG(), Vector3d.Z_AX(), 90, GDB_RT.GLOB)
+ End If
+ ' ripristino visualizzazione layer aux
+ EgtSetStatus(nAuxId, GDB_ST.ON_)
+ ' salvo nome del disegno utensile
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtTdbSetCurrToolParam(MCH_TP.DRAW, sDrawName)
+ EgtTdbSaveCurrTool()
+ Return bOk
+ End If
+ Return False
+ End Function
+
+#End Region ' ToolSceneUpdate
+
+#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 = {"Draw", "MaxMat", "Thick", "Diam", "Len", "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 "Draw"
+ [error] = Me.ValidateDraw()
+ Case "MaxMat"
+ [error] = Me.ValidateMaxMat()
+ Case "Diam"
+ [error] = Me.ValidateDiam()
+ Case "Thick"
+ [error] = Me.ValidateThick()
+ Case "Len"
+ [error] = Me.ValidateLen()
+ 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 ValidateDraw() As String
+ If bDrawNameError Then
+ Return "Il file deve essere di tipo .nge"
+ End If
+ If bDrawNameExistError Then
+ Return "Il file non esiste"
+ End If
+ If bToolMakerError Then
+ Return "Non esiste il ToolMaker per questo tipo di utensile"
+ End If
+ If bDrawingError Then
+ Return "Impossibile creare l'utensile con questi parametri"
+ End If
+ Return Nothing
+ End Function
+
+ Private Function ValidateMaxMat() As String
+ If m_Draw = String.Empty Then
+ If m_MaxMat < EPS_SMALL Then
+ Return "Il valore di MaxMat deve essere maggiore di 0"
+ End If
+ If m_MaxMat > m_Len Then
+ Return "Il valore di MaxMat non può essere maggiore di quello di Len"
+ End If
+ End If
+ Return Nothing
+ End Function
+
+ Private Function ValidateThick() As String
+ If (m_Type = MCH_TY.SAW_FLAT Or m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.MORTISE_STD) And m_Draw = String.Empty And m_Thick < EPS_SMALL Then
+ Return "Il valore di Thick deve essere maggiore di 0"
+ End If
+ Return Nothing
+ End Function
+
+ Private Function ValidateDiam() As String
+ If m_Draw = String.Empty And m_Diam < EPS_SMALL Then
+ Return "Il valore di Diam deve essere maggiore di 0"
+ End If
+ Return Nothing
+ End Function
+
+ Private Function ValidateLen() As String
+ If m_Draw = String.Empty And m_Len < EPS_SMALL Then
+ Return "Il valore di Len deve essere maggiore di 0"
+ End If
+ Return Nothing
+ End Function
+
+ Private Function ValidateSpeed() As String
+ 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 bErrorToolName Then
+ Return "Nome non valido"
+ End If
+ Return Nothing
+ End Function
+
+ Private Shared Function IsStringMissing(ByVal value As String) As Boolean
+ Return String.IsNullOrEmpty(value) OrElse value.Trim() = String.Empty
+ End Function
+
+ Private Shared Function IsNgeFile(FileName As String) As Boolean
+ If IsStringMissing(FileName) Then
+ Return False
+ End If
+
+ Dim pattern As String = "^.+\.(?:[nN][gG][eE])$"
+
+ Dim x = Regex.IsMatch(FileName, pattern, RegexOptions.IgnoreCase)
+ Return x
+ End Function
+
+#End Region ' Validation
+
+End Class
+
+'''
+''' Class that represent a FamilyTool in the treeview.
+''' It's an element in the treeview that represent a folder, but also a tool family
+'''
+Public Class FamilyToolTreeViewItem
+ Inherits ParentItem
+
+ Private m_ToolType As MCH_TF
+ '''
+ ''' Property that determines the tool type of the family
+ '''
+ Public Property ToolType As MCH_TF
+ Get
+ Return m_ToolType
+ End Get
+ Set(value As MCH_TF)
+ m_ToolType = value
+ End Set
+ End Property
+
+ '''
+ ''' Property that determines if the Tool 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 value Then
+ EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
+ EgtNewFile()
+ EgtSetView(VT.TOP, False)
+ EgtZoom(ZM.ALL)
+ End If
+ End If
+ End Set
+ End Property
+
+ ' Proprietà che permette di nascondere tutti i parametri utensile grazie al binding ed al converter
+ Public ReadOnly Property Type As Integer
+ Get
+ Return MCH_TY.NONE
+ End Get
+ End Property
+
+ '''
+ ''' Constructor that receive the name of the FamilyToolTreeViewItem, the ToolType, and set
+ ''' the picture(Folder.png)
+ '''
+ Sub New(Name As String, ToolType As MCH_TF)
+ MyBase.New(Name)
+ Me.ToolType = ToolType
+ 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 tool type and param type, to set the visibility state of the param type.
+'''
+Public Class ToolParamVisibilityConverter
+ 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_TY.NONE
+ Return Visibility.Hidden
+ Case MCH_TY.DRILL_STD
+ Return SharedFieldsClass.Drill_Std(CInt(parameter))
+ Case MCH_TY.DRILL_LONG
+ Return SharedFieldsClass.Drill_Long(CInt(parameter))
+ Case MCH_TY.SAW_STD
+ Return SharedFieldsClass.Saw_Std(CInt(parameter))
+ Case MCH_TY.SAW_FLAT
+ Return SharedFieldsClass.Saw_Flat(CInt(parameter))
+ Case MCH_TY.MILL_STD
+ Return SharedFieldsClass.Mill_Std(CInt(parameter))
+ Case MCH_TY.MILL_NOTIP
+ Return SharedFieldsClass.Mill_NoTip(CInt(parameter))
+ Case MCH_TY.MORTISE_STD
+ Return SharedFieldsClass.Mortise_Std(CInt(parameter))
+ Case MCH_TY.COMPO
+ Return SharedFieldsClass.Compo(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
+
+'''
+''' Class that represent a Converter that convert UUID to ***** in Draw param
+'''
+Public Class ToolDrawUUIDConverter
+ Implements IValueConverter
+
+ Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
+ If IsUUID(Path.GetFileNameWithoutExtension(value.ToString)) Then
+ Return ToolDrawUUIDName
+ Else
+ Return value.ToString
+ End If
+ End Function
+
+ Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
+ Return value.ToString
+ End Function
+End Class
diff --git a/ToolsDbPage/ToolsDbView.xaml b/ToolsDbPage/ToolsDbView.xaml
new file mode 100644
index 0000000..bd4aee1
--- /dev/null
+++ b/ToolsDbPage/ToolsDbView.xaml
@@ -0,0 +1,937 @@
+
+
+
+
+
+ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ToolsDbPage/ToolsDbView.xaml.vb b/ToolsDbPage/ToolsDbView.xaml.vb
new file mode 100644
index 0000000..99cd86a
--- /dev/null
+++ b/ToolsDbPage/ToolsDbView.xaml.vb
@@ -0,0 +1,6 @@
+Imports EgtUILib
+Imports System.Reflection
+
+Public Class ToolsDbView
+
+End Class
diff --git a/ToolsDbPage/ToolsDbViewModel.vb b/ToolsDbPage/ToolsDbViewModel.vb
new file mode 100644
index 0000000..575e619
--- /dev/null
+++ b/ToolsDbPage/ToolsDbViewModel.vb
@@ -0,0 +1,560 @@
+Imports System.Windows.Forms.Integration
+Imports System.Collections.ObjectModel
+Imports System.Reflection
+Imports System.IO
+Imports EgtUILib
+Imports EgtWPFLib5
+
+Namespace EgtCAM5
+
+ Public Class ToolsDbViewModel
+ Inherits TabViewModel
+
+ ' Lista delle macchine disponibili nel programma
+ Private m_MachinesList As New ObservableCollection(Of Machine)
+ Public Property MachinesList As ObservableCollection(Of Machine)
+ Get
+ Return m_MachinesList
+ End Get
+ Set(value As ObservableCollection(Of Machine))
+ m_MachinesList = value
+ End Set
+ End Property
+ ' Macchina correntemente selezionata e quindi attiva
+ Private m_SelectedMachine As Machine
+ Public Property SelectedMachine As Machine
+ Get
+ Return m_SelectedMachine
+ End Get
+ Set(value As Machine)
+ If value IsNot m_SelectedMachine Then
+ m_SelectedMachine = value
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ EgtSetCurrMachine(m_SelectedMachine.Name)
+ IniFile.m_sDbsCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
+ IniFile.m_sTdbCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
+ m_ToolsList.Clear()
+ LoadSelectedMachineTools()
+ OnPropertyChanged("SelectedMachine")
+ End If
+ End Set
+ End Property
+
+ ' Lista degli utensili
+ Private m_ToolsList As New ObservableCollection(Of FamilyToolTreeViewItem)
+ Public Property ToolsList As ObservableCollection(Of FamilyToolTreeViewItem)
+ Get
+ Return m_ToolsList
+ End Get
+ Set(value As ObservableCollection(Of FamilyToolTreeViewItem))
+ m_ToolsList = value
+ End Set
+ End Property
+
+ 'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
+ ' Reference to the ProjectScene
+ Private WithEvents m_ToolScene As New Scene
+ ' Reference to the ProjectSceneHost
+ Private SceneHost As WindowsFormsHost
+ ' Property used to bind the scene to the WindowsFormsHost in XAML
+ Private m_bfirst As Boolean = True
+ Public ReadOnly Property ToolSceneHost As WindowsFormsHost
+ Get
+ If m_bfirst Then
+ SceneHost = New WindowsFormsHost() With {.Child = m_ToolScene}
+ If Not m_ToolScene.Init() Then
+ EgtOutLog("Error in Tool scene creation")
+ 'Application.Msn.NotifyColleagues(Application.CLOSEAPPLICATION)
+ End If
+ IniFile.m_ToolsDbSceneContext = m_ToolScene.GetCtx()
+ ' inibisco selezione diretta da Scene
+ m_ToolScene.SetStatusNull()
+ 'EgtOpenFile("c:\EgtData\Varie\Temp\Fiera02.Nge")
+ 'OnPropertyChanged("SelectedMachine")
+ m_bfirst = False
+ End If
+ Return SceneHost
+ End Get
+ End Property
+
+ ' Definizione comandi
+ Private m_cmdNew As ICommand
+ Private m_cmdSave As ICommand
+ Private m_cmdRemove As ICommand
+
+ 'Definizione dei messaggi della pagina
+ Public ReadOnly Property CorrTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 51)
+ End Get
+ End Property
+
+ Public ReadOnly Property ExitParTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 52)
+ End Get
+ End Property
+
+ Public ReadOnly Property TypeTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 53)
+ End Get
+ End Property
+
+ Public ReadOnly Property CoolantTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 54)
+ End Get
+ End Property
+
+ Public ReadOnly Property CornRadTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 55)
+ End Get
+ End Property
+
+ Public ReadOnly Property DiamTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 56)
+ End Get
+ End Property
+
+ Public ReadOnly Property TotDiamTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 57)
+ End Get
+ End Property
+
+ Public ReadOnly Property FeedTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 58)
+ End Get
+ End Property
+
+ Public ReadOnly Property EndFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 59)
+ End Get
+ End Property
+
+ Public ReadOnly Property StartFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 60)
+ End Get
+ End Property
+
+ Public ReadOnly Property TipFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 61)
+ End Get
+ End Property
+
+ Public ReadOnly Property LenTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 62)
+ End Get
+ End Property
+
+ Public ReadOnly Property TotLenTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 63)
+ End Get
+ End Property
+
+ Public ReadOnly Property MaxMatTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 64)
+ End Get
+ End Property
+
+ Public ReadOnly Property LonOffsetTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 65)
+ End Get
+ End Property
+
+ Public ReadOnly Property RadOffsetTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 66)
+ End Get
+ End Property
+
+ Public ReadOnly Property SpeedTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 67)
+ End Get
+ End Property
+
+ Public ReadOnly Property SideAngTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 68)
+ End Get
+ End Property
+
+ Public ReadOnly Property MaxSpeedTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 69)
+ End Get
+ End Property
+
+ Public ReadOnly Property ThickTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 70)
+ End Get
+ End Property
+
+ Public ReadOnly Property MaxAbsorptionTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 71)
+ End Get
+ End Property
+
+ Public ReadOnly Property MinFeedTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 72)
+ End Get
+ End Property
+
+ Public ReadOnly Property DrawTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 73)
+ End Get
+ End Property
+
+ Public ReadOnly Property HeadTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 74)
+ End Get
+ End Property
+
+ Public ReadOnly Property NameParTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 75)
+ End Get
+ End Property
+
+ Public ReadOnly Property UserNotesTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 76)
+ End Get
+ End Property
+
+ Public ReadOnly Property TcPosTxBl As String
+ Get
+ Return EgtMsg(MSG_TOOLSDBPAGE + 77)
+ End Get
+ End Property
+
+ '''
+ ''' Constructor
+ '''
+ Sub New()
+ ' leggo direttorio toolmakers
+ GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", IniFile.m_sToolMakersDir)
+
+ Me.sTabName = EgtMsg(MSG_MAINWINDOW + 3)
+ SearchMachine()
+
+ Application.Msn.Register(Application.REMOVETOOL, Sub(ToolToRemove As ToolTreeViewItem)
+ Remove(ToolToRemove)
+ End Sub)
+ ' Quando chiamato, disattiva tutti gli item dell'albero o li riattiva a seconda che ci sia o meno un errore
+ Application.Msn.Register(Application.ERRORONTOOL, Sub(WrongTool As ToolTreeViewItem)
+ For Each FamilyToolItem In ToolsList
+ If IsNothing(WrongTool) Then
+ FamilyToolItem.IsEnabled = True
+ Else
+ FamilyToolItem.IsEnabled = False
+ End If
+ For Each ToolItem In FamilyToolItem.Items
+ If IsNothing(WrongTool) Then
+ ToolItem.IsEnabled = True
+ ElseIf ToolItem IsNot WrongTool Then
+ ToolItem.IsEnabled = False
+ Else
+ ToolItem.IsEnabled = True
+ End If
+ Next
+ Next
+ End Sub)
+ End Sub
+
+ '''
+ ''' Method that search the machines in the correct folder and add to the MachinesList those valid.
+ '''
+ Private Sub SearchMachine()
+ Dim TempArray As String() = Directory.GetDirectories(IniFile.m_sMachinesRoot)
+ For i As Integer = 0 To TempArray.Count - 1
+ Dim MachinePathIni As String = TempArray(i) & "\" & Path.GetFileName(TempArray(i)) & ".ini"
+ If File.Exists(MachinePathIni) Then
+ m_MachinesList.Add(New Machine With {.Name = Path.GetFileName(TempArray(i)), .MachineDirPath = TempArray(i)})
+ End If
+ Next
+ End Sub
+
+ '''
+ ''' Class that create the association Name/IniPath for the machine's
+ '''
+ Class Machine
+
+ Private m_sName As String
+ Public Property Name As String
+ Get
+ Return m_sName
+ End Get
+ Set(value As String)
+ m_sName = value
+ End Set
+ End Property
+
+ Friend MachineDirPath As String
+
+ End Class
+
+ '''
+ ''' Method that search tools for the currently selected Machine and add it to the ToolsList.
+ '''
+ Private Sub LoadSelectedMachineTools()
+ Dim ActiveToolsFamilies() As ToolsFamily = ReadActiveToolsFamilies()
+ For Each ToolsFamily In ActiveToolsFamilies
+ Dim FamilyTreeView As New FamilyToolTreeViewItem(ToolsFamily.FamilyName, ToolsFamily.FamilyId)
+ ToolsList.Add(FamilyTreeView)
+ Dim nType As Integer = 0
+ Dim ToolName As String = String.Empty
+ If EgtTdbGetFirstTool(ToolsFamily.FamilyId, ToolName, nType) Then
+ FamilyTreeView.Items.Add(New ToolTreeViewItem(ToolName))
+ While EgtTdbGetNextTool(ToolsFamily.FamilyId, ToolName, nType)
+ FamilyTreeView.Items.Add(New ToolTreeViewItem(ToolName))
+ End While
+ End If
+ Next
+ ' Se esiste almeno una famiglia di utensili, la seleziono
+ If ToolsList.Count > 0 Then
+ ToolsList(0).IsSelected = True
+ ToolsList(0).NotifyPropertyChanged("IsSelected")
+ End If
+ End Sub
+
+ '''
+ ''' Method that search the machines in the correct folder and add to the MachinesList those valid.
+ '''
+ Private Function ReadActiveToolsFamilies() As ToolsFamily()
+ Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.DRILLBIT, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 1)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.SAWBLADE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 2)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MILL, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 3)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MORTISE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 4)})
+ End If
+ If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
+ ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.COMPO, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 5)})
+ End If
+ Return ActiveToolsFamiliesList.ToArray
+ End Function
+
+ '''
+ ''' Structure that represent a tool's family, containing family type and family name
+ '''
+ Structure ToolsFamily
+
+ Friend FamilyId As MCH_TF
+ Friend FamilyName As String
+
+ End Structure
+
+#Region "NewCommand"
+
+ '''
+ ''' Returns a command that create a new tool.
+ '''
+ Public ReadOnly Property NewCommand As ICommand
+ Get
+ If m_cmdNew Is Nothing Then
+ m_cmdNew = New RelayCommand(AddressOf NewPar, AddressOf CanNew)
+ End If
+ Return m_cmdNew
+ End Get
+ End Property
+
+ '''
+ ''' Creata the new tool. This method is invoked by the NewCommand.
+ '''
+ Public Sub NewPar(ByVal param As Object)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ ' Verifico se sia selezionata una famiglia
+ Dim NewToolItem As ToolTreeViewItem
+ If TypeOf param Is FamilyToolTreeViewItem Then
+ Dim ToolFamily As FamilyToolTreeViewItem = DirectCast(param, FamilyToolTreeViewItem)
+ Dim NewName As String = ToolFamily.Name
+ EgtTdbGetToolNewName(NewName)
+ If EgtTdbAddTool(NewName, ToolFamily.ToolType) Then
+ NewToolItem = New ToolTreeViewItem(NewName)
+ ToolFamily.Items.Add(NewToolItem)
+ EgtTdbSaveCurrTool()
+ NewToolItem.NewTool = True
+ If Not ToolFamily.IsExpanded Then ToolFamily.IsExpanded = True
+ ToolFamily.IsSelected = False
+ ToolFamily.NotifyPropertyChanged("IsSelected")
+ NewToolItem.IsSelected = True
+ NewToolItem.NotifyPropertyChanged("IsSelected")
+ End If
+ ' Verifico se sia selezionato un utensile
+ ElseIf TypeOf param Is ToolTreeViewItem Then
+ Dim ToolCopied As ToolTreeViewItem = DirectCast(param, ToolTreeViewItem)
+ Dim NewName As String = ToolCopied.Name
+ EgtTdbGetToolNewName(NewName)
+ If EgtTdbCopyTool(ToolCopied.Name, NewName) Then
+ Dim CurrType As Integer
+ EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
+ For Each ToolFamily In ToolsList
+ If (ToolFamily.ToolType And CurrType) <> 0 Then
+ NewToolItem = New ToolTreeViewItem(NewName)
+ ToolFamily.Items.Add(NewToolItem)
+ EgtTdbSaveCurrTool()
+ NewToolItem.IsSelected = True
+ NewToolItem.NotifyPropertyChanged("IsSelected")
+ Exit For
+ End If
+ Next
+ End If
+ End If
+
+ End Sub
+
+ '''
+ ''' Returns true if the selected treeviewitem is valid for new tool creation.
+ '''
+ Private Function CanNew(ByVal param As Object) As Boolean
+ ' Verifico se sia selezionata una famiglia
+ If TypeOf param Is FamilyToolTreeViewItem Then
+ Return True
+ ' Verifico se sia selezionato un utensile
+ ElseIf TypeOf param Is ToolTreeViewItem Then
+ ' Verifico che i parametri dell'utensile siano validi
+ Return DirectCast(param, ToolTreeViewItem).IsValid
+ Else
+ Return False
+ End If
+ End Function
+
+#End Region ' NewCommand
+
+#Region "SaveCommand"
+
+ '''
+ ''' Returns a command that save the current selected tool.
+ '''
+ Public ReadOnly Property SaveCommand() As ICommand
+ Get
+ If m_cmdSave Is Nothing Then
+ m_cmdSave = New RelayCommand(AddressOf Save, AddressOf CanSave)
+ End If
+ Return m_cmdSave
+ End Get
+ End Property
+
+ '''
+ ''' Saves the current tool. This method is invoked by the SaveCommand.
+ '''
+ Public Sub Save(ByVal param As Object)
+ EgtTdbSaveCurrTool()
+ EgtTdbSave()
+ End Sub
+
+ '''
+ ''' Returns true if the selected tool is valid and can be saved.
+ '''
+ Private Function CanSave(ByVal param As Object) As Boolean
+ ' Verifico che sia selezionato un utensile
+ If TypeOf param Is ToolTreeViewItem Then
+ ' Verifico che i parametri dell'utensile siano validi
+ Return DirectCast(param, ToolTreeViewItem).IsValid And EgtTdbIsCurrToolModified()
+ Else
+ Return False
+ End If
+ End Function
+
+#End Region ' SaveCommand
+
+#Region "RemoveCommand"
+
+ '''
+ ''' Returns a command that remove the current selected tool.
+ '''
+ Public ReadOnly Property RemoveCommand() As ICommand
+ Get
+ If m_cmdRemove Is Nothing Then
+ m_cmdRemove = New RelayCommand(AddressOf Remove, AddressOf CanRemove)
+ End If
+ Return m_cmdRemove
+ End Get
+ End Property
+
+ '''
+ ''' Remove the current selected tools from Db and TreeView. This method is invoked by the RemoveCommand.
+ '''
+ Public Sub Remove(ByVal param As Object)
+ Dim ToolToRemove As ToolTreeViewItem = DirectCast(param, ToolTreeViewItem)
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ ' Cancello disegno dell'utensile
+ EraseToolDraw()
+ ' Salvo il tipo di utensile per poterlo cancellare
+ Dim ToolType As Integer = ToolToRemove.Type
+ ' Cancello l'utensile
+ EgtTdbRemoveTool(ToolToRemove.Name)
+ ' Rimuovo il nome dell'albero
+ For Each ToolFamily In ToolsList
+ If (ToolFamily.ToolType And ToolType) <> 0 Then
+ ToolFamily.Items.Remove(ToolToRemove)
+ End If
+ Next
+ Application.Msn.NotifyColleagues(Application.ERRORONTOOL, Nothing)
+ End Sub
+
+ '''
+ ''' Returns true if the selected tool can be removed.
+ '''
+ Private Function CanRemove(ByVal param As Object) As Boolean
+ ' Verifico se sia selezionata una famiglia
+ If TypeOf param Is FamilyToolTreeViewItem Then
+ Return False
+ ' Verifico se sia selezionato un utensile
+ ElseIf TypeOf param Is ToolTreeViewItem Then
+ ' Verifico che i parametri dell'utensile siano validi
+ Return True
+ Else
+ Return False
+ End If
+ End Function
+
+ Private Function EraseToolDraw() As Boolean
+ ' nome e direttorio del file da cancellare
+ EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
+ Dim sDrawName As String = String.Empty
+ EgtTdbGetCurrToolParam(MCH_TP.DRAW, sDrawName)
+ Dim sPath As String = String.Empty
+ EgtTdbGetToolDir(sPath)
+ sPath = sPath & "\" & sDrawName
+ ' se esiste lo cancello
+ Try
+ If My.Computer.FileSystem.FileExists(sPath) Then
+ My.Computer.FileSystem.DeleteFile(sPath)
+ End If
+ Return True
+ Catch ex As Exception
+ Return False
+ End Try
+ End Function
+
+
+#End Region ' RemoveCommand
+
+ End Class
+
+End Namespace
\ No newline at end of file
diff --git a/Utility.vb b/Utility.vb
new file mode 100644
index 0000000..c487194
--- /dev/null
+++ b/Utility.vb
@@ -0,0 +1,85 @@
+Imports System.Collections.ObjectModel
+Imports System.Globalization
+Imports EgtUILib
+
+Public Module Utility
+
+ Friend Const ToolDrawUUIDName As String = "***********"
+
+ Friend Function DoubleToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
+ Dim sFormat As String = "F" + Math.Abs(nNumDec).ToString()
+ Dim sVal As String = dVal.ToString(sFormat, CultureInfo.InvariantCulture)
+ If nNumDec > 0 Then
+ Return sVal.TrimEnd("0".ToCharArray()).TrimEnd(".".ToCharArray)
+ Else
+ Return sVal
+ End If
+ End Function
+
+ Friend Function StringToDouble(ByVal sVal As String, ByRef dVal As Double) As Boolean
+ Return EgtLuaEvalNumExpr(sVal, dVal)
+ End Function
+
+ Friend Function LenToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
+ Return DoubleToString(EgtToUiUnits(dVal), nNumDec)
+ End Function
+
+ Friend Function StringToLen(ByVal sVal As String, ByRef dVal As Double) As Boolean
+ If EgtLuaEvalNumExpr(sVal, dVal) Then
+ dVal = EgtFromUiUnits(dVal)
+ Return True
+ Else
+ Return False
+ End If
+ End Function
+
+ Friend Function IsUUID(UUID As String) As Boolean
+ Dim result As Guid
+ Return Guid.TryParse(UUID, result)
+ End Function
+
+ Public Structure IdNameStruct
+
+ Private m_Id As Integer
+ Public Property Id As Integer
+ Get
+ Return m_Id
+ End Get
+ Set(value As Integer)
+ m_Id = value
+ End Set
+ End Property
+
+ Private m_Name As String
+ Public Property Name As String
+ Get
+ Return m_Name
+ End Get
+ Set(value As String)
+ m_Name = value
+ End Set
+ End Property
+
+ Sub New(Id As Integer, Name As String)
+ m_Id = Id
+ m_Name = Name
+ End Sub
+
+ Public Overrides Function ToString() As String
+ Return Name
+ End Function
+
+ Friend Shared Function SearchToId(Id As Integer, List As ObservableCollection(Of IdNameStruct)) As Integer
+ For i = 0 To List.Count - 1
+ If List(i).Id = Id Then Return i
+ Next
+ Return 0
+ End Function
+
+ Friend Shared Function SearchFromId(Id As Integer, List As ObservableCollection(Of IdNameStruct)) As Integer
+ Return List(Id).Id
+ End Function
+
+ End Structure
+
+End Module
diff --git a/app.config b/app.config
new file mode 100644
index 0000000..843d111
--- /dev/null
+++ b/app.config
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+