-pulizia codice
This commit is contained in:
@@ -504,8 +504,40 @@ Public Class ScriptWindowVM
|
||||
SyntaxHighlighting(Map.refScriptWindowV.sNameFile_RichTxBx)
|
||||
End Sub
|
||||
|
||||
Public Sub ChangeTimer()
|
||||
If Not IsNothing(Map.refScriptWindowVM) AndAlso textChangedTimer Is Nothing Then
|
||||
textChangedTimer = New DispatcherTimer()
|
||||
textChangedTimer.Interval = TimeSpan.FromMilliseconds(500)
|
||||
AddHandler textChangedTimer.Tick, AddressOf OnTextChangedTimerTick
|
||||
End If
|
||||
|
||||
textChangedTimer.Stop()
|
||||
textChangedTimer.Start()
|
||||
End Sub
|
||||
|
||||
Public Sub Tabulation(ByVal sRichTextBox As RichTextBox)
|
||||
' Ottieni la posizione corrente del cursore
|
||||
Dim caretPosition As TextPointer = sRichTextBox.CaretPosition
|
||||
' Inserisci un carattere di tabulazione (3 spazi)
|
||||
Dim tabString As String = " "
|
||||
Dim run As New Run(tabString)
|
||||
Dim textRange As New TextRange(caretPosition, caretPosition)
|
||||
textRange.Text = tabString
|
||||
' Aggiorna la posizione del cursore
|
||||
sRichTextBox.CaretPosition = textRange.End
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub OnTextChangedTimerTick(sender As Object, e As EventArgs)
|
||||
textChangedTimer.Stop()
|
||||
ProcessTextChanges()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ConfermCmd"
|
||||
|
||||
Reference in New Issue
Block a user