This commit is contained in:
Kathy Ruffing 2009-01-27 15:48:51 +00:00
parent d548cf9b29
commit 9edcad0c66
4 changed files with 2255 additions and 2551 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -118,13 +118,13 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>521, 17</value> <value>500, 17</value>
</metadata> </metadata>
<metadata name="docVersionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="docVersionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>269, 17</value> <value>227, 17</value>
</metadata> </metadata>
<metadata name="formatInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="formatInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>660, 17</value> <value>17, 60</value>
</metadata> </metadata>
<data name="ppCmbxFormat.SuperTooltip" xml:space="preserve"> <data name="ppCmbxFormat.SuperTooltip" xml:space="preserve">
<value>Allows you to specify the default format to use for all procedures in this set. <value>Allows you to specify the default format to use for all procedures in this set.
@ -155,39 +155,16 @@ Check "Show Default Settings" to display the "default" Change Bar Custom Message
<value>This will revert the Change Bar Custom Message Line One selection back to using the parent's (default) setting. <value>This will revert the Change Bar Custom Message Line One selection back to using the parent's (default) setting.
Check "Show Default Settings" to display the "default" Change Bar Custom Message (below the Line One selection box).</value> Check "Show Default Settings" to display the "default" Change Bar Custom Message (below the Line One selection box).</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="ppBtnFldrDlg.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEgAA
CxIB0t1+/AAAAn9JREFUOE+lk2tI01EYxhf0oU8WqVEIRpaIBWJgSPUhROmippS3QkkTylsXDMW8ts3b
1G06daVibuqaOq0sxbBCKBSJ0PJCialZUFSKqaGSt1//TbIsww8deOBwznl+5zkv71kHiP5rGAFrKb1Q
5ypR6bmaVU6m2kCiXJv007Om2XgwJEaNT4QiyDi/GF9mKRVgsWkav+CYQkR1utwAQfypphqZ4l/JIhOL
jvtGKfCOyDMB6O/WMjNea9L3MT1zIxoM5QrqdWnS1SA+kUq8w1V4hhUgqq1QMj1WtcK88KmIud5oqsqy
qCzOQFMopSQvhRvyBApkcQLzV91E1docpr9ol29eFMz0J0Bv2Kr6C3CrVMa3jyWm2EZzc12OSQ8M2TTo
ZdytzMCgSUVfIqFcfY2bqiSKlQmoc+JNaUSVJRlMvsvHGHuoVUx9lZKFIQkMp63UW2FtMBH6YuBVFF01
/lwO9aoQadSpTAxkwXs596oVtD+ULx36/Qkvg6HDl/k2D2YeufCmwoELZ45MCIA9olKVmK+vJQy3JVOv
l7M4KIae8CVAV6hgPMV8uxczLYeZbDrIaN1eJBG2nHazyDN1cZEymdHueG7rcuh8KiTpixYA56AziMVn
J5h9coyp5kOM1TvxudqejvRNBHrY4GRnZmcCqLMT6GlJ4Y4uGwZS4IUQ97kfs62eTD12YbzBmRGDAx+0
u+iVmyMO24njbqvG5VbOz4yjtjyL3vuRdOSKltUuX0+LbAON0o3UJFmiibPi+pXtBLrvWHR2tHZfBuSm
xZIrPk9mfAiJlwKMleWsvxsnj+7H9YAD+xxssbexwnqbBVs2m7HV3GxlI631E9fa/wGRpaRpa3TTbQAA
AABJRU5ErkJggg==
</value>
</data>
<data name="ppBtnDefaultGrfExt.SuperTooltip" xml:space="preserve">
<value>This will revert the Graphic File Extension selection back to using the parent's (default) setting.
Check "Show Default Settings" to display the "default" graphic file extension setting (below the Graphic File Extension selection box).</value>
</data> </data>
<metadata name="imageCodecInfoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="imageCodecInfoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 57</value> <value>263, 60</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="ppBtnPDFLoc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ppBtnPDFLoc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEgAA YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBQAA
CxIB0t1+/AAAAn9JREFUOE+lk2tI01EYxhf0oU8WqVEIRpaIBWJgSPUhROmippS3QkkTylsXDMW8ts3b CwUByY3ISQAAAn9JREFUOE+lk2tI01EYxhf0oU8WqVEIRpaIBWJgSPUhROmippS3QkkTylsXDMW8ts3b
1G06daVibuqaOq0sxbBCKBSJ0PJCialZUFSKqaGSt1//TbIsww8deOBwznl+5zkv71kHiP5rGAFrKb1Q 1G06daVibuqaOq0sxbBCKBSJ0PJCialZUFSKqaGSt1//TbIsww8deOBwznl+5zkv71kHiP5rGAFrKb1Q
5ypR6bmaVU6m2kCiXJv007Om2XgwJEaNT4QiyDi/GF9mKRVgsWkav+CYQkR1utwAQfypphqZ4l/JIhOL 5ypR6bmaVU6m2kCiXJv007Om2XgwJEaNT4QiyDi/GF9mKRVgsWkav+CYQkR1utwAQfypphqZ4l/JIhOL
jvtGKfCOyDMB6O/WMjNea9L3MT1zIxoM5QrqdWnS1SA+kUq8w1V4hhUgqq1QMj1WtcK88KmIud5oqsqy jvtGKfCOyDMB6O/WMjNea9L3MT1zIxoM5QrqdWnS1SA+kUq8w1V4hhUgqq1QMj1WtcK88KmIud5oqsqy
@ -216,10 +193,10 @@ Fixed - pagination is done only when you select to do so. This information is s
Auto - pagination is done when VE-PROMS senses a change was made to the procedure since the last time the procedure was repaginated.</value> Auto - pagination is done when VE-PROMS senses a change was made to the procedure since the last time the procedure was repaginated.</value>
</data> </data>
<data name="ppGrdLibDocList.ColumnInfo" xml:space="preserve"> <data name="ppGrdLibDocList.ColumnInfo" xml:space="preserve">
<value>13,0,0,0,0,95,Columns:0{Width:98;Name:"DocumentTitle";Caption:"DocumentTitle";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 1{Width:153;Name:"LibraryDocumentUsage";Caption:"LibraryDocumentUsage";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 2{Width:96;Name:"ErrorMessage";Caption:"ErrorMessage";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 3{Width:49;Name:"DocID";Caption:"DocID";Visible:False;AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} 4{Width:140;Name:"DocumentEntryCount";Caption:"Number of Usages";AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} 5{Width:426;Name:"LibTitle";Caption:"Library Document Title";AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 6{Name:"DocContent";Caption:"DocContent";Visible:False;AllowEditing:False;Style:"DataType:System.Byte[];TextAlign:GeneralCenter;";} 7{Width:64;Name:"DocAscii";Caption:"DocAscii";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 8{Width:51;Name:"Config";Caption:"Config";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 9{Width:39;Name:"DTS";Caption:"DTS";Visible:False;AllowEditing:False;Style:"Format:""d"";DataType:System.DateTime;TextAlign:LeftCenter;";} 10{Width:53;Name:"UserID";Caption:"UserID";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 11{Name:"DocumentEntries";Caption:"DocumentEntries";Visible:False;AllowEditing:False;Style:"DataType:VEPROMS.CSLA.Library.EntryInfoList;TextAlign:GeneralCenter;";} 12{Width:156;Name:"MyDocumentInfoUnique";Caption:"MyDocumentInfoUnique";Visible:False;AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} </value> <value>13,0,0,0,0,95,Columns:0{Width:98;Name:"DocumentTitle";Caption:"DocumentTitle";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 1{Width:153;Name:"LibraryDocumentUsage";Caption:"LibraryDocumentUsage";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 2{Width:96;Name:"ErrorMessage";Caption:"ErrorMessage";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 3{Width:49;Name:"DocID";Caption:"DocID";Visible:False;AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} 4{Width:140;Name:"DocumentEntryCount";Caption:"Number of Usages";AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} 5{Width:426;Name:"LibTitle";Caption:"Library Document Title";AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 6{Name:"DocContent";Caption:"DocContent";Visible:False;AllowEditing:False;Style:"DataType:System.Byte[];TextAlign:GeneralCenter;";} 7{Width:64;Name:"DocAscii";Caption:"DocAscii";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 8{Width:51;Name:"Config";Caption:"Config";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 9{Width:39;Name:"DTS";Caption:"DTS";Visible:False;AllowEditing:False;Style:"Format:""d"";DataType:System.DateTime;TextAlign:LeftCenter;";} 10{Width:53;Name:"UserID";Caption:"UserID";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 11{Name:"DocumentEntries";Caption:"DocumentEntries";Visible:False;AllowEditing:False;Style:"TextAlign:GeneralCenter;";} 12{Width:156;Name:"MyDocumentInfoUnique";Caption:"MyDocumentInfoUnique";Visible:False;AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} </value>
</data> </data>
<metadata name="documentInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="documentInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>393, 57</value> <value>17, 103</value>
</metadata> </metadata>
<data name="ppGpbxUserSpecCB.SuperTooltip" xml:space="preserve"> <data name="ppGpbxUserSpecCB.SuperTooltip" xml:space="preserve">
<value>- Select the position of the change bar with respect to the changed text <value>- Select the position of the change bar with respect to the changed text
@ -229,6 +206,25 @@ Auto - pagination is done when VE-PROMS senses a change was made to the procedur
- Type in your own text to be placed next to the change bars.</value> - Type in your own text to be placed next to the change bars.</value>
</data> </data>
<metadata name="dlgROFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="dlgROFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>263, 57</value> <value>526, 60</value>
</metadata>
<data name="btnRoDbProperties.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBwAA
CwcBtnMLwAAAAg9JREFUOE+lk91LU2EAxo9/QV4kgSiBXYggXhS7sBIUiUgHCd4UZTG0u9Ka9sEuumgS
homLcOwcTqGuc5bh59lcM1K3VNoqERoIFjnaVNwEB0sGDbfH933nhLlTBA0eDpzD7/c8nLM3DwD3Xz8q
UMvwq95KEgwNPIUkdqHfbIRgeghzt4HGILp4yJ7Rv8Pxn0ZksvP9PmJfb2BJuc4kFBb8z3MFmWYK6q9U
M0EGjvoasDV7BmFnGYzSPTxwN4GzOb+ARp78BHl8GnQ2hW7r6tm1/fJZ1pyB15RSLFuL0NrXgpuORnDy
5GekUilEImtZcHDRgDadlsF3ms4hoJyEly+GvasQtxqP41LnRbQMa8FJdh8T0OZ1/2PWPO0aI9c6rHp0
TEInnyotwOnyfGjKjqG85Oiz2o4q6Gz14AYnPmI3mUI4HETn3WsIhQKIk8/i835gkuWhCpzXnABvHYPm
QjN5kn5vRKDXPqoB1z++wIDDiSaSWJj3QH+1BourMbj921mCfckR7uXoXC78O4n1WAIrm3EC/2Kw4o3k
CNifUHzjZgJRfguL1YkogU2iHT28gm7LxEGkmQ11Af965mABnU2bv7Hm9GzaLBNYcITUBRb5fXqB5IJl
0Mlg0wuyQMheYBoJqAvM0jtEE7vYoM3hdPPsfjOdLTiCoPAT2w91QZ91ij341xw+eKon8U8nVO3+Hg2+
vkpiAWfjAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="ROPrefixBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata> </metadata>
</root> </root>

View File

@ -15,9 +15,9 @@ namespace Volian.Controls.Library
public partial class DisplayRO : UserControl public partial class DisplayRO : UserControl
{ {
#region Properties #region Properties
private ROFST _CurROFST = null; private ROFstInfo _CurROFST = null;
private ROFST _MyROFST; private ROFstInfo _MyROFST;
public ROFST MyROFST public ROFstInfo MyROFST
{ {
get { return _MyROFST; } get { return _MyROFST; }
set set
@ -130,7 +130,7 @@ namespace Volian.Controls.Library
} }
#endregion #endregion
#region Events #region Events
ROFST.rochild selectedChld; ROFSTLookup.rochild selectedChld;
private void tvROFST_AfterSelect(object sender, TreeViewEventArgs e) private void tvROFST_AfterSelect(object sender, TreeViewEventArgs e)
{ {
tbROValue.Text = null; tbROValue.Text = null;
@ -139,9 +139,9 @@ namespace Volian.Controls.Library
btnSaveRO.Enabled = false; btnSaveRO.Enabled = false;
btnPreviewRO.Enabled = false; btnPreviewRO.Enabled = false;
if (e.Node.Tag is ROFST.rochild) if (e.Node.Tag is ROFSTLookup.rochild)
{ {
ROFST.rochild chld = (ROFST.rochild)e.Node.Tag; ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
selectedChld = chld; selectedChld = chld;
if (chld.value != null) if (chld.value != null)
{ {
@ -209,16 +209,16 @@ namespace Volian.Controls.Library
object tag = tn.Tag; object tag = tn.Tag;
if (tn.FirstNode != null && tn.FirstNode.Text != "VLN_DUMMY_FOR_TREE") return; // already loaded. if (tn.FirstNode != null && tn.FirstNode.Text != "VLN_DUMMY_FOR_TREE") return; // already loaded.
if (tn.FirstNode != null && tn.FirstNode.Text == "VLN_DUMMY_FOR_TREE") tn.FirstNode.Remove(); if (tn.FirstNode != null && tn.FirstNode.Text == "VLN_DUMMY_FOR_TREE") tn.FirstNode.Remove();
ROFST.rochild[] chld = null; ROFSTLookup.rochild[] chld = null;
if (tn.Tag is ROFST.rodbi) if (tn.Tag is ROFSTLookup.rodbi)
{ {
ROFST.rodbi db = (ROFST.rodbi)tn.Tag; ROFSTLookup.rodbi db = (ROFSTLookup.rodbi)tn.Tag;
chld = db.children; chld = db.children;
} }
else if (tn.Tag is ROFST.rochild) else if (tn.Tag is ROFSTLookup.rochild)
{ {
ROFST.rochild ch = (ROFST.rochild)tn.Tag; ROFSTLookup.rochild ch = (ROFSTLookup.rochild)tn.Tag;
chld = ch.children; chld = ch.children;
} }
else else
@ -275,15 +275,15 @@ namespace Volian.Controls.Library
if (_MyROFST == _CurROFST) return; if (_MyROFST == _CurROFST) return;
tvROFST.Nodes.Clear(); tvROFST.Nodes.Clear();
_CurROFST = _MyROFST; _CurROFST = _MyROFST;
for (int i = 0; i < _MyROFST.myHdr.myDbs.Length; i++) for (int i = 0; i < _MyROFST.ROFSTLookup.myHdr.myDbs.Length; i++)
{ {
TreeNode tn = new TreeNode(_MyROFST.myHdr.myDbs[i].dbiTitle); TreeNode tn = new TreeNode(_MyROFST.ROFSTLookup.myHdr.myDbs[i].dbiTitle);
tn.Tag = _MyROFST.myHdr.myDbs[i]; tn.Tag = _MyROFST.ROFSTLookup.myHdr.myDbs[i];
tvROFST.Nodes.Add(tn); tvROFST.Nodes.Add(tn);
AddDummyGroup(_MyROFST.myHdr.myDbs[i], tn); AddDummyGroup(_MyROFST.ROFSTLookup.myHdr.myDbs[i], tn);
} }
} }
private void AddDummyGroup(ROFST.rodbi rodbi, TreeNode tn) private void AddDummyGroup(ROFSTLookup.rodbi rodbi, TreeNode tn)
{ {
if (rodbi.children != null && rodbi.children.Length > 0) if (rodbi.children != null && rodbi.children.Length > 0)
{ {
@ -304,7 +304,7 @@ namespace Volian.Controls.Library
if (roid.Length == 16) if (roid.Length == 16)
multValSel = true; multValSel = true;
ROFST.rochild rochld = MyROFST.GetRoChild(roid.Substring(0, 12).ToUpper()); ROFSTLookup.rochild rochld = MyROFST.ROFSTLookup.GetRoChild(roid.Substring(0, 12).ToUpper());
// use this to walk up tree until database - this is used to expand tree. // use this to walk up tree until database - this is used to expand tree.
List<int> path = new List<int>(); List<int> path = new List<int>();
int myid = rochld.ID; int myid = rochld.ID;
@ -312,7 +312,7 @@ namespace Volian.Controls.Library
{ {
path.Insert(0,myid); path.Insert(0,myid);
myid = rochld.ParentID; myid = rochld.ParentID;
rochld = MyROFST.GetRoChildFromID(myid); rochld = MyROFST.ROFSTLookup.GetRoChildFromID(myid);
if (rochld.ID == -1) myid = -1; if (rochld.ID == -1) myid = -1;
} }
TreeNode tnExpand = null; TreeNode tnExpand = null;
@ -320,7 +320,7 @@ namespace Volian.Controls.Library
// find database first // find database first
foreach (TreeNode tn in tvROFST.Nodes) foreach (TreeNode tn in tvROFST.Nodes)
{ {
ROFST.rodbi thisdb = (ROFST.rodbi)tn.Tag; ROFSTLookup.rodbi thisdb = (ROFSTLookup.rodbi)tn.Tag;
if (thisdb.dbiID == titm) if (thisdb.dbiID == titm)
{ {
LoadChildren(tn); LoadChildren(tn);
@ -338,7 +338,7 @@ namespace Volian.Controls.Library
tnExpand.Expand(); tnExpand.Expand();
foreach (TreeNode tn in tnExpand.Nodes) foreach (TreeNode tn in tnExpand.Nodes)
{ {
ROFST.rochild chld = (ROFST.rochild)tn.Tag; ROFSTLookup.rochild chld = (ROFSTLookup.rochild)tn.Tag;
if (chld.ID == citm) if (chld.ID == citm)
{ {
tnExpand = tn; tnExpand = tn;
@ -359,7 +359,7 @@ namespace Volian.Controls.Library
tnExpand.Expand(); tnExpand.Expand();
foreach (TreeNode tn in tnExpand.Nodes) foreach (TreeNode tn in tnExpand.Nodes)
{ {
ROFST.rochild chld = (ROFST.rochild)tn.Tag; ROFSTLookup.rochild chld = (ROFSTLookup.rochild)tn.Tag;
if (chld.roid == roid) if (chld.roid == roid)
{ {
tnExpand = tn; tnExpand = tn;
@ -378,20 +378,31 @@ namespace Volian.Controls.Library
return; return;
} }
Object obj = tvROFST.SelectedNode.Tag; Object obj = tvROFST.SelectedNode.Tag;
if (obj is ROFST.rochild) if (obj is ROFSTLookup.rochild)
{ {
ROFST.rochild roch = (ROFST.rochild) obj; ROFSTLookup.rochild roch = (ROFSTLookup.rochild)obj;
if (_MyRTB != null) // if null, it's Word attachment if (_MyRTB != null) // if null, it's Word attachment
{ {
_MyRTB.inRoAdd = true;
if (CheckROSelection(roch)) if (CheckROSelection(roch))
{ {
//string linktxt = string.Format("#Link:ReferencedObject: #xx {0}", roch.roid);
string ROID = roch.roid; string ROID = roch.roid;
RoUsage ro = RoUsage.MakeRoUsage(MyRTB.MyItemInfo.MyContent.Get(), ROID, null); using (RODb rodb = RODb.Get(_MyROFST.MyRODb.RODbID))
string linktxt = string.Format(@"#Link:ReferencedObject:{0} {1}", ro.ROUsageID, ROID); {
// Resolve symbols and scientific notation in the RO return value // saving of selstart & end is a work around - the Makerousage updates contentinfo object
_MyRTB.InsertRO(ConvertSymbolsAndStuff(tbROValue.Text), linktxt); // which caused the selection in _MyRTB to be changed. This inserted the ro at an incorrect
// location in the string.
int selstart = _MyRTB.SelectionStart;
int sellen = _MyRTB.SelectionLength;
RoUsage ro = RoUsage.MakeRoUsage(MyRTB.MyItemInfo.MyContent.Get(), ROID, null, rodb);
string linktxt = string.Format(@"#Link:ReferencedObject:{0} {1} {2}", ro.ROUsageID, ROID, rodb.RODbID);
// Resolve symbols and scientific notation in the RO return value
_MyRTB.SelectionStart = selstart;
_MyRTB.SelectionLength = sellen;
_MyRTB.InsertRO(ConvertSymbolsAndStuff(tbROValue.Text), linktxt);
}
} }
_MyRTB.inRoAdd = false;
} }
else // we're in an Word attachment else // we're in an Word attachment
{ {
@ -407,7 +418,7 @@ namespace Volian.Controls.Library
} }
} }
private bool CheckROSelection(ROFST.rochild selectedRO) private bool CheckROSelection(ROFSTLookup.rochild selectedRO)
{ {
bool goodToGo = true; bool goodToGo = true;
bool replacingRO = (_SavCurROLink != null); bool replacingRO = (_SavCurROLink != null);
@ -466,23 +477,21 @@ namespace Volian.Controls.Library
private void btnPreviewRO_Click(object sender, EventArgs e) private void btnPreviewRO_Click(object sender, EventArgs e)
{ {
if (selectedChld.type == 8) // intergrated graphic if (selectedChld.type == 8) // integrated graphic
{ {
string ropth = _CurROFST.GetFstPath();
ropth = ropth.Substring(0, ropth.LastIndexOf('\\') + 1);
string fname = selectedChld.value.Substring(0, selectedChld.value.IndexOf('\n')); string fname = selectedChld.value.Substring(0, selectedChld.value.IndexOf('\n'));
int thedot = fname.LastIndexOf('.'); int thedot = fname.LastIndexOf('.');
if (thedot == -1 || (thedot != (fname.Length - 4))) if (thedot == -1 || (thedot != (fname.Length - 4)))
fname += string.Format(".{0}", MyROFST.GetDefaultGraphicExtension()); fname += string.Format(".{0}", MyROFST.MyRODb.RODbConfig.GetDefaultGraphicExtension());
ROImageInfo tmp = ROImageInfo.GetByROFstID_FileName(MyROFST.ROFstID, fname);
string imgfile = ropth + fname;
if (File.Exists(imgfile)) if (tmp !=null)
{ {
PreviewROImage pvROImg = new PreviewROImage(imgfile, selectedChld.title); PreviewROImage pvROImg = new PreviewROImage(tmp.Content, selectedChld.title);
pvROImg.ShowDialog(); pvROImg.ShowDialog();
} }
else else
MessageBox.Show(string.Format("{0}", imgfile), "Cannot Find Image File"); MessageBox.Show("Cannot Find Image Data");
} }
else if (selectedChld.type == 2) // table else if (selectedChld.type == 2) // table
{ {
@ -796,25 +805,6 @@ namespace Volian.Controls.Library
} }
#endregion // utils #endregion // utils
//private void AddToROUsage(ROFST.rochild roch)
//{
// if (instance < dt.Rows.Count)
// {
// //DataRow dr = dt.Rows[instance];
// string ROID = roch.roid;
// RoUsage ro = RoUsage.MakeRoUsage(content, ROID, null, DateTime.Now, "Migration");
// string results = string.Format(@"{0}{1}\v #Link:ReferencedObject:{2} {3}\v0",
// '\x15', rofst.GetRoValue(ROID.Substring(0, 12).ToUpper()), ro.ROUsageID, ROID);
// rotxt.Append(results);
// instance++;
// }
// else
// {
// log.Error("Error setting RO data in text field");
// log.ErrorFormat("proc number = {0}, oldstepsequence = {1}, instance = {2}", ProcNumber, seqcvt, instance);
// }
//}
#endregion #endregion
} }
} }