This commit is contained in:
parent
7bc0503efa
commit
ea6c9d5055
@ -528,7 +528,7 @@ namespace Volian.Controls.Library
|
|||||||
string padroid = (roch.roid.Length <= 12) ? roch.roid + "0000" : roch.roid;
|
string padroid = (roch.roid.Length <= 12) ? roch.roid + "0000" : roch.roid;
|
||||||
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, _MyROFST.MyRODb.RODbID);
|
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, _MyROFST.MyRODb.RODbID);
|
||||||
// Resolve symbols and scientific notation in the RO return value
|
// Resolve symbols and scientific notation in the RO return value
|
||||||
string valtxt = ConvertSymbolsAndStuff(selectedChld.value);
|
string valtxt = _MyROFST.ROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta); //ConvertSymbolsAndStuff(selectedChld.value);
|
||||||
MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, _MyROFST.MyRODb.RODbID));
|
MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, _MyROFST.MyRODb.RODbID));
|
||||||
}
|
}
|
||||||
btnGoToRO.Enabled = btnSaveRO.Enabled = btnCancelRO.Enabled = btnPreviewRO.Enabled = false;
|
btnGoToRO.Enabled = btnSaveRO.Enabled = btnCancelRO.Enabled = btnPreviewRO.Enabled = false;
|
||||||
@ -684,54 +684,6 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region Utils
|
#region Utils
|
||||||
private string ConvertSymbolsAndStuff(string instr)
|
|
||||||
{
|
|
||||||
string outstr = instr;
|
|
||||||
|
|
||||||
outstr = outstr.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
|
||||||
outstr = outstr.Replace("\xa0", @"\u160?"); // hardspace
|
|
||||||
outstr = outstr.Replace("\xb0", @"\'b0"); // degree
|
|
||||||
outstr = outstr.Replace("\x7f", @"\f1\u916?\f0"); // delta
|
|
||||||
outstr = outstr.Replace("\x2265", @"\f1\u8805?\f0"); // greater than or equal
|
|
||||||
outstr = outstr.Replace("\x2264", @"\f1\u8804?\f0"); // less than or equal
|
|
||||||
outstr = outstr.Replace("\xB1", @"\'b1"); // plus minus
|
|
||||||
outstr = outstr.Replace("\x3A3", @"\f1\u931?\f0"); // sigma
|
|
||||||
outstr = outstr.Replace("\x3C4", @"\f1\u947?\f0"); // gamma
|
|
||||||
outstr = outstr.Replace("\xBD", @"\'bd"); // half
|
|
||||||
outstr = outstr.Replace("\x25A0", @"\f1\u9604?\f0"); // accum 2584
|
|
||||||
outstr = outstr.Replace("\x7", @"\f1\u9679?\f0"); // bullet 25CF
|
|
||||||
outstr = outstr.Replace("\x2248", @"\f1\u8776?\f0"); // approx eq
|
|
||||||
outstr = outstr.Replace("\x2261", @"\f1\u8773?\f0"); // similar eq 2245
|
|
||||||
outstr = outstr.Replace("\xF7", @"\'f7"); // division
|
|
||||||
outstr = outstr.Replace("\x221A", @"\f1\u8730?\f0"); // square root
|
|
||||||
outstr = outstr.Replace("\x393", @"\f1\u961?\f0"); // rho 3C1
|
|
||||||
outstr = outstr.Replace("\x3C0", @"\f1\u960?\f0"); // pi
|
|
||||||
outstr = outstr.Replace("\xb5", @"\f1\u956?\f0"); // micro 3BC (try e6, if not work try 109)
|
|
||||||
outstr = outstr.Replace("\x3B4", @"\f1\u948?\f0"); // lower case delta
|
|
||||||
outstr = outstr.Replace("\x3C3", @"\f1\u963?\f0"); // lower case sigma
|
|
||||||
outstr = outstr.Replace("\xBC", @"\'bc"); // quarter
|
|
||||||
outstr = outstr.Replace("\x3C6", @"\'d8"); // dist zero, D8
|
|
||||||
outstr = outstr.Replace("\xC9", @"\f1\u274?\f0"); // energy, 112
|
|
||||||
outstr = outstr.Replace("\xEC", @"\'ec"); // grave
|
|
||||||
outstr = outstr.Replace("\x2502", @"\f1\u9474?\f0"); // bar
|
|
||||||
outstr = outstr.Replace("\x3B5", @"\f1\u949?\f0"); // epsilon
|
|
||||||
outstr = outstr.Replace("\x398", @"\f1\u952?\f0"); // theta, 3B8
|
|
||||||
outstr = outstr.Replace("\x221E", @"\f1\u8857?\f0"); // dot in oval, 2299
|
|
||||||
outstr = outstr.Replace("\xBF", @"\f1\u964?\f0"); // tau, 3C4
|
|
||||||
outstr = outstr.Replace("\x2310", @"\f1\u9830?\f0"); // diamond, 2666
|
|
||||||
outstr = outstr.Replace("\x2192", @"\f1\u8594?\f0");
|
|
||||||
outstr = outstr.Replace("\x2190", @"\f1\u8592?\f0");
|
|
||||||
outstr = outstr.Replace("\x2191", @"\f1\u8593?\f0");
|
|
||||||
outstr = outstr.Replace("\x2193", @"\f1\u8595?\f0");
|
|
||||||
outstr = outstr.Replace("\x2207", @"\f1\u8711?\f0");
|
|
||||||
if (MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta)
|
|
||||||
outstr = outstr.Replace("^", @"\f1\u916?\f0");
|
|
||||||
outstr = ROFSTLookup.ConvertFortranFormatToScienctificNotation(outstr);
|
|
||||||
outstr = outstr.Replace("\r\n", @"\par ");
|
|
||||||
return outstr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Keep trying to delete the given file until successful OR until MaxMinutes has elasped
|
/// Keep trying to delete the given file until successful OR until MaxMinutes has elasped
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user