a5be2180ea
- aggiunti nome e path del progetto - gestito bordo della finestra che sparisce quando massimizzata - creata finestra UpdateMachine al posto di MachineBox
109 lines
2.2 KiB
VB.net
109 lines
2.2 KiB
VB.net
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
Imports System.Collections.ObjectModel
|
|
Imports System.Windows.Forms
|
|
|
|
Public Class UpdateMachineVM
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Friend Event m_CloseWindow(bDialogResult As MessageBoxResult)
|
|
|
|
Private m_MachineName As String = ""
|
|
|
|
#Region "MESSAGES"
|
|
|
|
Public ReadOnly Property UpdateMachine_Msg As String
|
|
Get
|
|
Return String.Format(EgtMsg(6528), m_MachineName) ' La macchina "{0}" esiste già,<br/> cosa vuoi fare ?
|
|
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Replace_Msg As String
|
|
Get
|
|
Return EgtMsg(6531) ' Sostituisci
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Update_Msg As String
|
|
Get
|
|
Return EgtMsg(6532) ' Aggiorna
|
|
End Get
|
|
End Property
|
|
|
|
|
|
#End Region ' MESSAGES
|
|
|
|
' Definizione comandi
|
|
Private m_cmdReplace As ICommand
|
|
Private m_cmdUpdate As ICommand
|
|
Private m_cmdCancel As ICommand
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New(MachineName As String)
|
|
m_MachineName = MachineName
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "Replace"
|
|
|
|
Public ReadOnly Property Replace_Command As ICommand
|
|
Get
|
|
If m_cmdReplace Is Nothing Then
|
|
m_cmdReplace = New Command(AddressOf Replace)
|
|
End If
|
|
Return m_cmdReplace
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub Replace()
|
|
RaiseEvent m_CloseWindow(MessageBoxResult.Yes)
|
|
End Sub
|
|
|
|
#End Region ' Replace
|
|
|
|
#Region "Update"
|
|
|
|
Public ReadOnly Property Update_Command As ICommand
|
|
Get
|
|
If m_cmdUpdate Is Nothing Then
|
|
m_cmdUpdate = New Command(AddressOf Update)
|
|
End If
|
|
Return m_cmdUpdate
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub Update()
|
|
RaiseEvent m_CloseWindow(MessageBoxResult.No)
|
|
End Sub
|
|
|
|
#End Region ' Update
|
|
|
|
#Region "Cancel"
|
|
|
|
Public ReadOnly Property Cancel_Command As ICommand
|
|
Get
|
|
If m_cmdCancel Is Nothing Then
|
|
m_cmdCancel = New Command(AddressOf Cancel)
|
|
End If
|
|
Return m_cmdCancel
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub Cancel()
|
|
RaiseEvent m_CloseWindow(MessageBoxResult.Cancel)
|
|
End Sub
|
|
|
|
#End Region ' Replace
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|