Files
icarus/Icarus/SliderManager/SliderManagerVM.vb
T
Emmanuele Sassi 0532c0c486 - cambio nome del progetto in Icarus
- gestione ribs completata
- nuove funzionalita' introdotte su tabella TFS
- correzioni e migliorie varie
2022-09-08 17:36:35 +02:00

125 lines
3.4 KiB
VB.net

Imports EgtUILib
Imports EgtWPFLib5
Public Class SliderManagerVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_nLayerIndex As Integer
Public Property nLayerIndex As Integer
Get
Return m_nLayerIndex
End Get
Set(value As Integer)
m_nLayerIndex = value
' ciclo tutti i layer per nasconderli/mostrarli
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
If Layer.nLayerIndex <= m_nLayerIndex Then
EgtSetStatus(Layer.nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
End If
Next
EgtDraw()
End Set
End Property
Private m_dLayerAdvancement As Double
Public Property dLayerAdvancement As Double
Get
Return m_dLayerAdvancement
End Get
Set(value As Double)
m_dLayerAdvancement = value
End Set
End Property
Private m_LayerIndex_Visibility As Visibility = Visibility.Collapsed
Public Property LayerIndex_Visibility As Visibility
Get
Return m_LayerIndex_Visibility
End Get
Set(value As Visibility)
m_LayerIndex_Visibility = value
End Set
End Property
Private m_LayerAdvancement_Visibility As Visibility = Visibility.Collapsed
Public Property LayerAdvancement_Visibility As Visibility
Get
Return m_LayerAdvancement_Visibility
End Get
Set(value As Visibility)
m_LayerAdvancement_Visibility = value
End Set
End Property
Private m_nLayerIndex_Minimum As Double
Public Property nLayerIndex_Minimum As Double
Get
Return m_nLayerIndex_Minimum
End Get
Set(value As Double)
m_nLayerIndex_Minimum = value
End Set
End Property
Private m_nLayerIndex_Maximum As Double
Public Property nLayerIndex_Maximum As Double
Get
Return m_nLayerIndex_Maximum
End Get
Set(value As Double)
m_nLayerIndex_Maximum = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefSliderManagerVM(Me)
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Friend Sub SetSliderVisibility(bValue As Boolean)
m_LayerIndex_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
m_LayerAdvancement_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(LayerIndex_Visibility))
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
End Sub
Friend Sub RefreshSlider(nMin As Integer, nMax As Integer)
m_nLayerIndex_Minimum = nMin
m_nLayerIndex_Maximum = nMax
NotifyPropertyChanged(NameOf(nLayerIndex_Minimum))
NotifyPropertyChanged(NameOf(nLayerIndex_Maximum))
nLayerIndex = m_nLayerIndex
End Sub
Friend Sub SetLayerIndexToMax()
nLayerIndex = m_nLayerIndex_Maximum
NotifyPropertyChanged(NameOf(nLayerIndex))
End Sub
Friend Sub SetLayerIndexToMin()
nLayerIndex = m_nLayerIndex_Minimum
NotifyPropertyChanged(NameOf(nLayerIndex))
End Sub
Friend Sub SetLayerIndexToZero()
nLayerIndex = 0
NotifyPropertyChanged(NameOf(nLayerIndex))
End Sub
#End Region ' METHODS
End Class