This commit is contained in:
Jake 2022-06-07 15:03:04 +00:00
parent 3a2f6f58e5
commit 0e0a733c55
3 changed files with 18 additions and 61 deletions

View File

@ -452,20 +452,7 @@ namespace VEPROMS
} }
} }
// Part of Separate Windows upgrade C2015-022
// Extend changeds to BookMark information to all of the child windows
void displayBookMarks_ResetBookMarksInPROMSWindows(object sender, EventArgs args)
{
foreach (int k in PROMSWindowForms.Keys)
{
frmVEPROMS tmp = PROMSWindowForms[k];
if (tmp.MyDocVersion.VersionID != this.SelectedDVI.VersionID)
tmp.displayBookMarks.ResetBookMarkList();
else if (tmp.MyParent != null)
tmp.MyParent.displayBookMarks.ResetBookMarkList();
}
}
void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args) void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
{ {
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo; ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
@ -526,7 +513,7 @@ namespace VEPROMS
void tv_NodeCopy(object sender, vlnTreeEventArgs args) void tv_NodeCopy(object sender, vlnTreeEventArgs args)
{ {
VETreeNode tn = args.Node as VETreeNode; VETreeNode tn = args.Node as VETreeNode;
ItemInfo ii = tn.VEObject as ItemInfo;? ItemInfo ii = tn.VEObject as ItemInfo;
tc.MyCopyStep = ii; tc.MyCopyStep = ii;
tc_CopyStepSelected(sender, null); // C2015-022 set copy step info in the child windows tc_CopyStepSelected(sender, null); // C2015-022 set copy step info in the child windows
} }
@ -1294,9 +1281,9 @@ namespace VEPROMS
} }
//C2015-022 Separate Windows - if child windows are open and we are closing the main PROMS window, give user a chance to not close PROMS and that child windows //C2015-022 Separate Windows - if child windows are open and we are closing the main PROMS window, give user a chance to not close PROMS and that child windows
// B2019-101 if we are exiting from PROMS main window no need to prompt user about child windows. // B2019-101 if we are exiting from PROMS main window no need to prompt user about child windows.
if (MyParent == null && PROMSWindowForms.Count > 0 && !_WeAreExitingPROMS)? if (MyParent == null && PROMSWindowForms.Count > 0 && !_WeAreExitingPROMS)
{ {
DialogResult dr = MessageBox.Show("Close all of the child windows and exit PROMS?", "Exit PROMS", MessageBoxButtons.YesNo);? DialogResult dr = MessageBox.Show("Close all of the child windows and exit PROMS?", "Exit PROMS", MessageBoxButtons.YesNo);
if (dr == System.Windows.Forms.DialogResult.No) if (dr == System.Windows.Forms.DialogResult.No)
{ {
e.Cancel = true; e.Cancel = true;
@ -2179,7 +2166,7 @@ namespace VEPROMS
{ {
DisplayTabItem dti = tc.OpenItem(ii);// B2018-035 Allow procedure to be printed and property grid to be opened DisplayTabItem dti = tc.OpenItem(ii);// B2018-035 Allow procedure to be printed and property grid to be opened
// B2019-003: was crashing if another user was in same procedure (dti would have been null because procedure could not be opened): // B2019-003: was crashing if another user was in same procedure (dti would have been null because procedure could not be opened):
if (dti == null) return;? if (dti == null) return;
SelectedStepTabPanel = dti.MyStepTabPanel; SelectedStepTabPanel = dti.MyStepTabPanel;
tc.SelectedDisplayTabItem = dti; tc.SelectedDisplayTabItem = dti;
@ -2219,8 +2206,6 @@ namespace VEPROMS
} }
private static VolianTimer _TimeActivity1 = new VolianTimer("frmVEPROMS.cs tmrCloseTabItems_Tick", 2108); private static VolianTimer _TimeActivity1 = new VolianTimer("frmVEPROMS.cs tmrCloseTabItems_Tick", 2108);
private static VolianTimer _TimeActivity1 = new VolianTimer("frmVEPROMS.cs tmrCloseTabItems_Tick", 2108);
void tmrCloseTabItems_Tick(object sender, EventArgs e) void tmrCloseTabItems_Tick(object sender, EventArgs e)
{ {
_TimeActivity1.Open(); _TimeActivity1.Open();
@ -3870,7 +3855,7 @@ namespace VEPROMS
btnNew.Enabled = false; btnNew.Enabled = false;
// if focus is in the step editor, position in the tree view to match the location in the step editor // if focus is in the step editor, position in the tree view to match the location in the step editor
if (!tv.Focused && tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.SelectedItemInfo != null) if (!tv.Focused && tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.SelectedItemInfo != null)
tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo);? tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo);
VETreeNode vtn = tv.SelectedNode as VETreeNode; VETreeNode vtn = tv.SelectedNode as VETreeNode;
if (vtn == null) return; if (vtn == null) return;
@ -3975,7 +3960,7 @@ namespace VEPROMS
if (si.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections) if (si.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)
{ {
ButtonItem subbtn = new ButtonItem("subbtn", "SubSection"); ButtonItem subbtn = new ButtonItem("subbtn", "SubSection");
btnNew.SubItems.Add(subbtn);? btnNew.SubItems.Add(subbtn);
subbtn.Click += new EventHandler(subbtn_Click); subbtn.Click += new EventHandler(subbtn_Click);
} }
ButtonItem stpbtn = new ButtonItem("stpbtn", "New Step"); ButtonItem stpbtn = new ButtonItem("stpbtn", "New Step");

View File

@ -310,34 +310,6 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
nextIDX = aplString.IndexOf(",UnitIdx", offsetIdx);
if (nextIDX == -1) nextIDX = aplString.IndexOf(" /APL>");
sb.Append(aplString.Substring(offsetIdx, nextIDX - offsetIdx));
lastIndex = m.Index + m.Length;
}
// B2022-018 append any remaining text
if (lastIndex < roval.Length)
{
sb.Append(roval.Substring(lastIndex));
}
return sb.ToString();
}
public List<string> GetROReturnValue(string roval)
{
_lstRoValues = new List<string>();
_multiRoValues = new List<string>();
_dicRoVars = new Dictionary<string, string>();
string tmp = ProcessRO(_myDocVersionInfo == null ? roval : _myDocVersionInfo.ProcessDocVersionSpecificInfo(roval), false);
if (!string.IsNullOrEmpty(tmp) && _lstRoValues.Count == 0) // was not a multiple return value
{
_lstRoValues.Add(tmp);
} }
return rc; return rc;
@ -568,7 +540,7 @@ namespace VEPROMS.CSLA.Library
rc = GetRoChild12(parentROID); rc = GetRoChild12(parentROID);
if (rc.ID > 0) sb.Insert(0, rc.title + " - "); if (rc.ID > 0) sb.Insert(0, rc.title + " - ");
} while (rc.ID > 0);? } while (rc.ID > 0);
return sb.ToString(); return sb.ToString();
} }

View File

@ -128,7 +128,7 @@ namespace Volian.Controls.Library
if (!_isInitializedDocVersionID && _docVersionInfo != null) if (!_isInitializedDocVersionID && _docVersionInfo != null)
{ {
_currDocVersionID = (int?) _docVersionInfo.VersionID;? _currDocVersionID = (int?) _docVersionInfo.VersionID;
} }
} }
} }
@ -711,7 +711,7 @@ namespace Volian.Controls.Library
public static bool GreaterValue(string value1, string value2) public static bool GreaterValue(string value1, string value2)
{ {
Match match1 = _regExGetNumber.Match(value1); Match match1 = _regExGetNumber.Match(value1);
Match match2 = _regExGetNumber.Match(value2);? Match match2 = _regExGetNumber.Match(value2);
if (match1.Success && !match1.Value.Contains("/") && match2.Success && !match2.Value.Contains("/")) // Compare the numeric value? if (match1.Success && !match1.Value.Contains("/") && match2.Success && !match2.Value.Contains("/")) // Compare the numeric value?
{ {
@ -719,11 +719,11 @@ namespace Volian.Controls.Library
double dbl2; double dbl2;
//B2017-232 changed from Parse to TryParse. AEP had figure title that had a number containing two periods which caused Parse to error? //B2017-232 changed from Parse to TryParse. AEP had figure title that had a number containing two periods which caused Parse to error?
if (double.TryParse(match1.ToString(), out dbl1) && double.TryParse(match2.ToString(), out dbl2))? if (double.TryParse(match1.ToString(), out dbl1) && double.TryParse(match2.ToString(), out dbl2))
{? {
if (dbl1 != dbl2) //B2021-144 if the numerical is identical default to the string comparison? if (dbl1 != dbl2) //B2021-144 if the numerical is identical default to the string comparison?
return dbl1 > dbl2;? return dbl1 > dbl2;
}? }
} }
return string.Compare(value1, value2, true) > 0; return string.Compare(value1, value2, true) > 0;
@ -752,20 +752,20 @@ namespace Volian.Controls.Library
{ {
ROFSTLookup.rochild ch = (ROFSTLookup.rochild)tn.Tag; ROFSTLookup.rochild ch = (ROFSTLookup.rochild)tn.Tag;
MyROFSTLookup.LoadChildren(ref ch); MyROFSTLookup.LoadChildren(ref ch);
children = ch.children;? children = ch.children;
} }
// if children, add dummy node // if children, add dummy node
if (children != null && children.Length > 0) if (children != null && children.Length > 0)
{? {
//ProgressBar_Initialize(children.Length, tn.Text); //ProgressBar_Initialize(children.Length, tn.Text);
for (int i = 0; i < children.Length; i++) for (int i = 0; i < children.Length; i++)
{ {
//ProgressBar_SetValue(i); //ProgressBar_SetValue(i);
TreeNode tmp = null;? TreeNode tmp = null;
ROFSTLookup.rochild roc = children[i]; ROFSTLookup.rochild roc = children[i];
// if this is a group, i.e. type 0, add a dummy node // if this is a group, i.e. type 0, add a dummy node
@ -773,7 +773,7 @@ namespace Volian.Controls.Library
{ {
continue; // Ignore: Junk Scenario continue; // Ignore: Junk Scenario
} }
else if (ROTypeFilter != E_ROValueType.All && (roc.type & (uint)ROTypeFilter) == 0)? else if (ROTypeFilter != E_ROValueType.All && (roc.type & (uint)ROTypeFilter) == 0)
{ {
continue; // Ignore: Filter Doesn't Match continue; // Ignore: Filter Doesn't Match
} }