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 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());
|
||||
using (VlnFlexGrid grd = new VlnFlexGrid(1, 1))
|
||||
{
|
||||
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;
|
||||
Font GridFont = new Font(vefont.Family, (float)vefont.Size);
|
||||
grd.Font = GridFont; // this also changes the default Row Height "Rows.DefaultSize"
|
||||
@ -399,6 +424,8 @@ namespace DataLoader
|
||||
grd.AutoSizeCols();
|
||||
grd.AutoSizeRows();
|
||||
grd.MakeRTFcells();
|
||||
grd.FixTableCellsHeightWidth();
|
||||
grd.AdjustGridControlSize();
|
||||
using (StringWriter sw = new StringWriter())
|
||||
{
|
||||
grd.WriteXml(sw);
|
||||
@ -407,6 +434,11 @@ namespace DataLoader
|
||||
strGrid = grd.GetSearchableText();
|
||||
sw.Close();
|
||||
}
|
||||
if (isROTable)
|
||||
{
|
||||
// re-attach the RO Link prfix and suffix
|
||||
strGrid = tableroprefix + strGrid + tablerosuffix;
|
||||
}
|
||||
}
|
||||
return strGrid;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user