-piccole modifiche

-aggiunto cambio colore testo
-sistemato salva
This commit is contained in:
Demetrio Cassarino
2025-01-21 15:37:59 +01:00
parent 668c2ef78b
commit 180bfa730e
13 changed files with 123 additions and 50 deletions
+40 -1
View File
@@ -1,11 +1,15 @@
Imports EgtWPFLib5
Imports EgtUILib
Imports System.Windows.Threading
Public Class SceneUserControlVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public m_Color_Timer As New DispatcherTimer
Public m_WaitAfterRender As Integer = 0
Private m_Title As String
Public Property Title As String
Get
@@ -80,6 +84,30 @@ Public Class SceneUserControlVM
ParamList.Add(Control)
End Sub
Public Sub ColorTimer_Tick()
If m_WaitAfterRender > 1 Then
DirectCast(ParamList(0), _TextBlockParam).Foreground_TxBl = Brushes.Black
m_Color_Timer.Stop()
ElseIf m_WaitAfterRender > 0 Then
m_WaitAfterRender += 1
End If
End Sub
''' <summary>
''' Funzione che permette di cambiare colore al foreground della textblock
''' </summary>
Public Sub ChangeTextColor()
DirectCast(ParamList(0), _TextBlockParam).Foreground_TxBl = Brushes.Blue
m_Color_Timer.Interval = New TimeSpan(0, 0, 0, 2, 0)
AddHandler m_Color_Timer.Tick, AddressOf ColorTimer_Tick
m_WaitAfterRender = 1
m_Color_Timer.Start()
End Sub
#End Region ' Methods
#Region "EVENTS"
' Event handler for checkbox CheckedChanged
Public Overridable Sub OnCheckboxCheckedChanged(sender As Object, CheckState As Boolean)
End Sub
@@ -90,7 +118,7 @@ Public Class SceneUserControlVM
Public Overridable Sub OnTextboxTextChanged(sender As Object, Text As String)
End Sub
#End Region ' Methods
#End Region ' Events
#Region "COMMANDS"
@@ -246,6 +274,17 @@ Public Class _TextBlockParam
End Set
End Property
Private m_Foreground_TxBl As Brush = Brushes.Black
Public Property Foreground_TxBl As Brush
Get
Return m_Foreground_TxBl
End Get
Set(value As Brush)
m_Foreground_TxBl = value
NotifyPropertyChanged(NameOf(Foreground_TxBl))
End Set
End Property
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"