This commit is contained in:
Kathy Ruffing 2010-09-10 17:49:48 +00:00
parent b95fdb6239
commit 2071e3bb18
3 changed files with 2336 additions and 2246 deletions

View File

@ -327,6 +327,25 @@ namespace Volian.Controls.Library
}
return String.Compare(value1, value2, true) > 0;
}
public void RefreshRoTree()
{
string roid = null;
if (tvROFST.SelectedNode != null)
{
if (tvROFST.SelectedNode.Tag is ROFSTLookup.rochild)
{
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)tvROFST.SelectedNode.Tag;
roid = chld.roid;
}
}
_CurROFST = null;
LoadTree();
if (_SelectedRoidBeforeRoEditor != null)
{
ExpandTree(_SelectedRoidBeforeRoEditor);
_SelectedRoidBeforeRoEditor = null;
}
}
private void LoadTree()
{
if (_MyROFST == null) return;
@ -468,6 +487,7 @@ namespace Volian.Controls.Library
_MyRTB.inRoAdd = true;
if (CheckROSelection(roch)) // check for RO type is valid for this type of step/substep
{
//int ss = _MyRTB.SelectionStart;
// the roid may be 12 or 16 chars long, with the last 4 set if there is unit specific
// menuing. Pad to 12 to store in the rousage table.
string padroid = (roch.roid.Length <= 12) ? roch.roid + "0000" : roch.roid;
@ -475,8 +495,14 @@ namespace Volian.Controls.Library
// Resolve symbols and scientific notation in the RO return value
string valtxt = ConvertSymbolsAndStuff(selectedChld.value);
_MyRTB.InsertRO(valtxt, linktxt);
_MyRTB.Select(_MyRTB.SelectionStart + valtxt.Length + linktxt.Length, 0);
//_MyRTB.Select(_MyRTB.SelectionStart + valtxt.Length + linktxt.Length, 0);
int ss = _MyRTB.SelectionStart;
_MyRTB.SaveText();
//_MyRTB.Select(_MyRTB.SelectionStart + valtxt.Length + linktxt.Length, 0);
//_MyRTB.Select(_MyRTB.SelectionStart + valtxt.Length, 0);
//_MyRTB.Select(_MyRTB.SelectionStart + 1, 0);
_MyRTB.Select(ss + valtxt.Length + linktxt.Length+1, 0);
//_MyRTB.Select(ss, 0);
_MyRTB.Focus();
}
_MyRTB.inRoAdd = false;
@ -648,50 +674,44 @@ namespace Volian.Controls.Library
{
string outstr = instr;
outstr = outstr.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
//outstr = outstr.Replace(" ", @"\u160?"); // KBR TRY THIS
outstr = outstr.Replace("\xa0", @"\u160?"); // hardspace
outstr = outstr.Replace("\xb0", @"\'b0"); // degree
outstr = outstr.Replace("\x7f", @"\u916?"); // delta
outstr = outstr.Replace("\x2265", @"\u8805?"); // greater than or equal
outstr = outstr.Replace("\x2264", @"\u8804?"); // less than or equal
outstr = outstr.Replace("\xB1", @"\'b1"); // plus minus
outstr = outstr.Replace("\x3A3", @"\u931?"); // sigma
outstr = outstr.Replace("\x3C4", @"\u947?"); // gamma
outstr = outstr.Replace("\xBD", @"\'bd"); // half
outstr = outstr.Replace("\x25A0", @"\u9604?"); // accum 2584
outstr = outstr.Replace("\x7", @"\u9679?"); // bullet 25CF
outstr = outstr.Replace("\x2248", @"\u8776?"); // approx eq
outstr = outstr.Replace("\x2261", @"\u8773?"); // similar eq 2245
outstr = outstr.Replace("\xF7", @"\'f7"); // division
outstr = outstr.Replace("\x221A", @"\u8730?"); // square root
outstr = outstr.Replace("\x393", @"\u961?"); // rho 3C1
outstr = outstr.Replace("\x3C0", @"\u960?"); // pi
outstr = outstr.Replace("\xb5", @"\u956?"); // micro 3BC (try e6, if not work try 109)
outstr = outstr.Replace("\x3B4", @"\u948?"); // lower case delta
outstr = outstr.Replace("\x3C3", @"\u963?"); // lower case sigma
outstr = outstr.Replace("\xBC", @"\'bc"); // quarter
outstr = outstr.Replace("\x3C6", @"\'d8"); // dist zero, D8
outstr = outstr.Replace("\xC9", @"\u274?"); // energy, 112
outstr = outstr.Replace("\xEC", @"\'ec"); // grave
outstr = outstr.Replace("\x2502", @"\u9474?"); // bar
outstr = outstr.Replace("\x3B5", @"\u949?"); // epsilon
outstr = outstr.Replace("\x398", @"\u952?"); // theta, 3B8
outstr = outstr.Replace("\x221E", @"\u8857?"); // dot in oval, 2299
outstr = outstr.Replace("\xBF", @"\u964?"); // tau, 3C4
outstr = outstr.Replace("\x2310", @"\u9830?"); // diamond, 2666
outstr = outstr.Replace("\x2192", @"\u8594?");
outstr = outstr.Replace("\x2190", @"\u8592?");
outstr = outstr.Replace("\x2191", @"\u8593?");
outstr = outstr.Replace("\x2193", @"\u8595?");
outstr = outstr.Replace("\x2207", @"\u8711?");
// DisplayTODO: DO WE NEED TO CHECK WHETHER TO REPLACE ^ CHARACTER FOR SETPOINTS?
//if (DoCaret) s2 = s2.Replace("^", @"\u916");
outstr = outstr.Replace("^", @"\u916");
// OLD: This function is now handled in the ConvertFortranFormatToScienctificNotation
//outstr = ConvertDOSSuperAndSubScripts(outstr);
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);
return outstr;
@ -729,11 +749,19 @@ namespace Volian.Controls.Library
#endregion // utils
private string _SelectedRoidBeforeRoEditor = null;
private void lbROId_DoubleClick(object sender, EventArgs e)
{
if (tvROFST.SelectedNode == null) return;
string roapp = Environment.GetEnvironmentVariable("roapp");
string args = "\"" + _MyROFST.MyRODb.FolderPath + "\" " + CurROLink.ROID.ToLower();
System.Diagnostics.Process.Start(roapp, args);
Object obj = tvROFST.SelectedNode.Tag;
if (obj is ROFSTLookup.rochild)
{
ROFSTLookup.rochild roch = (ROFSTLookup.rochild)obj;
_SelectedRoidBeforeRoEditor = roch.roid;
string args = "\"" + _MyROFST.MyRODb.FolderPath + "\" " + roch.roid.ToLower();
System.Diagnostics.Process.Start(roapp, args);
}
}
#endregion

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff