Files
EgtWPFLib5/Note/NoteListBoxItem.vb
T
Demetrio Cassarino 027215ff8b -aggiunto coltrollo su valore note uguale;
- aggiunto controllo su pulsante cambio colore
2024-05-13 14:39:25 +02:00

120 lines
2.8 KiB
VB.net

Public Class NoteListBoxItem
Inherits VMBase
#Region "FIELD & PROPERTIES"
Private WithEvents m_IsModified As MachiningTreeViewItem
' Indice dei valori nel file Note.ini
Friend m_Id As Integer
Public Property Id As Integer
Get
Return m_Id
End Get
Set(value As Integer)
m_Id = value
End Set
End Property
' Tipo del valore che può essere b = boolean, d = double, l=lenght
Friend m_Type As String
Public Property Type As String
Get
Return m_Type
End Get
Set(value As String)
m_Type = value
End Set
End Property
' Descrizione
Friend m_Description As String
Public Property Description As String
Get
Return m_Description
End Get
Set(value As String)
m_Description = value
End Set
End Property
Public m_IsModifiedValue As Boolean = False
Public Property IsModifiedValue As Boolean
Get
Return m_IsModifiedValue
End Get
Set(value As Boolean)
m_IsModifiedValue = value
NotifyPropertyChanged(NameOf(IsModifiedValue))
End Set
End Property
' Valore di default 0
Friend m_Value As String
Public Property Value As String
Get
Return m_Value
End Get
Set(value As String)
m_IsModifiedValue = True
NotifyPropertyChanged(NameOf(IsModifiedValue))
m_Value = value
LibMap.refMachiningTreeViewItem.IsModifiedNote(Me)
End Set
End Property
' Indice di selezione del tab per la scelta grafica se 0 viene mostrata la textbox se 1 la combobox
Friend m_SelTypeValue As Integer = 0
Public Property SelTypeValue As Integer
Get
Return m_SelTypeValue
End Get
Set(value As Integer)
m_SelTypeValue = value
End Set
End Property
' Comandi
Private m_cmdRemoveNoteItem As ICommand
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(Id As Integer, Type As String, Description As String, Value As String)
m_Id = Id
m_Type = Type
m_Description = Description
m_Value = Value
End Sub
#End Region ' Constructor
#Region "COMMANDS"
#Region "RemoveItemNoteCommand"
Public ReadOnly Property RemoveItemNoteCommand As ICommand
Get
If m_cmdRemoveNoteItem Is Nothing Then
m_cmdRemoveNoteItem = New Command(AddressOf RemoveItemNote)
End If
Return m_cmdRemoveNoteItem
End Get
End Property
Public Sub RemoveItemNote(ByVal param As Object)
LibMap.refMachiningTreeViewItem.RemoveNote(Me)
End Sub
#End Region ' RemoveItemNoteCommand
#End Region ' Commands
Private Function IsModified() As Boolean Handles m_IsModified.m_IsModified
Return LibMap.refMachiningTreeViewItem.IsModified()
End Function
End Class