Compare commits

...

3 Commits

3 changed files with 20 additions and 15 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

@@ -2147,6 +2147,7 @@ namespace RODBInterface
foreach (int chr in chrAry)
{
if (chr > 166)
{
xmlstrTmp.Append($"\\u{(int)chr}?");
}
@@ -2204,6 +2205,7 @@ namespace RODBInterface
foreach (int chr in chrAry)
{
if (chr > 166)
{
xmlstrTmp.Append($"\\u{(int)chr}?");
}
@@ -2658,20 +2660,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.
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 = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
DBE.Command(str);
DBE.Reader();

View File

@@ -2473,6 +2473,19 @@ 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";
rtn = rtn.Replace(match.Value, mValue2);
// @"\f1\u9474 ?\f0")
// linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + "\\f0");
}
//ShowRawString(str, "ConvertTableText IN");
rtn = rtn.Replace(@"START]\v0", @"START]\cf1\v0");
rtn = rtn.Replace(@"\v #Link:", @"\cf0\v #Link:");
@@ -3827,6 +3840,9 @@ 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();