-aggiunto svg per script
-sistemato dizionario -sistemato rimozione del testo su invio
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class ScriptWindowVM
|
||||
Inherits VMBase
|
||||
@@ -27,7 +28,6 @@ Public Class ScriptWindowVM
|
||||
Return m_sRichTextParagraph
|
||||
End Get
|
||||
Set(value As String)
|
||||
'm_sRichTextParagraph = StringFromRichTextBox(Map.refScriptWindowV.sNameFile_RichTxBx)
|
||||
m_sRichTextParagraph = value
|
||||
NotifyPropertyChanged(NameOf(sRichTextParagraph))
|
||||
End Set
|
||||
@@ -201,6 +201,20 @@ Public Class ScriptWindowVM
|
||||
NotifyPropertyChanged(NameOf(FileAlignCenterSVG))
|
||||
End Sub
|
||||
|
||||
Private m_FileAlignJustifySVG As String = String.Empty
|
||||
Public Property FileAlignJustifySVG As String
|
||||
Get
|
||||
Return m_FileAlignJustifySVG
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_FileAlignJustifySVG = value
|
||||
NotifyPropertyChanged(NameOf(FileAlignJustifySVG))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFileAlignJustifySVG(sFileAlignJustifySVG As String)
|
||||
m_FileAlignJustifySVG = sFileAlignJustifySVG
|
||||
NotifyPropertyChanged(NameOf(FileAlignJustifySVG))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
@@ -251,6 +265,7 @@ Public Class ScriptWindowVM
|
||||
|
||||
SetFileAlignLeftSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\alignleft.svg")
|
||||
SetFileAlignCenterSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\aligncenter.svg")
|
||||
SetFileAlignJustifySVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\alignjustify.svg")
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -360,6 +375,22 @@ Public Class ScriptWindowVM
|
||||
m_bJustifyIsChecked = textRange.GetPropertyValue(FlowDocument.TextAlignmentProperty).Equals(TextAlignment.Justify)
|
||||
End Sub
|
||||
|
||||
Public Sub InsertText(ByVal rtb As RichTextBox, ByVal content As String)
|
||||
If Not String.IsNullOrEmpty(content) Then
|
||||
rtb?.BeginChange()
|
||||
|
||||
If Not String.IsNullOrEmpty(rtb.Selection.Text) Then
|
||||
rtb.Selection.Text = String.Empty
|
||||
End If
|
||||
|
||||
Dim tp = rtb.CaretPosition.GetPositionAtOffset(0, LogicalDirection.Forward)
|
||||
rtb.CaretPosition.InsertTextInRun(content)
|
||||
rtb.CaretPosition = tp
|
||||
rtb.EndChange()
|
||||
Keyboard.Focus(rtb)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
Reference in New Issue
Block a user