Bug fix B2012-270, GoTo button in PROMS could not find RO Table for viewing in the RO Editor
This commit is contained in:
parent
f5f58c210e
commit
c5e45bbe3f
@ -388,10 +388,35 @@ namespace DataLoader
|
|||||||
{
|
{
|
||||||
//string savethis = stepText;
|
//string savethis = stepText;
|
||||||
string strGrid = "";
|
string strGrid = "";
|
||||||
|
int tablerodbid = -1;
|
||||||
|
string tableroid = "";
|
||||||
|
string tableroprefix = "";
|
||||||
|
string tablerosuffix = "";
|
||||||
|
if (isROTable)
|
||||||
|
{
|
||||||
|
// parse out and save the ROid and ROdb information
|
||||||
|
// We will also need to re-attach the RO link prefix and suffix
|
||||||
|
tableroprefix = @"\v <START]\v0 ";
|
||||||
|
tablerosuffix = stepText.Substring(stepText.IndexOf(@"\v #Link:ReferencedObject:"));
|
||||||
|
int idx = stepText.IndexOf(":");
|
||||||
|
idx = stepText.IndexOf(" ", idx) + 1;
|
||||||
|
int idx2 = stepText.IndexOf(" ", idx);
|
||||||
|
tableroid = stepText.Substring(idx, idx2 - idx);
|
||||||
|
idx = idx2 + 1;
|
||||||
|
idx2 = stepText.IndexOf("[", idx);
|
||||||
|
tablerodbid = int.Parse(stepText.Substring(idx, idx2 - idx));
|
||||||
|
}
|
||||||
//MessageBox.Show("Before ConvertTableToGrid " + GC.GetTotalMemory(true).ToString());
|
//MessageBox.Show("Before ConvertTableToGrid " + GC.GetTotalMemory(true).ToString());
|
||||||
using (VlnFlexGrid grd = new VlnFlexGrid(1, 1))
|
using (VlnFlexGrid grd = new VlnFlexGrid(1, 1))
|
||||||
{
|
{
|
||||||
grd.IsRoTable = isROTable;
|
grd.IsRoTable = isROTable;
|
||||||
|
if (isROTable)
|
||||||
|
{
|
||||||
|
// put the ROID and ROdb into the grid properties
|
||||||
|
// Bug fix B2012-270
|
||||||
|
grd.RODbId = tablerodbid;
|
||||||
|
grd.ROID = tableroid;
|
||||||
|
}
|
||||||
VE_Font vefont = fmt.PlantFormat.FormatData.StepDataList.Table.Font;
|
VE_Font vefont = fmt.PlantFormat.FormatData.StepDataList.Table.Font;
|
||||||
Font GridFont = new Font(vefont.Family, (float)vefont.Size);
|
Font GridFont = new Font(vefont.Family, (float)vefont.Size);
|
||||||
grd.Font = GridFont; // this also changes the default Row Height "Rows.DefaultSize"
|
grd.Font = GridFont; // this also changes the default Row Height "Rows.DefaultSize"
|
||||||
@ -399,6 +424,8 @@ namespace DataLoader
|
|||||||
grd.AutoSizeCols();
|
grd.AutoSizeCols();
|
||||||
grd.AutoSizeRows();
|
grd.AutoSizeRows();
|
||||||
grd.MakeRTFcells();
|
grd.MakeRTFcells();
|
||||||
|
grd.FixTableCellsHeightWidth();
|
||||||
|
grd.AdjustGridControlSize();
|
||||||
using (StringWriter sw = new StringWriter())
|
using (StringWriter sw = new StringWriter())
|
||||||
{
|
{
|
||||||
grd.WriteXml(sw);
|
grd.WriteXml(sw);
|
||||||
@ -407,6 +434,11 @@ namespace DataLoader
|
|||||||
strGrid = grd.GetSearchableText();
|
strGrid = grd.GetSearchableText();
|
||||||
sw.Close();
|
sw.Close();
|
||||||
}
|
}
|
||||||
|
if (isROTable)
|
||||||
|
{
|
||||||
|
// re-attach the RO Link prfix and suffix
|
||||||
|
strGrid = tableroprefix + strGrid + tablerosuffix;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return strGrid;
|
return strGrid;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user