Imports System.ComponentModel Imports EgtUILib Public Class MachineAxis Implements INotifyPropertyChanged Private m_IsReadOnlyAxesValue As Boolean Public Property IsReadOnlyAxesValue As Boolean Get NotifyPropertyChanged("IsEnabledAxesValue") Return m_IsReadOnlyAxesValue End Get Set(value As Boolean) m_IsReadOnlyAxesValue = value NotifyPropertyChanged("IsReadOnlyAxesValue") End Set End Property Public ReadOnly Property IsEnabledAxesValue As Boolean Get Return Not m_IsReadOnlyAxesValue End Get End Property ' Definizione comandi Private m_cmdManualAxisModify As ICommand Private m_Name As String Public Property Name As String Get Return m_Name End Get Set(value As String) m_Name = value NotifyPropertyChanged("Name") End Set End Property Private m_Value As String Public Property Value As String Get Return m_Value End Get Set(value As String) m_Value = value NotifyPropertyChanged("Value") End Set End Property #Region "COMMANDS" #Region "ManualAxisModifyCommand" ''' ''' Returns a command that create a new tool. ''' Public ReadOnly Property ManualAxisModifyCommand As ICommand Get If m_cmdManualAxisModify Is Nothing Then m_cmdManualAxisModify = New Command(AddressOf ManualAxisModify) End If Return m_cmdManualAxisModify End Get End Property ''' ''' Creata the new tool. This method is invoked by the NewCommand. ''' Public Sub ManualAxisModify(ByVal param As Object) Dim dVal As Double StringToDouble(m_Value, dVal) EgtSetAxisPos(m_Name, dVal) EgtDraw() End Sub #End Region ' ManualAxisModifyCommand #End Region Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged Public Sub NotifyPropertyChanged(propName As String) RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName)) End Sub End Class