This commit is contained in:
Kathy Ruffing 2011-06-16 10:35:14 +00:00
parent 84d293dc34
commit 07b7f1e47c

View File

@ -196,7 +196,7 @@ namespace Volian.Controls.Library
switch (chld.type) switch (chld.type)
{ {
case 1: // standard (regular) text RO type case 1: // standard (regular) text RO type
tbROValue.Text = chld.value; tbROValue.Text = chld.value.Replace(@"\u160?"," ");
btnPreviewRO.Enabled = false; btnPreviewRO.Enabled = false;
break; break;
case 2: // Table RO type case 2: // Table RO type
@ -318,7 +318,7 @@ namespace Volian.Controls.Library
//} //}
else else
{ {
tmp = new TreeNode(chld[i].title); tmp = new TreeNode(chld[i].title.Replace(@"\u160?"," "));
tmp.Tag = chld[i]; tmp.Tag = chld[i];
int index = FindIndex(tn.Nodes, tmp.Text); int index = FindIndex(tn.Nodes, tmp.Text);
tn.Nodes.Insert(index,tmp); tn.Nodes.Insert(index,tmp);
@ -423,7 +423,7 @@ namespace Volian.Controls.Library
if (rochld.ID == -1) myid = -1; if (rochld.ID == -1) myid = -1;
} }
TreeNode tnExpand = null; TreeNode tnExpand = null;
int titm = System.Convert.ToInt32(db); int titm = System.Convert.ToInt32(db, 16); //(db);
// find database first // find database first
foreach (TreeNode tn in tvROFST.Nodes) foreach (TreeNode tn in tvROFST.Nodes)
{ {
@ -438,8 +438,6 @@ namespace Volian.Controls.Library
if (tnExpand == null) return; // something went wrong? if (tnExpand == null) return; // something went wrong?
// use the path id list to load/find the treeview's nodes. // use the path id list to load/find the treeview's nodes.
foreach (int citm in path) foreach (int citm in path)
{
if (citm != System.Convert.ToInt32(db))
{ {
LoadChildren(tnExpand); LoadChildren(tnExpand);
tnExpand.Expand(); tnExpand.Expand();
@ -453,9 +451,6 @@ namespace Volian.Controls.Library
} }
} }
} }
}
//if (tnExpand != null) tvROFST.SelectedNode = tnExpand;
if (tnExpand != null) if (tnExpand != null)
{ {
@ -491,8 +486,24 @@ namespace Volian.Controls.Library
DisplayTabItem dti = _TabControl.SelectedDisplayTabItem; //.OpenItem(_ItemInfo); // open the corresponding procedure text DisplayTabItem dti = _TabControl.SelectedDisplayTabItem; //.OpenItem(_ItemInfo); // open the corresponding procedure text
if (dti.MyDSOTabPanel != null) // A Word Document tab is the active tab if (dti.MyDSOTabPanel != null) // A Word Document tab is the active tab
{ {
int dbiId = System.Convert.ToInt32(roch.roid.Substring(0, 4), 16);
ROFSTLookup.rodbi[] dbs = MyROFST.ROFSTLookup.GetRODatabaseList(); ROFSTLookup.rodbi[] dbs = MyROFST.ROFSTLookup.GetRODatabaseList();
ROFSTLookup.rodbi db = dbs[int.Parse(roch.roid.Substring(0, 4))-1]; bool dbFound = false;
ROFSTLookup.rodbi db = dbs[0];
foreach (ROFSTLookup.rodbi rodbi in dbs)
{
if (dbiId == rodbi.dbiID)
{
db = rodbi;
dbFound = true;
break;
}
}
if (!dbFound)
{
MessageBox.Show("Error occurred finding RO. Contact Volian");
return;
}
string accPrefix = db.dbiAP.Replace(_Mydvi.DocVersionConfig.RODefaults_graphicsprefix,"IG"); string accPrefix = db.dbiAP.Replace(_Mydvi.DocVersionConfig.RODefaults_graphicsprefix,"IG");
accPrefix = accPrefix.Replace(_Mydvi.DocVersionConfig.RODefaults_setpointprefix, "SP"); accPrefix = accPrefix.Replace(_Mydvi.DocVersionConfig.RODefaults_setpointprefix, "SP");
// string accPrefix = (roch.type == 8) ? _Mydvi.DocVersionConfig.RODefaults_graphicsprefix : _Mydvi.DocVersionConfig.RODefaults_setpointprefix; // string accPrefix = (roch.type == 8) ? _Mydvi.DocVersionConfig.RODefaults_graphicsprefix : _Mydvi.DocVersionConfig.RODefaults_setpointprefix;