- nuova grafica per simulazione
- introdotta possibilita' di muovere coordinate macchina in simulazione - introduzione nuova EgtTextBox2 - nuova grafica per ControllerInputPanel - nuovo componente che gestisce visibilita' macchina - gestita stop e uscita da simulazione su chiusura programma -
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class SimulationPanelVM
|
||||
@@ -8,12 +6,6 @@ Public Class SimulationPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum MachViews As Integer
|
||||
TOOL = 0
|
||||
HEAD = 1
|
||||
MACHINE = 2
|
||||
End Enum
|
||||
|
||||
Private m_dPrevAngVertDegView As Double
|
||||
Private m_dPrevAngHorizDegView As Double
|
||||
|
||||
@@ -28,50 +20,9 @@ Public Class SimulationPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MachViewList As New List(Of String)({"Tool", "Head", "Machine"})
|
||||
Public ReadOnly Property MachViewList As List(Of String)
|
||||
Get
|
||||
Return m_MachViewList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSelMachView As MachViews
|
||||
Public Property nSelMachView As Integer
|
||||
Get
|
||||
Return m_nSelMachView
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nSelMachView = value
|
||||
Select Case m_nSelMachView
|
||||
Case MachViews.TOOL
|
||||
ToolMode()
|
||||
Case MachViews.HEAD
|
||||
HeadMode()
|
||||
Case MachViews.MACHINE
|
||||
MachMode()
|
||||
End Select
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetSelMachView(value As MachViews)
|
||||
nSelMachView = value
|
||||
NotifyPropertyChanged(NameOf(nSelMachView))
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdToolMode As ICommand
|
||||
Private m_cmdHeadMode As ICommand
|
||||
Private m_cmdMachMode As ICommand
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property MachViewMsg As String
|
||||
Get
|
||||
Return "View"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
@@ -101,8 +52,6 @@ Public Class SimulationPanelVM
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
Map.SetRefSimulationPanelVM(Me)
|
||||
MySimul = New MySimulation
|
||||
' leggo vista macchina da ini e la imposto
|
||||
SetSelMachView(MachViews.MACHINE)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -242,93 +191,6 @@ Public Class SimulationPanelVM
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
#Region "ToolModeCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that create a new tool.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ToolModeCommand As ICommand
|
||||
Get
|
||||
If m_cmdToolMode Is Nothing Then
|
||||
m_cmdToolMode = New Command(AddressOf ToolMode)
|
||||
End If
|
||||
Return m_cmdToolMode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Creata the new tool. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Sub ToolMode()
|
||||
' aggiorno lo stato
|
||||
If MySimul.GetMachLook() <> MCH_LOOK.TAB_TOOL Then
|
||||
MySimul.SetMachLook(MCH_LOOK.TAB_TOOL)
|
||||
End If
|
||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||
EgtSetMachineLook(MySimul.GetMachLook())
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' ToolModeCommand
|
||||
|
||||
#Region "HeadModeCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that create a new tool.
|
||||
''' </summary>
|
||||
Public ReadOnly Property HeadModeCommand As ICommand
|
||||
Get
|
||||
If m_cmdHeadMode Is Nothing Then
|
||||
m_cmdHeadMode = New Command(AddressOf HeadMode)
|
||||
End If
|
||||
Return m_cmdHeadMode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Creata the new tool. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Sub HeadMode()
|
||||
' aggiorno lo stato
|
||||
If MySimul.GetMachLook() <> MCH_LOOK.TAB_HEAD Then
|
||||
MySimul.SetMachLook(MCH_LOOK.TAB_HEAD)
|
||||
End If
|
||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||
EgtSetMachineLook(MySimul.GetMachLook())
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' HeadModeCommand
|
||||
|
||||
#Region "MachModeCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that create a new tool.
|
||||
''' </summary>
|
||||
Public ReadOnly Property MachModeCommand As ICommand
|
||||
Get
|
||||
If m_cmdMachMode Is Nothing Then
|
||||
m_cmdMachMode = New Command(AddressOf MachMode)
|
||||
End If
|
||||
Return m_cmdMachMode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Creata the new tool. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Sub MachMode()
|
||||
' aggiorno lo stato
|
||||
If MySimul.GetMachLook() <> MCH_LOOK.ALL Then
|
||||
MySimul.SetMachLook(MCH_LOOK.ALL)
|
||||
End If
|
||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||
EgtSetMachineLook(MySimul.GetMachLook())
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' MachModeCommand
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user