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
3 changed files with 13 additions and 1 deletions

View File

@@ -418,7 +418,7 @@ namespace ROEditor
// NOTE: not doing the "Using System.Threading;" statement at beginning of file because it conflicts with the declaration of the "Timer" variable
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
// The data path the was passed in.
// The data path the was passed in.
DbConnectPath = PassedInPath;
// Setup the context menu

View File

@@ -2659,6 +2659,7 @@ 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)
{

View File

@@ -2473,6 +2473,17 @@ namespace Volian.Controls.Library
private string ConvertTableText(string str)
{
string rtn = str;
string pattern = @"\\u([0-9]{1,4})\?";
string mValue, mValue2 = "";
foreach (Match match in Regex.Matches(rtn, pattern, RegexOptions.IgnoreCase))
{
mValue = match.Value;
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?
//ShowRawString(str, "ConvertTableText IN");
rtn = rtn.Replace(@"START]\v0", @"START]\cf1\v0");
rtn = rtn.Replace(@"\v #Link:", @"\cf0\v #Link:");