C2019-025_Ability-to-Toggle-Replace-Words

This commit is contained in:
Paul Larsen 2025-01-27 15:45:09 -05:00
parent 37c5b23a86
commit cf20704811

View File

@ -342,7 +342,7 @@ namespace Volian.Controls.Library
AddFontTable(selectedRtfSB, FormatFont, FontIsFixed(FormatFont)); AddFontTable(selectedRtfSB, FormatFont, FontIsFixed(FormatFont));
_RtfPrefix = selectedRtfSB.ToString(); _RtfPrefix = selectedRtfSB.ToString();
} }
return _RtfPrefix;// +@"{\colortbl ;\red255\green0\blue0;}";\\\red0\green0\blue255;}"; return _RtfPrefix;// +@"{\colortbl ;\red255\green0\blue0;}";
} }
} }
// August 5, 2009 - KBR & RHM: // August 5, 2009 - KBR & RHM:
@ -1284,7 +1284,7 @@ namespace Volian.Controls.Library
} }
selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}"; selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
if (!isFixed) if (!isFixed)
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); //\red0\green0\blue255;}"); // C2017-036 get best available proportional font for symbols selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 get best available proportional font for symbols
else else
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
selectedRtfSB.Append("\r\n"); selectedRtfSB.Append("\r\n");
@ -1405,7 +1405,7 @@ namespace Volian.Controls.Library
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 "); linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
linkValue = linkValue.Replace(@"{", @"\{"); linkValue = linkValue.Replace(@"{", @"\{");
linkValue = linkValue.Replace(@"}", @"\}"); linkValue = linkValue.Replace(@"}", @"\}");
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }"; //\red0\green0\blue255; SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
this.SelectionLength = 0; this.SelectionLength = 0;
this.SelectionStart = position; this.SelectionStart = position;
FindAllLinks(); FindAllLinks();