Development #481

Merged
djankowski merged 32 commits from Development into master 2024-12-11 11:52:34 -05:00
28 changed files with 2003 additions and 1600 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -746,6 +746,7 @@ namespace ROEditor
break; break;
} }
} }
if (inusename == "u") found = true; //to handle unit designation
if (found == false)syntax(inusename+" invalid field name",strt,where); if (found == false)syntax(inusename+" invalid field name",strt,where);
// used to have procini def stuff here. // used to have procini def stuff here.
start=where+1; start=where+1;

View File

@ -504,7 +504,6 @@ namespace ROEditor
// if a specific RO was passed in. Load the xml tree from it to the root & then // if a specific RO was passed in. Load the xml tree from it to the root & then
// edit it through the ctlXmledit. // edit it through the ctlXmledit.
// from the input tbl string, get a table name. // from the input tbl string, get a table name.
ArrayList levelRecids = new ArrayList(); ArrayList levelRecids = new ArrayList();
int itbl = System.Convert.ToInt32(specificro.Substring(0,4),16); int itbl = System.Convert.ToInt32(specificro.Substring(0,4),16);
string stbl = System.Convert.ToString(itbl,10); string stbl = System.Convert.ToString(itbl,10);
@ -594,7 +593,6 @@ namespace ROEditor
return; return;
} }
roTreeView.SelectedNode = trnd; roTreeView.SelectedNode = trnd;
} }
protected void roTreeView_AfterSelect (object sender, protected void roTreeView_AfterSelect (object sender,
@ -676,12 +674,14 @@ namespace ROEditor
//if Ctrl/Shift Key is held down //if Ctrl/Shift Key is held down
if (ROsSelectedforMultiMove == null) if (ROsSelectedforMultiMove == null)
ROsSelectedforMultiMove = new List<TreeNode>(); ROsSelectedforMultiMove = new List<TreeNode>();
// B2021-094 added check that Control and Alt keys were not pressed with shift key
if ((Control.ModifierKeys & Keys.Shift) != 0) // if user does the <Ctrl><Shift><G> keystroke (Goto selected RO from step editor)
// but only lifts up on the G key, it was dropping down into this code below
// and getting a null reference error upon initial entry in to the RO Editor
if ((Control.ModifierKeys & Keys.Shift) != 0 && (Control.ModifierKeys & Keys.Control) == 0 && (Control.ModifierKeys & Keys.Alt) == 0)
{ {
//if shift is held down, clear existing nodes then add the range of nodes //if shift is held down, clear existing nodes then add the range of nodes
roTreeView_ClearAllMultiSelect(); roTreeView_ClearAllMultiSelect();
if (PreviousNode.Index < CurrentNode.Index) if (PreviousNode.Index < CurrentNode.Index)
{ {
//Traverse Down //Traverse Down

File diff suppressed because it is too large Load Diff

View File

@ -178,6 +178,8 @@ namespace VEPROMS
myDocVersions.Clear(); myDocVersions.Clear();
FolderInfo fi = FolderInfo.GetTop(); FolderInfo fi = FolderInfo.GetTop();
fi.RefreshChildFolders();
if (fi.ChildFolderCount > 0) if (fi.ChildFolderCount > 0)
{ {
TreeNode tn = new TreeNode(fi.Name); TreeNode tn = new TreeNode(fi.Name);
@ -233,7 +235,7 @@ namespace VEPROMS
loadedWorkingDraft = true; loadedWorkingDraft = true;
} }
if (tn.Parent != null && !loadedWorkingDraft) if (tn.Parent != null && !loadedWorkingDraft && fi.FolderDocVersionCount == 0)
{ {
tn.Remove(); tn.Remove();
} }
@ -481,12 +483,14 @@ namespace VEPROMS
// B2018-002 - Invalid Transitions - Define Transition Refresh Statistics // B2018-002 - Invalid Transitions - Define Transition Refresh Statistics
private int numTransProcessed = 0; private int numTransProcessed = 0;
private int numTransFixed = 0; private int numTransFixed = 0;
private int numTransCantFix = 0;
private int numTransConverted = 0; private int numTransConverted = 0;
// B2018-002 - Invalid Transitions - Initialize Transition Refresh Statistics // B2018-002 - Invalid Transitions - Initialize Transition Refresh Statistics
private void ResetTransNumbers() private void ResetTransNumbers()
{ {
numTransProcessed = 0; numTransProcessed = 0;
numTransFixed = 0; numTransFixed = 0;
numTransCantFix = 0;
numTransConverted = 0; numTransConverted = 0;
} }
private void RefreshTransitions() private void RefreshTransitions()
@ -535,11 +539,12 @@ namespace VEPROMS
numTransConverted += ProcedureInfo.TranConvertCount; numTransConverted += ProcedureInfo.TranConvertCount;
numTransProcessed += ProcedureInfo.TranCheckCount; numTransProcessed += ProcedureInfo.TranCheckCount;
numTransFixed += ProcedureInfo.TranFixCount; numTransFixed += ProcedureInfo.TranFixCount;
numTransCantFix += ProcedureInfo.TranCantFixCount; //Bad Transition Link
pbProcess.PerformStep(); pbProcess.PerformStep();
Application.DoEvents(); Application.DoEvents();
} }
} }
if (numTransFixed == 0 && numTransConverted == 0) if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0)
{ {
txtResults.AppendText("No Transitions Needed Updated."); txtResults.AppendText("No Transitions Needed Updated.");
txtResults.AppendText(Environment.NewLine); txtResults.AppendText(Environment.NewLine);
@ -551,16 +556,18 @@ namespace VEPROMS
txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed)); txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics // B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed))); txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed + numTransCantFix)));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed)); txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Converted to text: {0}", numTransConverted)); txtProcess.AppendText(string.Format("Transitions Converted to text: {0}", numTransConverted));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Unable to be Automatically Fixed (Annotation: Bad Transition Link): {0}", numTransCantFix));
Application.DoEvents(); Application.DoEvents();
if (pil.Count > 0) if (pil.Count > 0)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("The batch refresh process was not usccessful for all procedures selected."); sb.AppendLine("The batch refresh process was not successful for all procedures selected.");
sb.AppendLine("The following procedures were not able to be refreshed..."); sb.AppendLine("The following procedures were not able to be refreshed...");
sb.AppendLine(); sb.AppendLine();
sb.AppendLine(sbProcs.ToString()); sb.AppendLine(sbProcs.ToString());
@ -579,11 +586,11 @@ namespace VEPROMS
} }
} }
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statisitic // B2018-002 - Invalid Transitions - Display Transition Refresh Statistic
if (numTransFixed == 0 && numTransConverted == 0) if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0)
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed"); MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed");
else else
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted), numTransFixed, numTransConverted), "Refresh Transitions Completed"); MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.\n\n {4} Transitions unable to be automatically fixed (Annotation: Bad Transition Link).", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted + numTransCantFix), numTransFixed, numTransConverted, numTransCantFix), "Refresh Transitions Completed");
} }
// C2017-030 - new Admin Tools user interface // C2017-030 - new Admin Tools user interface
@ -1103,8 +1110,7 @@ namespace VEPROMS
ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable); ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable);
TimeSpan ts = DateTime.Now - start; TimeSpan ts = DateTime.Now - start;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics // B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Elapsed Seconds:{5}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds)); txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Cant Fix (Annotation: Bad Transition Link) {5} Transitions{0}Elapsed Seconds:{6}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ProcedureInfo.TranCantFixCount, ts.TotalSeconds));
//Console.WriteLine("\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds, numTransProcessed, numTransFixed, numTransConverted);
if (myFixes.Length > 0) if (myFixes.Length > 0)
{ {
txtResults.AppendText(myFixes.ToString()); txtResults.AppendText(myFixes.ToString());

View File

@ -183,19 +183,19 @@ It is recommended that this be done during off hours.
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="swUpdateROVals.SuperTooltip" xml:space="preserve"> <data name="swUpdateROVals.SuperTooltip" xml:space="preserve">
@ -230,36 +230,36 @@ If more than one procedure is selected, it is recommended that this be performed
</data> </data>
<data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
@ -324,36 +324,36 @@ This function will remove all of the saved attachment PDFS stored in the databas
</data> </data>
<data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
zJwL4b/EAAAAAElFTkSuQmCC ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve">

View File

@ -687,19 +687,46 @@ namespace VEPROMS.CSLA.Library
myLength += mg.Groups[3].Length; myLength += mg.Groups[3].Length;
} }
string gg = MyGrid.Data.Substring(myIndex, myLength); string gg = MyGrid.Data.Substring(myIndex, myLength);
//CSM B2024-003 Updating RO Values inside a text Grid, adding a karat
// and/or dash into the RO value changes to question marks in the UI,
if (newvalue.Contains(@"\u8209?")) if (newvalue.Contains(@"\u8209?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u8209?", "-"); newvalue = newvalue.Replace(@"\u8209?", "-");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u8209?", "-");
else else
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
} }
int indx_to_addfont = -1;
if (newvalue.Contains(@"\u916?"))
{
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups[1].Value == "" && !ContentItems[0].MyItem.MyItemInfo.MyDocVersion.MyFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups[1].Value == "")
{
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
newvalue = newvalue.Replace(@"\u916?", @"\f9\u916?\f0 ");
indx_to_addfont = GetLocationToInsertFontInGrid(myIndex);
}
else
newvalue = newvalue.Replace(@"\u916?", m.Groups[1].Value + @"\u916?" + m.Groups[3].Value);
}
if (newvalue.Contains(@"\u8593?")) if (newvalue.Contains(@"\u8593?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u8593?", "^"); newvalue = newvalue.Replace(@"\u8593?", "^");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u8593?", "^");
else else
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
} }
@ -708,6 +735,8 @@ namespace VEPROMS.CSLA.Library
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u9586?", @"\\"); newvalue = newvalue.Replace(@"\u9586?", @"\\");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u9586?", @"\\");
else else
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
} }
@ -719,7 +748,17 @@ namespace VEPROMS.CSLA.Library
if (gg != newvalue) if (gg != newvalue)
{ {
retval = gg; retval = gg;
MyGrid.Data = MyGrid.Data.Substring(0, myIndex) + newvalue + MyGrid.Data.Substring(myIndex + myLength); //B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
string begin_str = MyGrid.Data.Substring(0, myIndex);
if (indx_to_addfont > -1)
begin_str = begin_str.Insert(indx_to_addfont, @"{\f9\fnil\fcharset0 FreeMono;}");
MyGrid.Data = begin_str + newvalue + MyGrid.Data.Substring(myIndex + myLength);
MyGrid.Save();
break; break;
} }
} }
@ -729,6 +768,64 @@ namespace VEPROMS.CSLA.Library
return retval; return retval;
} }
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
// startIndex = Index in the Grid at which the text we want to replace is starting
//basic Grid data partitioning using the variables in this sub is as follows:
//
// [indexOfPrefix] [indx]
// | |
// [text before last occurrence of prefix] {prefix} [rest of fonts] [text after fonts]
private int GetLocationToInsertFontInGrid(int startIndex)
{
//searches backwards from the srtIndex for the last previous occurrence of the prefix
string prefix = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{";
int indexOfPrefix = MyGrid.Data.LastIndexOf(prefix, startIndex);
//find the end of the font section
//by passing in the Grid data
//with the following removed:
// - Everything before the last occurrence of the prefix
// - the prefix itself removed
int indx = GetIndexOfCloseBracket(MyGrid.Data.Substring(indexOfPrefix + prefix.Length, startIndex - indexOfPrefix - prefix.Length));
if (indx > -1)
{
indx += indexOfPrefix;
indx += prefix.Length;
}
//indx will contain last spot inside the font section
return indx;
}
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// this function will find the corresponding occurrence of a closing bracket :
// usage is you pass in some text after an opening bracket, and it will tell you what the index is for it closing
private int GetIndexOfCloseBracket(string text)
{
int indx = 0;
Stack<char> stk = new System.Collections.Generic.Stack<char>();
foreach (char c in text)
{
if (c == '{')
stk.Push('{');
else if (c == '}' && stk.Count == 0)
return indx;
else if (c == '}')
stk.Pop();
indx++;
}
return -1;
}
public static string MakeConsistentFormat(string gg) public static string MakeConsistentFormat(string gg)
{ {
// replace degree, bullet dash, hardspace // replace degree, bullet dash, hardspace
@ -1307,7 +1404,19 @@ namespace VEPROMS.CSLA.Library
else else
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
} }
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// This will handle if there is a delta and the column/row of the grid is removed
//then restored from history
if (newvalue.Contains(@"\u916?"))
{
Match m = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m.Groups.Count < 3 && !ContentItems[0].MyDocVersion.MyFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups.Count < 3)
newvalue = newvalue.Replace(@"\u916?", $"{(char)916}");
else
newvalue = newvalue.Replace(@"\u916?", m.Groups[1].Value + @"\u916?" + m.Groups[3].Value);
}
if (newvalue.Contains(@"\u8593?")) if (newvalue.Contains(@"\u8593?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");

View File

@ -11,6 +11,7 @@ using System.Xml;
using System.Drawing; using System.Drawing;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Volian.Base.Library; using Volian.Base.Library;
using System.Linq;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
@ -402,6 +403,99 @@ namespace VEPROMS.CSLA.Library
return tmpForLink; return tmpForLink;
} }
//CSM B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
// This will be used to simulate the non-high level part of a tab
// for case where sorting and all other fields match
// Note: This is cut down to improve the sort's performance
// but congruent to Volian.Print.Library.PDFReport-> BuildStepTab(ItemInfo item)
public string BuildStepTab()
{
StringBuilder sret = new StringBuilder();
ItemInfo pitem = this;
while (!pitem.IsSection && !pitem.IsHigh)
{
using (StepInfo stpinfo = StepInfo.Get(pitem.ItemID))
{
string thisTab = stpinfo.MyTab.CleanText;
string typeName = stpinfo.FormatStepData.StepEditData.TypeMenu.MenuItem;
if (!string.IsNullOrEmpty(thisTab))
{
thisTab = thisTab.Trim();
}
// if the tab is null or
// if the the tab is not a letter or number OR
// the tab is an AND or OR type and is the letter "o"
// then reset the tab an empty string so that the type name along with the count of that type
// (ex. "AND 2", "OR 3")
if (string.IsNullOrEmpty(thisTab) || (thisTab != string.Empty && (!(char.IsLetterOrDigit(thisTab[0])) || ((pitem.IsAnd || pitem.IsOr || pitem.IsCaution || pitem.IsNote) && thisTab.Contains("o")))))
{
thisTab = string.Empty;
}
if (pitem.IsRNOPart)
{
if (string.IsNullOrEmpty(thisTab))
{
sret.Insert(0, "RNO.");
}
else
{
thisTab = thisTab.Trim();
if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")"))
{
thisTab += ".";
}
sret.Insert(0, "RNO." + thisTab);
}
}
else if (pitem.IsCaution || pitem.IsNote)
{
// add the Caution or Note count to the tab (ex "Caution 1", "Note 2")
if (string.IsNullOrEmpty(thisTab))
{
sret.Append("{" + typeName + " " + pitem.Ordinal.ToString() + "}");
}
else
{
thisTab = thisTab.Trim(" ".ToCharArray());
sret.Append(thisTab + " " + pitem.Ordinal.ToString() + sret);
}
}
else
{
if (!string.IsNullOrEmpty(thisTab))
{
thisTab = thisTab.Trim(" ".ToCharArray());
if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")"))
{
thisTab += ".";
}
}
else
{
thisTab = "{" + typeName + " " + pitem.Ordinal.ToString() + "}.";
}
sret.Insert(0, thisTab);
}
}
pitem = pitem.ActiveParent as ItemInfo;
if (pitem == null)
break;
}
return sret.ToString().Trim(" .)".ToCharArray());
}
public void SetHeader(VE_Font myFont, string myText) public void SetHeader(VE_Font myFont, string myText)
{ {
_MyHeader = new MetaTag(myFont); _MyHeader = new MetaTag(myFont);
@ -619,12 +713,14 @@ namespace VEPROMS.CSLA.Library
{ {
TranCheckCount = 0; TranCheckCount = 0;
TranFixCount = 0; TranFixCount = 0;
TranCantFixCount = 0;
TranConvertCount = 0;// B2018-002 - Invalid Transitions - Initialize Transition Conversion Count TranConvertCount = 0;// B2018-002 - Invalid Transitions - Initialize Transition Conversion Count
} }
public static int TranCheckCount = 0; public static int TranCheckCount = 0;
public static int TranFixCount = 0; public static int TranFixCount = 0;
public static int TranConvertCount = 0;// B2018-002 - Invalid Transitions - Declare Transition Conversion Count public static int TranConvertCount = 0;// B2018-002 - Invalid Transitions - Declare Transition Conversion Count
public static int TranCantFixCount = 0;
internal static TransitionInfoList TransitionsToDisconnected; internal static TransitionInfoList TransitionsToDisconnected;
internal static TransitionInfoList TransitionsToNonEditable; internal static TransitionInfoList TransitionsToNonEditable;
@ -731,6 +827,15 @@ namespace VEPROMS.CSLA.Library
content.Save(); content.Save();
} }
} }
else if (newText.Contains("<CTID=-"))
{
//CSM C2024-028 - Bad Transition Link - Make an annotation
using (Item itm = Item.Get(itemInfo.ItemID))
{
TranCantFixCount++;
Annotation.MakeAnnotation(itm, AnnotationType.GetByNameOrCreate("Bad Transition Link"), "", $"Invalid Transition Link: ({ItemInfo.ConvertToDisplayText(newValue)})", null);
}
}
} }
} }
} }
@ -3134,6 +3239,24 @@ namespace VEPROMS.CSLA.Library
//get { return ConvertToDisplayText(MyContent.Number); } //get { return ConvertToDisplayText(MyContent.Number); }
} }
//CSM B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
//Get Numeric part of HLS Tab
//Used for Certain sorting situations
//If no numeric part then use 999 (will be at end of that level of the sort if there are other items with numbered HLS)
public int NumericSortNumber
{
get
{
string numericpart = null;
if (MyHLS != null)
numericpart = new string(MyHLS?.MyTab?.CleanTextNoSymbols.TakeWhile(Char.IsDigit).ToArray());
if (!string.IsNullOrEmpty(numericpart) && numericpart.All(char.IsNumber))
return int.Parse(numericpart);
else
return 999;
}
}
// for step designators (a redefined caution type used in Comanche Peak with the SameRowAsParentMultiLines format flag) // for step designators (a redefined caution type used in Comanche Peak with the SameRowAsParentMultiLines format flag)
// we what to allow for a hard return to allow for multiple designator lines - jsj 5/21/2015 // we what to allow for a hard return to allow for multiple designator lines - jsj 5/21/2015
public static string ConvertToMulitLineStepDesignatorDisplayText(string txt) public static string ConvertToMulitLineStepDesignatorDisplayText(string txt)
@ -6139,6 +6262,168 @@ namespace VEPROMS.CSLA.Library
throw new DbCslaException("Error on ItemInfoList.GetChildren", ex); throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
} }
} }
//CSM B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
// Found various inconsistencies in the reports so adding this to manually sort
//instead of binding the sort to 1 or 2 individual fields
public List<ItemInfo> SortedList(bool sortbyFoundRoid = false)
{
List<ItemInfo> tmp = new List<ItemInfo>(this);
if (sortbyFoundRoid)
{
// Priority of Sorting order:
// 1. FoundRoid (by Referenced Object ID)
// 2. SearchDVPath_clean (Which Procedure Set it is in - I.E. EOPs, Background, SAMGs, etc...)
// 3. Keep in order of the Procedures within the set
// 4. Keep in the order of the Section within the Procedure
// 5. NumericSortNumber - numeric part of the HLS if there is one
// 6. Substep Tab - will sort as a string since combined numbers/text
tmp.Sort(comparison: delegate (ItemInfo x, ItemInfo y)
{
int cmp = 0;
int FoundROID_cmp = x.FoundROID.CompareTo(y.FoundROID);
switch (FoundROID_cmp)
{
case int result when result < 0:
cmp -= 10000000;
break;
case int result when result == 0:
break;
case int result when result > 0:
cmp += 10000000;
break;
default:
break;
}
int DVPath_cmp = x.SearchDVPath_clean.CompareTo(y.SearchDVPath_clean);
switch (DVPath_cmp)
{
case int result when result < 0:
cmp -= 1000000;
break;
case int result when result == 0:
break;
case int result when result > 0:
cmp += 1000000;
break;
default:
break;
}
if (x.MyProcedure != null && y.MyProcedure != null)
{
cmp += (x.MyProcedure.Ordinal.CompareTo(y.MyProcedure.Ordinal) * 100000);
}
if (x.ActiveSection != null && y.ActiveSection != null)
{
cmp += (x.ActiveSection.Ordinal.CompareTo(y.ActiveSection.Ordinal) * 100000);
}
cmp += x.NumericSortNumber.CompareTo(y.NumericSortNumber) * 10;
if (cmp == 0)
{
int StepTab_cmp = (x.BuildStepTab()).CompareTo(y.BuildStepTab());
switch (StepTab_cmp)
{
case int result when result < 0:
cmp -= 1;
break;
case int result when result == 0:
break;
case int result when result > 0:
cmp += 1;
break;
default:
break;
}
}
return cmp;
});
}
else
{
// Priority of Sorting order:
// 1. SearchDVPath_clean (Which Procedure Set it is in - I.E. EOPs, Background, SAMGs, etc...)
// 2. Keep in order of the Procedures within the set
// 3. Keep in the order of the Section within the Procedure
// 4. NumericSortNumber - numeric part of the HLS if there is one
// 5. Substep Tab - will sort as a string since combined numbers/text
// 6. FoundRoid (by Referenced Object ID)
tmp.Sort(comparison: delegate (ItemInfo x, ItemInfo y)
{
int cmp = 0;
int DVPath_cmp = x.SearchDVPath_clean.CompareTo(y.SearchDVPath_clean);
switch (DVPath_cmp)
{
case int result when result < 0:
cmp -= 10000000;
break;
case int result when result == 0:
break;
case int result when result > 0:
cmp += 10000000;
break;
default:
break;
}
if (x.MyProcedure != null && y.MyProcedure != null)
{
cmp += (x.MyProcedure.Ordinal.CompareTo(y.MyProcedure.Ordinal) * 1000000);
}
if (x.ActiveSection != null && y.ActiveSection != null)
{
cmp += (x.ActiveSection.Ordinal.CompareTo(y.ActiveSection.Ordinal) * 100000);
}
cmp += (x.NumericSortNumber.CompareTo(y.NumericSortNumber) * 100);
if (cmp == 0)
{
int StepTab_cmp = (x.BuildStepTab()).CompareTo(y.BuildStepTab());
switch (StepTab_cmp)
{
case int result when result < 0:
cmp -= 10;
break;
case int result when result == 0:
break;
case int result when result > 0:
cmp += 10;
break;
default:
break;
}
}
int FoundROID_cmp = x.FoundROID.CompareTo(y.FoundROID);
switch (FoundROID_cmp)
{
case int result when result < 0:
cmp -= 1;
break;
case int result when result == 0:
break;
case int result when result > 0:
cmp += 1;
break;
default:
break;
}
return cmp;
});
}
return tmp;
}
[Serializable()] [Serializable()]
private class MoveItemCriteria private class MoveItemCriteria
{ {
@ -7314,11 +7599,11 @@ namespace VEPROMS.CSLA.Library
} }
this.RaiseListChangedEvents = true; this.RaiseListChangedEvents = true;
} }
#endregion #endregion
} }
#endregion #endregion
#region new class TransitionLookup #region new class TransitionLookup
public delegate ProcedureInfo TransitionLookupEvent(object sender, TransitionLookupEventArgs args); public delegate ProcedureInfo TransitionLookupEvent(object sender, TransitionLookupEventArgs args);
public class TransitionLookupEventArgs public class TransitionLookupEventArgs
{ {
private int _ProcID; private int _ProcID;

View File

@ -6213,6 +6213,36 @@ public StepData Equation // equation has a parent of embedded object.
} }
} }
// F2024-078 adjusts the the spacing before the Note/Caution tab - the space betwee the top of the box and the tab text
private LazyLoad<float?> _AdjSpB4Tab;
public float? AdjSpB4Tab
{
get
{
return LazyLoad(ref _AdjSpB4Tab, "@AdjSpB4Tab");
}
}
// F2024-078 adjusts the the spacing after the Note/Caution tab - the space betwee the tab text and the first line of of Note/Caution text
private LazyLoad<float?> _AdjSpAftTab;
public float? AdjSpAftTab
{
get
{
return LazyLoad(ref _AdjSpAftTab, "@AdjSpAftTab");
}
}
// F2024-078 adjusts the the spacing after the last line of Note/Caution text - between the last line of text and the bottom of the box
private LazyLoad<float?> _AdjLastBlnkLn;
public float? AdjLastBlnkLn
{
get
{
return LazyLoad(ref _AdjLastBlnkLn, "@AdjLastBlnkLn");
}
}
// this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box // this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box
private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings
public bool ThickDouble public bool ThickDouble

View File

@ -17,10 +17,10 @@ namespace Volian.Base.Library
return new List<string>(text.Split(mySplit, StringSplitOptions.None)); return new List<string>(text.Split(mySplit, StringSplitOptions.None));
} }
int width = 0; // width of text, non-rtf int width = 0; // width of text, non-rtf
int start = 0; // start of line (index into string 'text'), includes rtf int start = 0; // start of line (index into string 'text'), includes rtf
int lastspace = 0; // location of lastspace (index into string 'text'), includes rtf int lastspace = 0; // location of lastspace (index into string 'text'), includes rtf
int startNonRtf = 0; // start of line, non-rtf (used for determining starting position to determine width if there was a break) int startNonRtf = 0; // start of line, non-rtf (used for determining starting position to determine width if there was a break)
string rtfprefix = ""; string rtfprefix = "";
string nextprefix = ""; string nextprefix = "";
for (int indx = 0; indx < text.Length; indx++) for (int indx = 0; indx < text.Length; indx++)
@ -125,32 +125,9 @@ namespace Volian.Base.Library
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) does not show it // converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) does not show it
rtnStr = rtnStr.Replace(@"\'99", @"\u8482?"); rtnStr = rtnStr.Replace(@"\'99", @"\u8482?");
// convert \'ae to \u174? this is for the registered symbol. RTF converts the unicode character to \'ae // convert \'ae to \u174? this is for the registered symbol. RTF converts the unicode character to \'ae
rtnStr = rtnStr.Replace(@"\'ae",@"\u174?"); rtnStr = rtnStr.Replace(@"\'ae", @"\u174?");
// convert \'a9 to \u169? this is for the copyright symbol. RTF converts the unicode character to \'a9 // convert \'a9 to \u169? this is for the copyright symbol. RTF converts the unicode character to \'a9
rtnStr = rtnStr.Replace(@"\'a9",@"\u169?"); rtnStr = rtnStr.Replace(@"\'a9", @"\u169?");
// B2021-039: paste of the greek symbols was not working correctly, RTF was converting unicode, similar to above
// B2022-052: Division symbol converted to an x, caused by fix B2021-039. The code below was translating the division
// symbol but it should only be translated if the character's font is Greek or Baltic. Unfortunately this is not
// a complete solution since it converts characters it shouldn't, for example, using the following steps: all
// of Proms symbols are entered into a step; a ctrl-a/ctrl-c is used to copy these and then ctrl-v to paste
// into another new step. The paste (from the underlying richtextbox) causes some characters to be in plain
// arial font, and others to be in arial with Greek flag. Some character codes exist in each font, for example f7.
// The code below does not look into what font is used, just converts the character. Since any kind of font
// can occur during paste, if from an external program, a message will be given stating that a symbol may be incorrect
// because an unsupported font was pasted. It was felt that this was sufficient based on estimate of fix versus chance of
// occurrence. Note that the message was moved into StepRTB since this code is called by non-UI code (5/26/22)
if (str.ToUpper().Contains("GREEK") || str.ToUpper().Contains("BALTIC"))
{
//System.Windows.Forms.MessageBox.Show("Pasted text may use an unsupported font so some characters may not paste correctly and may require delete/reenter of character from within Proms.",
// "Paste Font Issue", System.Windows.Forms.MessageBoxButtons.OK);
for (int i = 0; i < 26; i++)
{
rtnStr = rtnStr.Replace(string.Format("\\'{0:x2}", 0xc0 + i) // upper case Greek
, string.Format("\\u{0}?", 912 + i));
rtnStr = rtnStr.Replace(string.Format("\\'{0:x2}", 0xe0 + i) // lower case Greek
, string.Format("\\u{0}?", 944 + i));
}
}
return rtnStr; return rtnStr;
} }
} }

View File

@ -1078,7 +1078,13 @@ namespace Volian.Controls.Library
} }
else if (searchValue.Contains("#Link:ReferencedObject")) // RO Link (roid) else if (searchValue.Contains("#Link:ReferencedObject")) // RO Link (roid)
{ {
searchValue = searchValue.Replace("1[END>", string.Empty).Trim(); // we where only removing the END if the searchValue ended in "1[END>"
// but sometimes it ended in "2[END>" and cause a null reference error
// - was seen only running via Visual Studio debugger
// I cleaned up the code to remove in ether case so that we get the expected roid value - jsj 11-18-2024
string substr = searchValue.Substring(searchValue.LastIndexOf(" "));
if (substr.Contains("[END>"))
searchValue = searchValue.Substring(0, searchValue.Length - substr.Length);
string roid = ROFSTLookup.FormatRoidKey(searchValue.Substring(searchValue.LastIndexOf(" ")), true); string roid = ROFSTLookup.FormatRoidKey(searchValue.Substring(searchValue.LastIndexOf(" ")), true);
if (roid != selectedChld.roid) if (roid != selectedChld.roid)

View File

@ -805,16 +805,8 @@ namespace Volian.Controls.Library
string SearchString = GetListOfROs(true);// Include the RODbID in the RO list string SearchString = GetListOfROs(true);// Include the RODbID in the RO list
ItemInfoList SearchResults = ItemInfoList.GetListFromROReport(DocVersionList, "", SearchString, ""); ItemInfoList SearchResults = ItemInfoList.GetListFromROReport(DocVersionList, "", SearchString, "");
if (!usageSortedByProcedure) // sort on ROs List<ItemInfo> sortedResults = SearchResults.SortedList(!usageSortedByProcedure);
{ OnPrintRequest(new DisplayReportsEventArgs("Referenced Objects Usage By RO", "RO Usage", sortedResults, usageSortedByProcedure, cbxIncldMissingROs.Checked, paperSize));
Csla.SortedBindingList<ItemInfo> sortedResults = new Csla.SortedBindingList<ItemInfo>(SearchResults);
sortedResults.ApplySort("FoundROID", ListSortDirection.Ascending);
OnPrintRequest(new DisplayReportsEventArgs("Referenced Objects Usage By RO", "RO Usage", sortedResults, usageSortedByProcedure, cbxIncldMissingROs.Checked, paperSize));
}
else
{
OnPrintRequest(new DisplayReportsEventArgs("Referenced Objects Usage By Procedure", "RO Usage", SearchResults, usageSortedByProcedure, cbxIncldMissingROs.Checked, paperSize));
}
} }
else if (cbxTransFromProcs.Checked) else if (cbxTransFromProcs.Checked)
{ {

View File

@ -30,7 +30,8 @@ namespace Volian.Controls.Library
//We need to check to see if the current database has been updated with the necessary changes //We need to check to see if the current database has been updated with the necessary changes
//to the folder configuration value. If so then build the list of available to be returned //to the folder configuration value. If so then build the list of available to be returned
//to the calling code //to the calling code
if (fList == null) // added check for a list count of zero. Was getting null error from data gotten from customer
if (fList == null || fList.Count == 0)
{ {
_MyLog.InfoFormat("Filtered format list not available: Database update needed for config value of top folder record"); _MyLog.InfoFormat("Filtered format list not available: Database update needed for config value of top folder record");
return RawList; return RawList;

View File

@ -11,6 +11,7 @@ using System.Text.RegularExpressions;
using VEPROMS.CSLA.Library; using VEPROMS.CSLA.Library;
using Volian.Base.Library; using Volian.Base.Library;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
using System.Linq;
namespace Volian.Controls.Library namespace Volian.Controls.Library
{ {
@ -2855,7 +2856,10 @@ namespace Volian.Controls.Library
return false; return false;
} }
public string GetPasteText(bool PasteNoReturnsSetting, IDataObject myDO) //CSM B2023-095/U2022-004 When Copy/Pasting Symbols, some of the symbols paste in an incorrect font
// Changed this to put in the unicode code for any symbols outside the normal ascii range
// if supplied convertunicode flag is true
public string GetPasteText(bool PasteNoReturnsSetting, IDataObject myDO, bool convertunicode = false)
{ {
// B2021-0039: symbols not pasting correctly from ctrl-v: // B2021-0039: symbols not pasting correctly from ctrl-v:
// get base list of valid symbols, use base format if MyItemInfo is null. Use symbols from // get base list of valid symbols, use base format if MyItemInfo is null. Use symbols from
@ -2871,40 +2875,31 @@ namespace Volian.Controls.Library
ptext = ptext.TrimEnd("\r\n\t ".ToCharArray()); ptext = ptext.TrimEnd("\r\n\t ".ToCharArray());
if (PasteNoReturnsSetting) ptext = ptext.Replace("\r\n", " "); if (PasteNoReturnsSetting) ptext = ptext.Replace("\r\n", " ");
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
bool didCharReplace = false;
bool hasBadChar = false; bool hasBadChar = false;
for (int i = 0; i < ptext.Length; i++) foreach (char c in ptext)
{ {
didCharReplace = false; if ((c > 0x7e))
string sym = string.Format(@"{0}", Convert.ToInt32(ptext[i]));
if ((ptext[i] > 0x7e))
{ {
// is this an allowable symbol/character: // is this an allowable symbol/character:
for (int j = 0; j < sl.Count; j++) if (allowableSymbols.Any(x => x == $@"{(short)c}"))
{ {
if (sym == allowableSymbols[j]) if (convertunicode)
{ sb.Append($"\\u{(short) c}?");
sb = sb.Append((char)(Convert.ToInt32(allowableSymbols[j]))); else
didCharReplace = true; sb.Append(c);
break; }
} else
}
// if not allowable, put in a "?" and give a message to user (below)
if (!didCharReplace)
{ {
sb = sb.Append("?");
didCharReplace = true;
hasBadChar = true; hasBadChar = true;
sb.Append("?");
}
} }
if (!didCharReplace) else
sb = sb.Append(ptext[i]); sb.Append(c);
} }
if (!didCharReplace) ptext = sb.ToString();
sb = sb.Append(ptext[i]); ptext = ptext.Replace("\u2013", "-"); // Replace EN Dash with hyphen
}
ptext = sb.ToString();
ptext = ptext.Replace("\u2013", "-"); // Replace EN Dash with hyphen
ptext = ptext.Replace("\u2014", "-"); // Replace EM Dash with hyphen ptext = ptext.Replace("\u2014", "-"); // Replace EM Dash with hyphen
ptext = ptext.Replace("\u2011", "-"); // Replace non-breaking hyphen with hyphen ptext = ptext.Replace("\u2011", "-"); // Replace non-breaking hyphen with hyphen
ptext = ptext.Replace("\u2572", "\\"); // Replace backslash symbol with backslash character ptext = ptext.Replace("\u2572", "\\"); // Replace backslash symbol with backslash character

View File

@ -1376,7 +1376,9 @@ namespace Volian.Controls.Library
public static String GetDefaultKeyValue(String key) public static String GetDefaultKeyValue(String key)
{ {
object xxx = null; object xxx = null;
return Registry.GetValue(key, "", xxx).ToString(); // fixed null reference error - appeared only while debugged - for user was handled via Try/Catch and ignored
object gtval = Registry.GetValue(key, "", xxx);
return (string)((gtval != null) ? gtval.ToString() : gtval);
} }
private EditItem FindStepAfter(string types, int contenttype) private EditItem FindStepAfter(string types, int contenttype)
{ {
@ -2881,12 +2883,19 @@ namespace Volian.Controls.Library
tmpForLink = ItemInfo.ReplaceLinkWithNewID(tmpForLink); tmpForLink = ItemInfo.ReplaceLinkWithNewID(tmpForLink);
myRtb.SelectedRtf = tmpForLink; myRtb.SelectedRtf = tmpForLink;
// Fix for B2014-071: if link, save after paste so that goto's don't crash (grid & step run through this code) // Fix for B2014-071: if link, save after paste so that goto's don't crash (grid & step run through this code)
if (tmpForLink.Contains("<NewID>")) _MyStepRTB.OnDoSaveContents(this, new EventArgs()); if (tmpForLink.Contains("<NewID>")) _MyStepRTB.OnDoSaveContents(this, new EventArgs());
} }
} }
else if (myDO.GetDataPresent(DataFormats.Text)) else if (myDO.GetDataPresent(DataFormats.Text))
myRtb.SelectedText = _MyStepRTB.GetPasteText(PasteNoReturnsSetting, myDO); {
//CSM B2023-095/U2022-004 When Copy/Pasting Symbols, some of the symbols paste in an incorrect font
// Changed this to put in the unicode code for any symbols outside the normal ascii range
// Also need to input as an RTF so that correct font is used with these
// and unicode is converted to actual text
string clipboardtext = _MyStepRTB.GetPasteText(PasteNoReturnsSetting, myDO, true);
myRtb.SelectedRtf = _MyStepRTB.RtfPrefixForSymbols + clipboardtext + @"}";
}
if (myRtb.SelectionLength == 0 && myRtb is StepRTB) myRtb.SelectionFont = (myRtb as StepRTB).MyStyleFont.WindowsFont; if (myRtb.SelectionLength == 0 && myRtb is StepRTB) myRtb.SelectionFont = (myRtb as StepRTB).MyStyleFont.WindowsFont;
_PastePlainTextOvrRide = false; _PastePlainTextOvrRide = false;
_PasteStepTextOvrRide = false; _PasteStepTextOvrRide = false;
@ -3132,7 +3141,13 @@ namespace Volian.Controls.Library
// a referenced object, bring up ReferencedObject Editor (for now, just put up a message box. // a referenced object, bring up ReferencedObject Editor (for now, just put up a message box.
if (_MyStepRTB.MyLinkText != null && _MyStepRTB.MyLinkText.IndexOf("Transition") > -1) if (_MyStepRTB.MyLinkText != null && _MyStepRTB.MyLinkText.IndexOf("Transition") > -1)
{ {
_MyEditItem.MyStepPanel.OnLinkClicked(sender, new StepPanelLinkEventArgs(_MyStepRTB.MyLinkText)); // B2021-094 fix for <Shift><Ctrl><G> key stroke for GoTo Transition or RO link
// Needed to clear the selection of the link or it will be used the next time
// <Shift><Ctrl><G> is used
string lnkText = _MyStepRTB.MyLinkText; // save the transition link information
_MyStepRTB.SetSelection(0, 0); // Clear the selection of the transition link
// note _MyStepRTB.DeselectAll() did not work all the time
_MyEditItem.MyStepPanel.OnLinkClicked(sender, new StepPanelLinkEventArgs(lnkText));
} }
else else
{ {
@ -3155,7 +3170,12 @@ namespace Volian.Controls.Library
} }
else else
{ {
LinkText lt = new LinkText(_MyStepRTB.MyLinkText); LinkText lt = new LinkText(_MyStepRTB.MyLinkText); // save the RO link information
// B2021-094 fix for <Shift><Ctrl><G> key stroke for GoTo Transition or RO link
// Needed to clear the selection of the link or it will be used the next time
// <Shift><Ctrl><G> is used
_MyStepRTB.SetSelection(0, 0); // clear the selection of the RO link
// note _MyStepRTB.DeselectAll() did not work all the time
//B2023-104 If we could not get the MyRoUsageInfo then we have a bad RO Link. Tell user to re-link the RO //B2023-104 If we could not get the MyRoUsageInfo then we have a bad RO Link. Tell user to re-link the RO
if (lt.MyRoUsageInfo != null) if (lt.MyRoUsageInfo != null)
{ {
@ -3795,7 +3815,7 @@ namespace Volian.Controls.Library
ProcedureInfo.RefreshTransitions(MyItemInfo.MyProcedure as ProcedureInfo); ProcedureInfo.RefreshTransitions(MyItemInfo.MyProcedure as ProcedureInfo);
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics // B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
FlexibleMessageBox.Show(this, string.Format("Checked {0} transitions, modified {1} transitions, converted to text {2} transitions", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information); FlexibleMessageBox.Show(this, string.Format("Checked {0} transitions, modified {1} transitions, converted to text {2} transitions, {3} transitions unable to be fixed (Annotation: Bad Transition Link)", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ProcedureInfo.TranCantFixCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
private void btnRefObjRefresh_Click(object sender, System.EventArgs e) private void btnRefObjRefresh_Click(object sender, System.EventArgs e)
{ {

View File

@ -1074,7 +1074,9 @@ namespace Volian.Print.Library
string lastProcNum = string.Empty; string lastProcNum = string.Empty;
string lastSection = string.Empty; string lastSection = string.Empty;
string lastDVPath = string.Empty; //CSM B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
//setting this to something other than empty - otherwise will not print first initial header
string lastDVPath = "start";
if (_ResultList.Count > 0) if (_ResultList.Count > 0)
{ {
foreach (ItemInfo item in _ResultList) foreach (ItemInfo item in _ResultList)
@ -1088,6 +1090,12 @@ namespace Volian.Print.Library
// procedure set title at the top of the report (once). // procedure set title at the top of the report (once).
if (lastDVPath != "" && lastDVPath != item.SearchDVPath) if (lastDVPath != "" && lastDVPath != item.SearchDVPath)
{ {
//CSM B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
//was placing last item from the precious section in the new section
//place it before starting the new section and then clear items
PutROusageForProcedure(datatable, roUse, headerwidths);
roUse.Clear();
subTable = new PdfPTable(headerwidths); subTable = new PdfPTable(headerwidths);
AddMainPathGroup(datatable, item.SearchDVPath, splitAt, f2, Color.LIGHT_GRAY, 0); AddMainPathGroup(datatable, item.SearchDVPath, splitAt, f2, Color.LIGHT_GRAY, 0);
lastProcNum = string.Empty; lastProcNum = string.Empty;
@ -1138,7 +1146,7 @@ namespace Volian.Print.Library
document.Add(datatable); document.Add(datatable);
} }
private void AddProcROUse(ItemInfo item, SortedDictionary<string, List<ItemInfo>> procRoUse) private void AddProcROUse(ItemInfo item, Dictionary<string, List<ItemInfo>> procRoUse)
{ {
string dictKey = GetCurProcNum(item.SearchPath) + " " + GetCurSectionNumTitle(item); string dictKey = GetCurProcNum(item.SearchPath) + " " + GetCurSectionNumTitle(item);
@ -1157,7 +1165,7 @@ namespace Volian.Print.Library
} }
} }
private void PutStepListForProcedure(PdfPTable rotable, SortedDictionary<string, ItemInfo> sortedStepList) private void PutStepListForProcedure(PdfPTable rotable, Dictionary<string, ItemInfo> sortedStepList)
{ {
// C2017-036 get best available proportional font for symbols that looks close to Arial // C2017-036 get best available proportional font for symbols that looks close to Arial
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16 // Note that Microsoft no longer supplies Arial Unicode MS as of Word16
@ -1173,13 +1181,13 @@ namespace Volian.Print.Library
sortedStepList.Clear(); sortedStepList.Clear();
} }
private void PutROusageForROID(PdfPTable curTable, SortedDictionary<string, List<ItemInfo>> procRoUse, float[] headerwidths, int splitAt, bool moreThanOneProcSet) private void PutROusageForROID(PdfPTable curTable, Dictionary<string, List<ItemInfo>> procRoUse, float[] headerwidths, int splitAt, bool moreThanOneProcSet)
{ {
// C2017-036 get best available proportional font for symbols that looks close to Arial // C2017-036 get best available proportional font for symbols that looks close to Arial
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16 // Note that Microsoft no longer supplies Arial Unicode MS as of Word16
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK); iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
SortedDictionary<string, ItemInfo> sortedStepList = new SortedDictionary<string, ItemInfo>(); Dictionary<string, ItemInfo> sortedStepList = new Dictionary<string, ItemInfo>();
string lastProcKey = string.Empty; string lastProcKey = string.Empty;
string lastProcNumTitle = string.Empty; string lastProcNumTitle = string.Empty;
string lastDVPath = string.Empty; string lastDVPath = string.Empty;
@ -1293,7 +1301,7 @@ namespace Volian.Print.Library
private void BuildROUsageTableByRO(iTextSharp.text.Document document) private void BuildROUsageTableByRO(iTextSharp.text.Document document)
{ {
SortedDictionary<string, List<ItemInfo>> procRoUse = new SortedDictionary<string, List<ItemInfo>>(); Dictionary<string, List<ItemInfo>> procRoUse = new Dictionary<string, List<ItemInfo>>();
float[] headerwidths = { 20, 80 }; float[] headerwidths = { 20, 80 };
PdfPTable datatable = new PdfPTable(1); PdfPTable datatable = new PdfPTable(1);

View File

@ -2953,7 +2953,7 @@ namespace Volian.Print.Library
if (ii.Sections == null) return; // B2021-067 crash on null reference if (ii.Sections == null) return; // B2021-067 crash on null reference
foreach (SectionInfo si in ii.Sections) foreach (SectionInfo si in ii.Sections)
{ {
if (MyPromsPrinter.PrtSectID == -1 || (MyPromsPrinter.PrtSectID > -1 && si.ItemID == MyPromsPrinter.PrtSectID)) if (MyPromsPrinter.PrtSectID == -1 || (MyPromsPrinter.PrtSectID > -1 && (ii.ItemID == MyPromsPrinter.PrtSectID || si.ItemID == MyPromsPrinter.PrtSectID)))
{ {
if (si.IsStepSection) if (si.IsStepSection)
{ {

View File

@ -226,6 +226,8 @@ namespace Volian.Print.Library
else else
yoff += vlnPrintObject.SixLinesPerInch; yoff += vlnPrintObject.SixLinesPerInch;
} }
if (box.MyBox != null)
yoff += (float)(box.MyBox.AdjSpB4Tab ?? 0); // F2024-078 adjust space above the Note/Caution box tab
} }
bxIndex = bxIndx; bxIndex = bxIndx;
} }
@ -273,6 +275,8 @@ namespace Volian.Print.Library
box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch); box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch);
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++; if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
yoff += ln * vlnPrintObject.SixLinesPerInch; yoff += ln * vlnPrintObject.SixLinesPerInch;
if (box.MyBox != null)
yoff += (float)(box.MyBox.AdjSpB4Tab ?? 0); // F2024-078 adjust space above the Note/Caution box tab
} }
} }
bxIndex = bxIndx; bxIndex = bxIndx;
@ -5497,24 +5501,53 @@ namespace Volian.Print.Library
// code looks up parents to see if they have next before returning a 0 (no blank line) // code looks up parents to see if they have next before returning a 0 (no blank line)
// B2022-042: double Caution followed by Critical Step missing bullet // B2022-042: double Caution followed by Critical Step missing bullet
// F2022-010: substeps in multiple notes, cautions, warning print differently // F2022-010: substeps in multiple notes, cautions, warning print differently
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn && (MyItemInfo.IsInCautionOrNote)) if (MyItemInfo.IsInCautionOrNote)
{ {
if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.NextItem == null)) // there are no sub-steps, see if any parents have next float adjLastBlankLineInNoteCautionWarning = 0;
// Get the box information for the Note, Caution, or Warning
ItemInfo tifo = (MyItemInfo.IsCaution || MyItemInfo.IsNote) ? MyItemInfo : MyItemInfo.ParentNoteOrCaution;
int typ = ((int)tifo.MyContent.Type) % 10000;
int? bxIndx = tifo.ActiveFormat.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
if (bxIndx != null)
{ {
ItemInfo par = MyItemInfo.MyParent; Box bx = tifo.ActiveFormat.PlantFormat.FormatData.BoxList[(int)bxIndx];
while (par.IsInCautionOrNote) // while in the caution or note, see if there is anything below this item // F2024-078 save the adjustment of the last blank line - this value will be added to the SixLinesPerInch value (a blank line)
{ adjLastBlankLineInNoteCautionWarning = (float)(bx.AdjLastBlnkLn ?? 0);
// if there is no next item, or content types are different, go up to see if the parent has any next item. If note }
// keep going up tree, otherwise there is a next so don't return 0, i.e. continue on with code to determine //}
// whether there is a blank line // if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn && (MyItemInfo.IsInCautionOrNote))
if ((par.NextItem == null) || (par.MyContent.Type != par.NextItem.MyContent.Type)) par = par.MyParent; // F2024-078 added check for adjustment of the last blank line in the Note/Caution box
else break; if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn || adjLastBlankLineInNoteCautionWarning != 0)
} {
if (!par.IsInCautionOrNote || (par != null && par.MyContent.Type != par.NextItem.MyContent.Type)) return 0; if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.NextItem == null)) // there are no sub-steps, see if any parents have next
{
ItemInfo par = MyItemInfo.MyParent;
while (par.IsInCautionOrNote) // while in the caution or note, see if there is anything below this item
{
// if there is no next item, or content types are different, go up to see if the parent has any next item. If note
// keep going up tree, otherwise there is a next so don't return 0, i.e. continue on with code to determine
// whether there is a blank line
if ((par.NextItem == null) || (par.MyContent.Type != par.NextItem.MyContent.Type)) par = par.MyParent;
else break;
}
if (!par.IsInCautionOrNote || (par != null && par.MyContent.Type != par.NextItem.MyContent.Type))
{
if (adjLastBlankLineInNoteCautionWarning != 0)
return SixLinesPerInch + adjLastBlankLineInNoteCautionWarning; // F2024-078 adjust the size of the last blank line of Note/Caution box
else
return 0; // no blank line after last text line of Note/Caution/Warning
}
}
if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && MyItemInfo.NextItem != null && MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)
{
if (adjLastBlankLineInNoteCautionWarning != 0)
return SixLinesPerInch + adjLastBlankLineInNoteCautionWarning;
else
return 0; // no blank line after last text line of Note/Caution/Warning
}
} }
if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && MyItemInfo.NextItem != null && MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type) return 0;
} }
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
// B2022-003: BNPP Alarms (BNPPalr) - incorrect line spacing for substeps off substeps. Added a format flag so as not to affect other plants. // B2022-003: BNPP Alarms (BNPPalr) - incorrect line spacing for substeps off substeps. Added a format flag so as not to affect other plants.
if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepPrintData != null && MyItemInfo.FormatStepData.StepPrintData.BlankAfterSubWithSub && MyItemInfo.NextItem != null && MyItemInfo.HasChildren && MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0) return SixLinesPerInch; if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepPrintData != null && MyItemInfo.FormatStepData.StepPrintData.BlankAfterSubWithSub && MyItemInfo.NextItem != null && MyItemInfo.HasChildren && MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0) return SixLinesPerInch;
@ -5797,6 +5830,7 @@ namespace Volian.Print.Library
float hdrWidth = (itemInfo.MyHeader.CleanText == null) ? 0 : itemInfo.MyHeader.CleanText.Length * 6; float hdrWidth = (itemInfo.MyHeader.CleanText == null) ? 0 : itemInfo.MyHeader.CleanText.Length * 6;
int typ = ((int)itemInfo.MyContent.Type) % 10000; int typ = ((int)itemInfo.MyContent.Type) % 10000;
int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex; int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
float adjmentAfterBoxedNoteCautionTab = 0; // F2024-078 used to save the adjustment of the space after the Note/Caution tab
if (itemInfo.MyHeader.Justify == System.Drawing.ContentAlignment.MiddleCenter) if (itemInfo.MyHeader.Justify == System.Drawing.ContentAlignment.MiddleCenter)
{ {
@ -5806,7 +5840,8 @@ namespace Volian.Print.Library
if (bx.TabPos > 0) if (bx.TabPos > 0)
xoff += (float)bx.TabPos; // xoff starts as left margin xoff += (float)bx.TabPos; // xoff starts as left margin
else else
xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin
adjmentAfterBoxedNoteCautionTab = (float) (bx.AdjSpAftTab ?? 0); // F2024-078 save the adjustment of the space (line) after the Note/Caution tab
} }
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && itemInfo.IsInRNO && (itemInfo.IsCaution || itemInfo.IsNote)) // C2014-009 else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && itemInfo.IsInRNO && (itemInfo.IsCaution || itemInfo.IsNote)) // C2014-009
xoff = XOffset + (para.Width / 2) - (hdrWidth / 2); xoff = XOffset + (para.Width / 2) - (hdrWidth / 2);
@ -5841,7 +5876,7 @@ namespace Volian.Print.Library
// F2022-121 added SpecialStepsFoldoutKeepWhiteSpace flag to allow for all of the other special foldout formatting, but // F2022-121 added SpecialStepsFoldoutKeepWhiteSpace flag to allow for all of the other special foldout formatting, but
// not compress the page - this need to handle explicit OR and AND sub-steps to ensure there are blank lines before and after // not compress the page - this need to handle explicit OR and AND sub-steps to ensure there are blank lines before and after
// the separator text. // the separator text.
return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.SpecialStepsFoldout && MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0); return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.SpecialStepsFoldout && MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0) + adjmentAfterBoxedNoteCautionTab; // F2024-078 add adjustment to the space after the Note/Caution tab
} }
private float AdjustToCharPosition(float position, float? CPI) private float AdjustToCharPosition(float position, float? CPI)
{ {
@ -6852,7 +6887,13 @@ namespace Volian.Print.Library
} }
else if (itemInfo.IsSection) else if (itemInfo.IsSection)
{ {
Width = ToInt(formatInfo.MyStepSectionLayoutData.WidSTablePrint, maxRNO); // B2023-074 The itemInfo we are processing is a section (number and title). Change maxRNO to zero to getting the width.
// The Width is used when printing the section number and title (when the check box on the properties page is checked)
// and is assumemed the section is a single column section (maxRNO = 0) and uses the format variable WidSTablePrint
// which holds the widths for then the section has one column, two column, or three column.
// For printing section numbers and titles like this, we always want to accomodate for lone section title text.
// So the initial width should always be set to the one column width value so that it can spane across the page.
Width = ToInt(formatInfo.MyStepSectionLayoutData.WidSTablePrint, 0);
float adjwidths = 0; float adjwidths = 0;
adjwidths = AdjustMetaWidth(itemInfo, formatInfo, adjwidths, false); adjwidths = AdjustMetaWidth(itemInfo, formatInfo, adjwidths, false);
Width += (adjwidths + _WidthAdjust); Width += (adjwidths + _WidthAdjust);