C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST
Update ProgressBar & fix Already Checked out popup multiple times
This commit is contained in:
@@ -1319,10 +1319,10 @@ namespace VEPROMS
|
||||
{
|
||||
if (ProgressBar == null) return;
|
||||
|
||||
ProgressBar.Value = 100;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Text = value;
|
||||
txtProcess.AppendText(value);
|
||||
ProgressBar.Text = value;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Value = 100;
|
||||
txtProcess.AppendText(value);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
|
||||
|
||||
@@ -899,10 +899,10 @@ namespace VEPROMS
|
||||
set
|
||||
{
|
||||
if (ProgressBar == null) return;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Value = 100;
|
||||
ProgressBar.Text = value;
|
||||
Application.DoEvents();
|
||||
ProgressBar.Text = value;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Value = 100;
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -314,9 +314,9 @@ namespace Volian.Controls.Library
|
||||
set
|
||||
{
|
||||
if (ProgressBar == null) return;
|
||||
ProgressBar.Value = 100;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Text = value;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Value = 100;
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
@@ -639,28 +639,32 @@ namespace Volian.Controls.Library
|
||||
if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID)
|
||||
{
|
||||
string message = string.Empty;
|
||||
if (!MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message))
|
||||
if (_progressBar?.Text != "Cannot check-out Working Draft" && !MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message))
|
||||
{
|
||||
FlexibleMessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FinalProgressBarMessage = "Cannot check-out Working Draft";
|
||||
}
|
||||
else if (changedDocVersion && MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
else if (!MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message))
|
||||
{
|
||||
//do nothing - is still checked out
|
||||
}
|
||||
else if (changedDocVersion && MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
|
||||
InitialProgressBarMessage = "Updating ROs";
|
||||
InitialProgressBarMessage = "Updating ROs";
|
||||
|
||||
ROFstInfo roFstInfo = ROFstInfo.Get(fstid);
|
||||
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid);
|
||||
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
ROFstInfo roFstInfo = ROFstInfo.Get(fstid);
|
||||
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid);
|
||||
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
|
||||
Application.DoEvents();
|
||||
Application.DoEvents();
|
||||
|
||||
FinalProgressBarMessage = "ROs values updated";
|
||||
MyROFST = roFstInfo;
|
||||
FinalProgressBarMessage = "ROs values updated";
|
||||
MyROFST = roFstInfo;
|
||||
|
||||
updatedROs = true;
|
||||
}
|
||||
updatedROs = true;
|
||||
}
|
||||
}
|
||||
|
||||
//B2025-008
|
||||
|
||||
@@ -3578,7 +3578,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
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)
|
||||
@@ -3618,10 +3618,11 @@ namespace Volian.Controls.Library
|
||||
set
|
||||
{
|
||||
if (ProgressBar == null) return;
|
||||
ProgressBar.Value = 100;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Text = value;
|
||||
Application.DoEvents();
|
||||
|
||||
ProgressBar.Text = value;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Value = 100;
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2530,10 +2530,10 @@ namespace Volian.Controls.Library
|
||||
set
|
||||
{
|
||||
if (ProgressBar == null) return;
|
||||
ProgressBar.Value = 100;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Text = value;
|
||||
Application.DoEvents();
|
||||
ProgressBar.Text = value;
|
||||
ProgressBar.Maximum = 100;
|
||||
ProgressBar.Value = 100;
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
public List<string> roFstInfo_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)
|
||||
|
||||
Reference in New Issue
Block a user