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

This commit is contained in:
Paul Larsen 2025-01-27 13:38:48 -05:00
parent 71130bd26b
commit 37c5b23a86
12 changed files with 20 additions and 249 deletions

View File

@ -69,7 +69,7 @@ namespace VEPROMS
DisplayText dt = new DisplayText(val, new VE_Font("Arial", 10, E_Style.None, 12), false); DisplayText dt = new DisplayText(val, new VE_Font("Arial", 10, E_Style.None, 12), false);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Arial;}"); sb.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Arial;}");
sb.Append(@"{\f1\fnil\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); //C2017-036 changed to just Arial because Microsoft removed Arial Unicode MS with Word16 sb.Append(@"{\f1\fnil\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;}"); //C2017-036 changed to just Arial because Microsoft removed Arial Unicode MS with Word16
sb.Append(@"\viewkind4\uc1\pard\sl-240\slmult0\fs" + (int)(this.Font.SizeInPoints*2) + " " + dt.StartText + @"}"); sb.Append(@"\viewkind4\uc1\pard\sl-240\slmult0\fs" + (int)(this.Font.SizeInPoints*2) + " " + dt.StartText + @"}");
tb.Rtf = sb.ToString(); tb.Rtf = sb.ToString();
tb.Location = new Point((int)fld.x * 2, (int)fld.y * 2); tb.Location = new Point((int)fld.x * 2, (int)fld.y * 2);

View File

@ -77,7 +77,7 @@ namespace VEPROMS
DisplayText dt = new DisplayText(val, new VE_Font("Arial", 10, E_Style.None, 12), false); DisplayText dt = new DisplayText(val, new VE_Font("Arial", 10, E_Style.None, 12), false);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Arial;}"); sb.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Arial;}");
sb.Append(@"{\f1\fnil\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // C2017-036 Microsoft removed Arial Unicode MS with Word16 sb.Append(@"{\f1\fnil\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 Microsoft removed Arial Unicode MS with Word16
sb.Append(@"\viewkind4\uc1\pard\sl-240\slmult0\fs" + (int)(this.Font.SizeInPoints*2) + " " + dt.StartText + @"}"); sb.Append(@"\viewkind4\uc1\pard\sl-240\slmult0\fs" + (int)(this.Font.SizeInPoints*2) + " " + dt.StartText + @"}");
tb.Rtf = sb.ToString(); tb.Rtf = sb.ToString();
tb.Location = new Point((int)fld.x * 2, (int)fld.y * 2); tb.Location = new Point((int)fld.x * 2, (int)fld.y * 2);

View File

@ -1398,13 +1398,7 @@ namespace VEPROMS
_SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N"; _SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N";
} }
} }
//private void ppCbShowRplWords_CheckedChanged(object sender, EventArgs e)
//{
// if (!_Initializing)
// {
// _SectionConfig.Section_OriginalSteps = ppCbShowRplWords.Checked ? "Y" : "N";
// }
//}
private void ppBtnConvertToDocX_Click(object sender, EventArgs e) private void ppBtnConvertToDocX_Click(object sender, EventArgs e)
{ {
// Get Document as file // Get Document as file
@ -1472,7 +1466,7 @@ namespace VEPROMS
{ {
_SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked; _SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked;
} }
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private void ppCbShowRplWords_CheckedChanged(object sender, EventArgs e) private void ppCbShowRplWords_CheckedChanged(object sender, EventArgs e)
{ {
if (!_Initializing) if (!_Initializing)

View File

@ -1,117 +0,0 @@
# Rules in this file were initially inferred by Visual Studio IntelliCode from the C:\Git\Production\Repos\SourceCode\PROMS\VEPROMS.CSLA.Library\ codebase based on best match to current usage at 1/21/2025
# You can modify the rules from these initially generated values to suit your own policies
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
[*.cs]
#Core editorconfig formatting - indentation
#use hard tabs for indentation
indent_style = tab
#Formatting - new line options
#place catch statements on a new line
csharp_new_line_before_catch = true
#place else statements on a new line
csharp_new_line_before_else = true
#require finally statements to be on a new line after the closing brace
csharp_new_line_before_finally = true
#require braces to be on a new line for properties, methods, control_blocks, and types (also known as "Allman" style)
csharp_new_line_before_open_brace = properties, methods, control_blocks, types
#Formatting - organize using options
#do not place System.* using directives before other using directives
dotnet_sort_system_directives_first = false
#Formatting - spacing options
#require NO space between a cast and the value
csharp_space_after_cast = false
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_after_colon_in_inheritance_clause = true
#require a space after a keyword in a control flow statement such as a for loop
csharp_space_after_keywords_in_control_flow_statements = true
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_before_colon_in_inheritance_clause = true
#remove space within empty argument list parentheses
csharp_space_between_method_call_empty_parameter_list_parentheses = false
#remove space between method call name and opening parenthesis
csharp_space_between_method_call_name_and_opening_parenthesis = false
#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
csharp_space_between_method_call_parameter_list_parentheses = false
#remove space within empty parameter list parentheses for a method declaration
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
csharp_space_between_method_declaration_parameter_list_parentheses = false
#Formatting - wrapping options
#leave code block on separate lines
csharp_preserve_single_line_blocks = false
#leave statements and member declarations on the same line
csharp_preserve_single_line_statements = true
#Style - Code block preferences
#prefer no curly braces if allowed
csharp_prefer_braces = false:suggestion
#Style - expression bodied member options
#prefer block bodies for accessors
csharp_style_expression_bodied_accessors = false:suggestion
#prefer block bodies for constructors
csharp_style_expression_bodied_constructors = false:suggestion
#prefer block bodies for methods
csharp_style_expression_bodied_methods = false:suggestion
#prefer block bodies for properties
csharp_style_expression_bodied_properties = false:suggestion
#Style - expression level options
#prefer out variables to be declared before the method call
csharp_style_inlined_variable_declaration = false:suggestion
#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_member_access = true:suggestion
#Style - Expression-level preferences
#prefer objects to not be initialized using object initializers
dotnet_style_object_initializer = false:suggestion
#Style - implicit and explicit types
#prefer explicit type over var in all cases, unless overridden by another code style rule
csharp_style_var_elsewhere = false:suggestion
#prefer explicit type over var to declare variables with built-in system types such as int
csharp_style_var_for_built_in_types = false:suggestion
#prefer explicit type over var when the type is already mentioned on the right-hand side of a declaration
csharp_style_var_when_type_is_apparent = false:suggestion
#Style - language keyword and framework type options
#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
#Style - modifier options
#prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods.
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
#Style - Modifier preferences
#when this rule is set to a list of modifiers, prefer the specified ordering.
csharp_preferred_modifier_order = public,private,internal,protected,static,virtual,override,readonly:suggestion
#Style - qualification options
#prefer events not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_event = false:suggestion
#prefer fields not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_field = false:suggestion
#prefer methods not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_method = false:suggestion
#prefer properties not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_property = false:suggestion

View File

@ -55,6 +55,8 @@ namespace VEPROMS.CSLA.Library
if (sc == null) return "N"; if (sc == null) return "N";
return sc.Section_ShwRplWords; return sc.Section_ShwRplWords;
} }
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private bool ShwRplWdsIndex(ItemInfo _MyItemInfo) private bool ShwRplWdsIndex(ItemInfo _MyItemInfo)
{ {
StepConfig sc = _MyItemInfo.MyConfig as StepConfig; StepConfig sc = _MyItemInfo.MyConfig as StepConfig;
@ -84,22 +86,6 @@ namespace VEPROMS.CSLA.Library
return false; return false;
break; break;
} }
//int setting = sc.Step_ShwRplWdsIndex;
//if (setting == 3) return false;
//if (setting == 2) return true;
//if (setting == 1 || setting == 0)
//{
// SectionConfig sc2 = _MyItemInfo.ActiveParent.MyConfig as SectionConfig;
// if (sc2.Section_ShwRplWords == "Y")
// {
// return true;
// }
// else
// {
// return false;
// }
//}
//return false; // if Step_ShwRplWdsIndex = 0
} }
private Item _MyItem; private Item _MyItem;
private string EditText private string EditText
@ -412,13 +398,10 @@ namespace VEPROMS.CSLA.Library
// But don't do ReplaceWords if the TurnOffReplaceWords format flag is set // But don't do ReplaceWords if the TurnOffReplaceWords format flag is set
if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords) if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords)
{ {
//string stf = _MyItemInfo.SectionConfig.Section_ShwRplWords;
//ItemInfoList stf = _MyItemInfo.MyPrevious.Sections//SectionConfig.Section_ShwRplWords;
//_MyItemInfo.SectionConfig.Section_ShwRplWords;
//string str = _MyItemInfo.MyConfig.Section_ShwRplWords;
//epMode
int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2"); int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2");
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
if (_MyItemInfo.IsSection) if (_MyItemInfo.IsSection)
{ {
string ShwRplWrds = ShwRplWords(_MyItemInfo); string ShwRplWrds = ShwRplWords(_MyItemInfo);
@ -2245,11 +2228,6 @@ namespace VEPROMS.CSLA.Library
// CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is // CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is
//RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline; //RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline;
string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0"); string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0");
//if (Volian.Controls.Library.Properties.Settings.Default.cbShwRplWrdsColor)
//{
// replaceWord = $@"\cf2{replaceWord}\cf0";
// // with = $@"\cf2{with}\cf0 ";
//}
// if first or last character in replaceword is a non-word character, for example, ',', ')', or '.', // if first or last character in replaceword is a non-word character, for example, ',', ')', or '.',
// don't use the \W, i.e. don't bother to look for a non-word character. // don't use the \W, i.e. don't bother to look for a non-word character.

View File

@ -1654,14 +1654,6 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _ProcAppl, "@ProcAppl"); return LazyLoad(ref _ProcAppl, "@ProcAppl");
} }
} }
//private ShwRplWdsData _ShwRplWdsData;
//public ShwRplWdsData ShwRplWdsData
//{
// get
// {
// return ShwRplWdsData == null ? ShwRplWdsData = new ShwRplWdsData(SelectSingleNode("ShwRplWdsData")) : ShwRplWdsData;
// }
//}
} }
#endregion #endregion
@ -2181,71 +2173,6 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
//#region ShwRplWdsData
//[TypeConverter(typeof(ExpandableObjectConverter))]
//public class ShwRplWdsData : vlnFormatItem
//{
// public ShwRplWdsData(XmlNode xmlNode) : base(xmlNode) { }
// private ShwRplWdsList _ShwRplWdsList = null;
// public ShwRplWdsList ShwRplWdsList
// {
// get
// {
// if (_ShwRplWdsList != null) return _ShwRplWdsList;
// // Get a list of checkoffs that should be included:
// // if !UseCheckOffUCF (Baseall has it as false. User can change setting in UCF to true)
// // if !IgnoreUCF, i.e. use UCF changes, return original lists with only active items (Inactive = false)
// // if IgnoreUCF, return original lists with all items
// // if UseCheckOffUCF is true use the merged lists from current format and baseall.xml and
// // do the same processing for IgnoreUCF described above.
// // UseCheckOffUCF is false or there is no FormatConfig (UCF) data:
// //FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat);
// //if (!MyFormat.PlantFormat.FormatData.ProcData.CheckOffUCF || fc==null)
// //{
// // _ShwRplWdsList = new ShwRplWdsList(SelectNodes("ShwRplWdsList/ShwRplWds"), MyFormat);
// // // B2019-100: If Ignoring the UCF data, just return the entire list. Also, return entire list if there is no UCF data (fc == null)
// // if (PlantFormat.IgnoreUCF || fc == null) return _ShwRplWdsList;
// // // If not ignoring UCF settings, only return those that are active
// // foreach (FormatConfig.ShwRplWds co in fc.PlantFormat.FormatData.ShwRplWdsList)
// // {
// // foreach (CheckOff coo in _ShwRplWdsList)
// // {
// // if ((int)coo.Index == Convert.ToInt32(co.Index) && !(bool)co.Active)
// // {
// // _ShwRplWdsList.Remove(coo);
// // break;
// // }
// // }
// // }
// // return _ShwRplWdsList;
// //}
// // UseCheckOfffUCF is true:
// // merge the checkoff list from the current format and the checkoff list from the base format
// FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat);
// _ShwRplWdsList = new ShwRplWdsList(SelectNodes("ShwRplWdsList/ShwRplWds"), MyFormat);
// ShwRplWdsList retlist2 = new ShwRplWdsList(SelectNodes("../ShwRplWdsList/ShwRplWds"), MyFormat);
// if (retlist2 != null && retlist2.Count > 0) foreach (ShwRplWds co in retlist2) _ShwRplWdsList.Add(co);
// if (PlantFormat.IgnoreUCF) return _ShwRplWdsList;
// // if applying UCF, then remove those that are inactive:
// foreach (FormatConfig.ShwRplWds co in fc.PlantFormat.FormatData.ShwRplWdsList)
// {
// foreach (ShwRplWds coo in _ShwRplWdsList)
// {
// if ((int)coo.Index == Convert.ToInt32(co.Index) && !(bool)co.Active)
// {
// _ShwRplWdsList.Remove(coo);
// break;
// }
// }
// }
// return _ShwRplWdsList;
// }
// }
//}
//#endregion
#endregion #endregion
#region CheckOff #region CheckOff
@ -2359,6 +2286,7 @@ namespace VEPROMS.CSLA.Library
} }
#endregion #endregion
#region ShwRplWds #region ShwRplWds
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
public class ShwRplWds : vlnFormatItem, IVlnIndexedFormatItem public class ShwRplWds : vlnFormatItem, IVlnIndexedFormatItem
{ {
public ShwRplWds(XmlNode xmlNode) : base(xmlNode) { } public ShwRplWds(XmlNode xmlNode) : base(xmlNode) { }
@ -2416,20 +2344,6 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
//public class ShwRplWdsList : vlnIndexedFormatList<ShwRplWds>
//{
// public ShwRplWdsList(XmlNodeList xmlNodeList, IFormatOrFormatInfo myFormat) : base(xmlNodeList, myFormat) { }
// public override vlnIndexedFormatList<ShwRplWds> InheritedList
// {
// get
// {
// IFormatOrFormatInfo parentFormat = MyFormat.MyIParent;
// if (parentFormat != null)
// return parentFormat.PlantFormat.FormatData.ProcData.ShwRplWds;
// return null;
// }
// }
//}
#endregion #endregion
#region CheckOffHeader #region CheckOffHeader
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]

View File

@ -389,7 +389,6 @@
<Compile Include="VEObjects\VETreeNode.cs" /> <Compile Include="VEObjects\VETreeNode.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include=".editorconfig" />
<None Include="ClassDiagram1.cd" /> <None Include="ClassDiagram1.cd" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -202,6 +202,7 @@ namespace Volian.Base.Library
get { return VlnSettings._StepTypeToolTip; } get { return VlnSettings._StepTypeToolTip; }
set { VlnSettings._StepTypeToolTip = value; } set { VlnSettings._StepTypeToolTip = value; }
} }
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private static bool _cbShwRplWrdsColor = false; private static bool _cbShwRplWrdsColor = false;
public static bool cbShwRplWrdsColor public static bool cbShwRplWrdsColor
{ {

View File

@ -300,6 +300,7 @@ namespace Volian.Controls.Library
// in certain cases, the checkbox control should be disabled, check for this stuff now... // in certain cases, the checkbox control should be disabled, check for this stuff now...
int formatSteptype = CurItemInfo.FormatStepType; int formatSteptype = CurItemInfo.FormatStepType;
cmbCheckoff.Enabled = true; cmbCheckoff.Enabled = true;
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
cmbShwRplWds.Enabled = true; // new show replace words cmbShwRplWds.Enabled = true; // new show replace words
if (cmbShwRplWds.Visible) if (cmbShwRplWds.Visible)
{ {
@ -880,6 +881,7 @@ namespace Volian.Controls.Library
// cnt.Save(); // cnt.Save();
//} //}
} }
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private void cmbShwRplWds_SelectedIndexChanged(object sender, EventArgs e) // new show replace words private void cmbShwRplWds_SelectedIndexChanged(object sender, EventArgs e) // new show replace words
{ {

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;}";\\\red0\green0\blue255;}";
} }
} }
// 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;}"); //\red0\green0\blue255;}"); // 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 }"; 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;
this.SelectionLength = 0; this.SelectionLength = 0;
this.SelectionStart = position; this.SelectionStart = position;
FindAllLinks(); FindAllLinks();

View File

@ -1968,7 +1968,7 @@ namespace Volian.Controls.Library
//trtb.Rtf = trtb.RtfPrefix + ConvertTableText(trtb.Rtf) + "}"; //trtb.Rtf = trtb.RtfPrefix + ConvertTableText(trtb.Rtf) + "}";
//string fromRTF = trtb.Rtf; //string fromRTF = trtb.Rtf;
//string prefix = trtb.RtfPrefix; //string prefix = trtb.RtfPrefix;
//if (tstr.Contains("#Link:")) prefix += @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"; //if (tstr.Contains("#Link:")) prefix += @"{\colortbl ;\red255\green0\blue0;}";
//if (tstr.Contains("#Link:")) //if (tstr.Contains("#Link:"))
// Console.WriteLine("here"); // Console.WriteLine("here");
//string jText = trtb.RtfPrefix + ConvertTableText(tstr) + @"\par}"; //string jText = trtb.RtfPrefix + ConvertTableText(tstr) + @"\par}";

View File

@ -368,9 +368,9 @@ namespace Volian.Print.Library
} }
rtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + font.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}"; rtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + font.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
if (!FontIsFixed(font)) if (!FontIsFixed(font))
rtfSB.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 rtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 get best available proportional font for symbols
else else
rtfSB.Append(@"{\f1\fnil\fcharset0 VESymbFix;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); rtfSB.Append(@"{\f1\fnil\fcharset0 VESymbFix;}}{\colortbl ;\red255\green0\blue0;}");
rtfSB.Append("\r\n"); rtfSB.Append("\r\n");
// use styles to construct rtf commands to insert into next line (where \b, etc is) // use styles to construct rtf commands to insert into next line (where \b, etc is)
rtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(font.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}"; rtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(font.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}";
@ -398,9 +398,9 @@ namespace Volian.Print.Library
} }
rtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + font.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}"; rtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + font.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
if (!FontIsFixed(font)) if (!FontIsFixed(font))
rtfSB.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 rtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 get best available proportional font for symbols
else else
rtfSB.Append(@"{\f1\fnil\fcharset0 VESymbFix;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); rtfSB.Append(@"{\f1\fnil\fcharset0 VESymbFix;}}{\colortbl ;\red255\green0\blue0;}");
rtfSB.Append("\r\n"); rtfSB.Append("\r\n");
// use styles to construct rtf commands to insert into next line (where \b, etc is) // use styles to construct rtf commands to insert into next line (where \b, etc is)
rtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(font.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}"; rtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(font.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}";