EgtCAM5 1.9f1 :
- Aggiunta finestra di expander per stime tempi e lunghezze di lavorazione.
This commit is contained in:
@@ -67,6 +67,7 @@ Public Class SimulationExpanderVM
|
||||
End If
|
||||
InitializeSimulation()
|
||||
EgtDraw()
|
||||
Estimation_IsExpanded = False
|
||||
Else
|
||||
If m_bSimExecuting Then Return
|
||||
CloseSimulation()
|
||||
@@ -83,6 +84,30 @@ Public Class SimulationExpanderVM
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Estimation_IsExpanded As Boolean
|
||||
Public Property Estimation_IsExpanded As Boolean
|
||||
Get
|
||||
Return m_Estimation_IsExpanded
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_Estimation_IsExpanded Then
|
||||
If value Then
|
||||
EgtDeselectAll()
|
||||
Application.Msn.NotifyColleagues(Application.REMOVEMARKFROMLASTOPERATION)
|
||||
Application.Msn.NotifyColleagues(Application.GETDISTANCE_ISCHECKED, False)
|
||||
OnPropertyChanged("TotalTime")
|
||||
OnPropertyChanged("TotalLength")
|
||||
IsExpanded = False
|
||||
End If
|
||||
m_Estimation_IsExpanded = value
|
||||
Application.Msn.NotifyColleagues(Application.ESTIMATIONEXPANDER_GET_ISEXPANDED, value)
|
||||
OnPropertyChanged("Estimation_IsExpanded")
|
||||
OnPropertyChanged("GenerateIsEnabled")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GenerateIsEnabled As Boolean
|
||||
Get
|
||||
Return Not m_IsExpanded
|
||||
@@ -241,11 +266,35 @@ Public Class SimulationExpanderVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TotalTime As String
|
||||
Get
|
||||
Dim nTotalTime As Integer = 0
|
||||
EgtGetInfo(EgtGetCurrMachGroup(), "Ttot", nTotalTime)
|
||||
Dim sTotalTime As New TimeSpan(0, 0, nTotalTime)
|
||||
Return sTotalTime.ToString("hh\:mm\:ss")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TotalLength As String
|
||||
Get
|
||||
Dim dTotalLength As Double = 0
|
||||
EgtGetInfo(EgtGetCurrMachGroup(), "Ltot", dTotalLength)
|
||||
Dim sTotalLength As String = ""
|
||||
If EgtUiUnitsAreMM() Then
|
||||
sTotalLength = DoubleToString(dTotalLength / 1000, 1) & " m"
|
||||
Else
|
||||
sTotalLength = DoubleToString(dTotalLength / (ONEINCH * 12), 1) & " ft"
|
||||
End If
|
||||
Return sTotalLength
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdStep As ICommand
|
||||
Private m_cmdPlayPause As ICommand
|
||||
Private m_cmdStop As ICommand
|
||||
Private m_cmdGenerate As ICommand
|
||||
Private m_cmdDetails As ICommand
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
@@ -261,6 +310,29 @@ Public Class SimulationExpanderVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property EstimationMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SIMULATION + 40) 'Stime
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TotalTimeMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SIMULATION + 41) 'Tempo totale
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TotalLengthMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SIMULATION + 42) 'Lunghezza totale
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property DetailsMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SIMULATION + 43) 'Dettagli
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property VMillMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SIMULATION + 16) 'Virtual Milling
|
||||
@@ -302,6 +374,9 @@ Public Class SimulationExpanderVM
|
||||
Application.Msn.Register(Application.SIMULATIONEXPANDER_SET_ISEXPANDED, Sub(bValue As Boolean)
|
||||
IsExpanded = bValue
|
||||
End Sub)
|
||||
Application.Msn.Register(Application.ESTIMATIONSEXPANDER_SET_ISEXPANDED, Sub(bValue As Boolean)
|
||||
Estimation_IsExpanded = bValue
|
||||
End Sub)
|
||||
Application.Msn.Register(Application.SIMULATIONEXPANDER_UPDATE_CNCDATA, Sub()
|
||||
If IsExpanded Then
|
||||
ShowCncData()
|
||||
@@ -515,6 +590,30 @@ Public Class SimulationExpanderVM
|
||||
|
||||
#End Region ' GenerateCommand
|
||||
|
||||
#Region "Details"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that create a new tool.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Details_Command As ICommand
|
||||
Get
|
||||
If m_cmdDetails Is Nothing Then
|
||||
m_cmdDetails = New RelayCommand(AddressOf Details)
|
||||
End If
|
||||
Return m_cmdDetails
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Creata the new tool. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Sub Details(ByVal param As Object)
|
||||
Dim EstimationsWnd As New EstimationsDetailsWndV(Application.Current.MainWindow, New EstimationsDetailsWndVM("c:\Temp\0088_Mach01.html"))
|
||||
EstimationsWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Details
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Reference in New Issue
Block a user