B2017-079, B2017-053, B2017-049, improved the speed and logic of updating ROs. The Refresh ROs logic is now merged into the Update ROs logic. Also annotations are added when ROs are updated. The Refresh ROs options were removed from the tool list.
Better feedback when updating RO values, also save list of updated ROs in text file in Documents\VEPROMS Save the date/time of the last successfully completed RO Values Update Add annotations for updated RO values, better logic in updating RO figures so they are needlessly updated, better logic in determining if an RO needs to be updated Logic to save the date/time of the last successfully completed RO Update Better logic to determine if an RO value needs updated.
This commit is contained in:
@@ -391,7 +391,8 @@ namespace VEPROMS
|
||||
|
||||
ppBtnRoDbBrowse.Visible = cmbRoDb.Visible = _DocVersionConfig.MyDocVersion.DocVersionAssociationCount == 0;
|
||||
btnRoDbProperties.Visible = tbRoDb.Visible = !(_DocVersionConfig.MyDocVersion.DocVersionAssociationCount == 0);
|
||||
ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association
|
||||
// only allow update if association, and the RO update was not done and/or not completed
|
||||
ppBtnUpRoVals.Enabled = !_DocVersionConfig.MyDocVersion.ROfstLastCompleted || _DocVersionConfig.MyDocVersion.NewerRoFst;
|
||||
|
||||
// Set the auto duplex controls based on whether the format allows this:
|
||||
// Note that the controls' visibility would not set correctly using the following two lines of code. That
|
||||
@@ -1072,7 +1073,8 @@ namespace VEPROMS
|
||||
if (dlgROProperties.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
tbRoDb.Text = string.Format("{0} ({1})", SelectedROFst.MyRODb.ROName, SelectedROFst.MyRODb.FolderPath);
|
||||
ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association
|
||||
// only allow update if association, and the RO update was not done and/or not completed
|
||||
ppBtnUpRoVals.Enabled = !_DocVersionConfig.MyDocVersion.ROfstLastCompleted || _DocVersionConfig.MyDocVersion.NewerRoFst;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1113,14 +1115,27 @@ namespace VEPROMS
|
||||
break;
|
||||
}
|
||||
Cursor = Cursors.WaitCursor;
|
||||
swROUpdate = new System.IO.StreamWriter(ROFstInfo.ROUpdateResultsPath(_DocVersionConfig.MyDocVersion.MyDocVersionInfo)); // RO changes placed in file in the Documents\VEPROMS folder
|
||||
ContentInfo.StaticContentInfoChange += ContentInfo_StaticContentInfoChange; // write changes to a text file
|
||||
SelectedROFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
ROFst newrofst = ROFstInfo.UpdateRoFst(rdi, dva, _DocVersionConfig.MyDocVersion, SelectedROFst, DoProgressBarRefresh);
|
||||
ROFst newrofst = ROFstInfo.RefreshROFst(rdi, dva, _DocVersionConfig.MyDocVersion, SelectedROFst, DoProgressBarRefresh, null);
|
||||
swROUpdate.Close();
|
||||
ContentInfo.StaticContentInfoChange -= ContentInfo_StaticContentInfoChange;
|
||||
SelectedROFst.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst;
|
||||
ppBtnUpRoVals.Enabled = !_DocVersionConfig.MyDocVersion.ROfstLastCompleted || _DocVersionConfig.MyDocVersion.NewerRoFst;
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
FinalProgressBarMessage = "ROs values updated";
|
||||
}
|
||||
|
||||
private System.IO.StreamWriter swROUpdate;
|
||||
// write the RO reference changes to a text file, include the old/new text, location, and the itemid of the step element
|
||||
void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
|
||||
{
|
||||
if (args.Type == "RO")
|
||||
swROUpdate.Write(string.Format("Fixed Referenced Object for {1}({4}){0}Old Text: {2}{0}New Text: {3}{0}{0}", Environment.NewLine, (sender as ItemInfo).ShortPath, args.OldValue, args.NewValue, (sender as ItemInfo).ItemID));
|
||||
}
|
||||
|
||||
private ProgressBarItem _ProgressBar = null;
|
||||
public ProgressBarItem ProgressBar
|
||||
{
|
||||
@@ -1130,8 +1145,8 @@ namespace VEPROMS
|
||||
private void DoProgressBarRefresh(int value, int max, string text)
|
||||
{
|
||||
if (ProgressBar == null) return;
|
||||
ProgressBar.Value = value;
|
||||
ProgressBar.Maximum = max;
|
||||
ProgressBar.Value = value;
|
||||
ProgressBar.Text = text;
|
||||
Application.DoEvents();
|
||||
}
|
||||
@@ -1151,8 +1166,8 @@ namespace VEPROMS
|
||||
set
|
||||
{
|
||||
if (ProgressBar == null) return;
|
||||
ProgressBar.Value = 100;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Value = 100;
|
||||
ProgressBar.Text = value;
|
||||
Application.DoEvents();
|
||||
}
|
||||
@@ -1235,7 +1250,8 @@ namespace VEPROMS
|
||||
if (dlgROProperties.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
tbRoDb.Text = string.Format("{0} ({1})", SelectedROFst.MyRODb.ROName, SelectedROFst.MyRODb.FolderPath);
|
||||
ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association
|
||||
// only allow update if association, and the RO update was not done and/or not completed
|
||||
ppBtnUpRoVals.Enabled = !_DocVersionConfig.MyDocVersion.ROfstLastCompleted || _DocVersionConfig.MyDocVersion.NewerRoFst;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
Reference in New Issue
Block a user