bca8754b82
- Migliorie varie.
78 lines
2.1 KiB
VB.net
78 lines
2.1 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
|
|
|
|
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(CurrColor.A, CurrColor.R, CurrColor.G, CurrColor.B))
|
|
End Sub
|
|
|
|
Sub New(Id As Integer, Name As String)
|
|
MyBase.New(Name)
|
|
End Sub
|
|
|
|
End Class
|