45cbfa745f
- Miglioramenti Db utensili.
115 lines
3.5 KiB
VB.net
115 lines
3.5 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
|
|
Public Class LayerTreeViewItem
|
|
Inherits TreeViewItemBase
|
|
|
|
Private m_Id As Integer
|
|
Public ReadOnly Property Id As Integer
|
|
Get
|
|
Return m_Id
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that determines if the Tool is selected or not
|
|
''' </summary>
|
|
Public Overrides Property IsSelected As Boolean
|
|
Get
|
|
Return m_IsSelected
|
|
End Get
|
|
Set(value As Boolean)
|
|
If (value <> m_IsSelected) Then
|
|
m_IsSelected = value
|
|
If value Then
|
|
' recupero l'Id del nuovo oggetto selezionato
|
|
Application.Msn.NotifyColleagues(Application.UPDATEOBJINOBJTREE, Me.Id)
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsRightSelected As Boolean
|
|
''' <summary>
|
|
''' Property that determines if the Tool is selected or not
|
|
''' </summary>
|
|
Public Property IsRightSelected As Boolean
|
|
Get
|
|
Return m_IsRightSelected
|
|
End Get
|
|
Set(value As Boolean)
|
|
' In realtà il valore di value è insignificante perchè la cosa importante è che il click esegua questo Set
|
|
m_IsRightSelected = value
|
|
Application.Msn.NotifyColleagues(Application.RIGHTCLICKEDLAYERTREEITEM, Me.Id)
|
|
'If value Then
|
|
' ' recupero l'Id del nuovo oggetto selezionato
|
|
' Application.Msn.NotifyColleagues(Application.UPDATEOBJINOBJTREE, Me.Id)
|
|
'End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Items As New ObservableCollection(Of LayerTreeViewItem)
|
|
Public Property Items As ObservableCollection(Of LayerTreeViewItem)
|
|
Get
|
|
Return m_Items
|
|
End Get
|
|
Set(value As ObservableCollection(Of LayerTreeViewItem))
|
|
m_Items = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_OnOff As Boolean
|
|
Public Property OnOff As Boolean
|
|
Get
|
|
Return m_OnOff
|
|
End Get
|
|
Set(value As Boolean)
|
|
If m_OnOff <> value Then
|
|
m_OnOff = value
|
|
' eseguo operazione
|
|
Application.Msn.NotifyColleagues(Application.SETLASTINTEGER, Id)
|
|
If value Then
|
|
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SHOW)
|
|
Else
|
|
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.HIDE)
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_sPictureString As String
|
|
Public Property PictureString As String
|
|
Get
|
|
Return m_sPictureString
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sPictureString Then
|
|
m_sPictureString = value
|
|
NotifyPropertyChanged("PictureString")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_LayerColor As SolidColorBrush
|
|
Public Property LayerColor As SolidColorBrush
|
|
Get
|
|
Return m_LayerColor
|
|
End Get
|
|
Set(value As SolidColorBrush)
|
|
m_LayerColor = value
|
|
End Set
|
|
End Property
|
|
|
|
Sub New(Id As Integer, Name As String, Image As String, CurrColor As Color3d)
|
|
MyBase.New(Name)
|
|
Me.m_Id = Id
|
|
Me.PictureString = Image
|
|
Me.LayerColor = New SolidColorBrush(Color.FromArgb(CByte(CurrColor.A), CByte(CurrColor.R), CByte(CurrColor.G), CByte(CurrColor.B)))
|
|
End Sub
|
|
|
|
Sub New(Id As Integer, Name As String)
|
|
MyBase.New(Name)
|
|
End Sub
|
|
|
|
End Class
|