156 lines
4.1 KiB
VB.net
156 lines
4.1 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports System.IO
|
|
Imports EgtBEAMWALL.Core
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class LeftPanelVM
|
|
Inherits VMBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Private m_MachGroupList As New ObservableCollection(Of MyMachGroupVM)
|
|
Public Property MachGroupList As ObservableCollection(Of MyMachGroupVM)
|
|
Get
|
|
Return m_MachGroupList
|
|
End Get
|
|
Set(value As ObservableCollection(Of MyMachGroupVM))
|
|
m_MachGroupList = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_SelMachGroup As MyMachGroupVM
|
|
Public Property SelMachGroup As MyMachGroupVM
|
|
Get
|
|
Return m_SelMachGroup
|
|
End Get
|
|
Set(value As MyMachGroupVM)
|
|
m_SelMachGroup = value
|
|
NotifyPropertyChanged(NameOf(SelMachGroup))
|
|
End Set
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdDeleteRawPart As ICommand
|
|
Private m_cmdMoveUpRawPart As ICommand
|
|
Private m_cmdMoveDownRawPart As ICommand
|
|
Private m_cmdCompletedRawPart As ICommand
|
|
|
|
#End Region 'FIELDS & PROPERTIES
|
|
|
|
Sub New()
|
|
' imposto riferimento su mappa
|
|
Map.SetRefLeftPanelVM(Me)
|
|
End Sub
|
|
|
|
#Region "METHODS"
|
|
|
|
Friend Sub UpdateView()
|
|
NotifyPropertyChanged("ViewPage_Visibility")
|
|
NotifyPropertyChanged("MachiningPage_Visibility")
|
|
End Sub
|
|
|
|
#End Region ' METHODS
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "CompletedRawPart"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property CompletedRawPart_Command As ICommand
|
|
Get
|
|
If m_cmdCompletedRawPart Is Nothing Then
|
|
m_cmdCompletedRawPart = New Command(AddressOf CompletedRawPart)
|
|
End If
|
|
Return m_cmdCompletedRawPart
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Sub CompletedRawPart()
|
|
If IsNothing(m_SelMachGroup) Then Return
|
|
DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, ItemState.Produced)
|
|
End Sub
|
|
|
|
#End Region ' CompletedRawPart
|
|
|
|
#Region "DeleteRawPart"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property DeleteRawPart_Command As ICommand
|
|
Get
|
|
If m_cmdDeleteRawPart Is Nothing Then
|
|
m_cmdDeleteRawPart = New Command(AddressOf DeleteRawPart)
|
|
End If
|
|
Return m_cmdDeleteRawPart
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Sub DeleteRawPart()
|
|
If IsNothing(m_SelMachGroup) Then Return
|
|
DbControllers.m_MachGroupController.UpdateSupervisor(1, m_SelMachGroup.Id, DbControllers.m_SupervisorId)
|
|
End Sub
|
|
|
|
#End Region ' DeleteRawPart
|
|
|
|
#Region "MoveUpRawPart"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property MoveUpRawPart_Command As ICommand
|
|
Get
|
|
If m_cmdMoveUpRawPart Is Nothing Then
|
|
m_cmdMoveUpRawPart = New Command(AddressOf MoveUpRawPart)
|
|
End If
|
|
Return m_cmdMoveUpRawPart
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Sub MoveUpRawPart()
|
|
If IsNothing(m_SelMachGroup) Then Return
|
|
DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, ItemState.Produced)
|
|
End Sub
|
|
|
|
#End Region ' MoveUpRawPart
|
|
|
|
#Region "MoveDownRawPart"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property MoveDownRawPart_Command As ICommand
|
|
Get
|
|
If m_cmdMoveDownRawPart Is Nothing Then
|
|
m_cmdMoveDownRawPart = New Command(AddressOf MoveDownRawPart)
|
|
End If
|
|
Return m_cmdMoveDownRawPart
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Sub MoveDownRawPart()
|
|
If IsNothing(m_SelMachGroup) Then Return
|
|
DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, ItemState.Produced)
|
|
End Sub
|
|
|
|
#End Region ' MoveDownRawPart
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|