B2026-022-Adding-RO-Editor-symbols-to-RO-Tables #738

Merged
jjenko merged 5 commits from B2026-022-Adding-RO-Editor-symbols-to-RO-Tables into Development 2026-03-17 16:09:56 -04:00
2 changed files with 16 additions and 9 deletions
Showing only changes of commit 4b479b3ceb - Show all commits

View File

@@ -2147,7 +2147,6 @@ namespace RODBInterface
foreach (int chr in chrAry)
{
if (chr > 166)
{
mschill marked this conversation as resolved
Review

Should there be a blank line inserted here?

Should there be a blank line inserted here?
Review

I removed the blank line

I removed the blank line
xmlstrTmp.Append($"\\u{(int)chr}?");
}
@@ -2205,7 +2204,6 @@ namespace RODBInterface
foreach (int chr in chrAry)
{
if (chr > 166)
{
xmlstrTmp.Append($"\\u{(int)chr}?");
mschill marked this conversation as resolved
Review

Should there be a blank line inserted here?

Should there be a blank line inserted here?
Review

I removed the blank line

I removed the blank line
}
@@ -2660,7 +2658,21 @@ namespace RODBInterface
}
}
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
char[] chrAry = tinfo2.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
tinfo2Tmp.Append($"\\u{(int)chr}?");
}
else
{
tinfo2Tmp.Append((char)chr);
}
}
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'";
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
DBE.Command(str);
DBE.Reader();

View File

@@ -2479,10 +2479,8 @@ namespace Volian.Controls.Library
foreach (Match match in Regex.Matches(rtn, pattern, RegexOptions.IgnoreCase))
{
mValue = match.Value;
mValue2 = @"\f1 " + mValue + @"\f0";
rtn = rtn.Replace(match.Value, mValue2);
// @"\f1\u9474 ?\f0")
// linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + "\\f0");
mValue2 = $"\\f1 {mValue}\\f0";
mschill marked this conversation as resolved Outdated

Performance - Would avoid adding together strings - would suggest string interpolation.

mValue2 = $"\f1 {mValue}\f0";

note that this viewer changes the double slashes to single ones (unless you click edit on the comment - so see screenshot below)

Performance - Would avoid adding together strings - would suggest string interpolation. mValue2 = $"\\f1 {mValue}\\f0"; note that this viewer changes the double slashes to single ones (unless you click edit on the comment - so see screenshot below)

I made the change.

I made the change.
rtn = rtn.Replace(match.Value, mValue2);
}
mschill marked this conversation as resolved
Review

Commented out code should be removed or have text designating why it is not?

Commented out code should be removed or have text designating why it is not?
@@ -3840,9 +3838,6 @@ namespace Volian.Controls.Library
this.MergedRanges.Clear();
this.Clear();
this.IsRoTable = true;
//valtext = valtext.Replace(@"\u8209?", "-");
//valtext = Regex.Replace(valtext, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : "");
//valtext = valtext.Replace("-", @"\u8209?");
this.ParseTableFromText(valtext, GridLinePattern.Single);
this.AutoSizeCols();
this.AutoSizeRows();
mschill marked this conversation as resolved Outdated

Commented out code should be removed or have text designating why it is not?

Commented out code should be removed or have text designating why it is not?

I remove the comment

I remove the comment