Files
omagoffice/OptionPanel/SimulTab/MachineAxis.vb
T
DarioS 2d39dcacc3 OmagOFFICE 2.3k1 :
- modifiche per escludere spessore sovratavola da scalatura foto fatte con CameraMng
- all'esportazione verso la macchina le foto vengono rese non più scalabili per lo spessore pezzo (come gli scan)
- corretta scrittura dati in interfaccia per problema decimali che falsano la posizione del cursore.
2021-11-16 06:37:37 +01:00

116 lines
2.7 KiB
VB.net

Imports System.ComponentModel
Imports EgtUILib
Public Class MachineAxis
Inherits VMBase
Private m_IsReadOnlyAxesValue As Boolean
Public Property IsReadOnlyAxesValue As Boolean
Get
Return m_IsReadOnlyAxesValue
End Get
Set(value As Boolean)
If value <> m_IsReadOnlyAxesValue Then
m_IsReadOnlyAxesValue = value
NotifyPropertyChanged("IsReadOnlyAxesValue")
NotifyPropertyChanged("IsEnabledAxesValue")
End If
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
End Set
End Property
Private m_Token As String
Public Property Token As String
Get
Return m_Token
End Get
Set(value As String)
If value <> m_Token Then
m_Token = value
NotifyPropertyChanged("Token")
End If
End Set
End Property
Private m_Linear As Boolean
Public WriteOnly Property Linear As Boolean
Set(value As Boolean)
m_Linear = value
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
Sub New()
IsReadOnlyAxesValue = True
End Sub
#Region "COMMANDS"
#Region "ManualAxisModifyCommand"
''' <summary>
''' Returns a command that create a new tool.
''' </summary>
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
''' <summary>
''' Creata the new tool. This method is invoked by the NewCommand.
''' </summary>
Public Sub ManualAxisModify(ByVal param As Object)
Dim dVal As Double
If m_Linear Then
StringToLen(m_Value, dVal)
Else
StringToDouble(m_Value, dVal)
End If
EgtSetAxisPos(m_Name, dVal)
EgtGetAxisPos(m_Name, dVal)
If m_Linear Then
Value = LenToString(dVal, 3)
Else
Value = DoubleToString(dVal, 3)
End If
EgtDraw()
End Sub
#End Region ' ManualAxisModifyCommand
#End Region
End Class