Compare commits

..

14 Commits

Author SHA1 Message Date
jjenko 0080a42423 Merge pull request 'C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST' (#756) from C2026-008 into Development
Reviewed-on: #756
Reviewed-by: John Jenko <jjenko@volian.com>

This was pre-tested prior to  this merge.
2026-05-19 09:24:09 -04:00
mschill 2035a4c855 Merge branch 'Development' into C2026-008 2026-05-19 08:59:34 -04:00
jjenko 4dc6a190fa Merge pull request 'C2026-037 Change History Deleted Items to 24-hour clock' (#771) from C2026-037 into Development
good for testing
2026-05-19 08:56:47 -04:00
mschill e0db322262 C2026-037 Change History Deleted Items to 24-hour clock 2026-05-19 06:56:31 -04:00
mschill 8f1bb45e42 C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST
--Fix for Blank popup box when completes updating ROs through Admin Tool & fix for updating ROs when fails part way through (if network error, etc…)
2026-05-15 07:09:21 -04:00
mschill f39aefd28f Merge branch 'Development' into C2026-008 2026-05-14 10:40:00 -04:00
jjenko 2cfc43dbfd Merge pull request 'B2026-045 Issue with Refreshing Changebars when Approval is done multiple times in a row on Multi-unit. Printing was ok but the UI required leaving PROMS and going back in.' (#769) from B2026-045 into Development
good for testing
2026-05-13 15:38:26 -04:00
mschill f4168b5202 B2026-045 Issue with Refreshing Changebars when Approval is done multiple times in a row on Multi-unit. Printing was ok but the UI required leaving PROMS and going back in. 2026-05-13 15:02:52 -04:00
jjenko 2d93b652e8 Merge pull request 'B2026-046-RO-symbols-and-Annotations' (#768) from B2026-046-RO-symbols-and-Annotations into Development
good for testing
2026-05-13 13:43:12 -04:00
plarsen 70782cd655 B2026-046-RO-symbols-and-Annotations 2026-05-13 13:37:12 -04:00
mschill 768fcc4f05 Fix Bug in Dotnet Bar related to multiple events and closing display tabs 2026-05-12 08:54:26 -04:00
mschill 727491f99b Merge branch 'C2026-008' of https://git.volian.com/Volian/SourceCode into C2026-008 2026-05-11 14:43:49 -04:00
mschill c5f1c3a340 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
2026-05-11 14:42:48 -04:00
plarsen 4b5b06210c B2026-046-RO-symbols-and-Annotations 2026-05-08 23:20:38 -04:00
11 changed files with 210 additions and 76 deletions
@@ -1343,31 +1343,23 @@ namespace VEPROMS
//// so change bars update //// so change bars update
//// on any open StepPanel //// on any open StepPanel
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open newproc = ItemInfo.ResetProcedure(pi.ItemID);
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
if (dti != null) if (dti != null)
{ {
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus) if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
dti.MyStepTabPanel.MyStepPanel.Focus(); dti.MyStepTabPanel.MyStepPanel.Focus();
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>()) dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
{ Application.DoEvents();
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
}
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure(); }
Application.DoEvents();
newproc = ProcedureInfo.Get(pi.ItemID);
} //since in a separate form, need to update the tree view
else //so "Showing Change Bars" Content Menu Item is correct
{ MyFrmVEPROMS.RefreshProcedureNode(newproc);
newproc = ItemInfo.ResetProcedure(pi.ItemID);
}
//since in a separate form, need to update the tree view
//so "Showing Change Bars" Content Menu Item is correct
MyFrmVEPROMS.RefreshProcedureNode(newproc);
} }
else else
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave); UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);
@@ -1066,7 +1066,27 @@ namespace VEPROMS
ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv, roFstInfo, DoProgressBarRefresh); ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv, roFstInfo, DoProgressBarRefresh);
roFstInfo = dq.DocVersionAssociations[0].MyROFst; roFstInfo = dq.DocVersionAssociations[0].MyROFst;
} }
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); else if (!dv.ROfstLastCompleted && origfstid == roFstInfo.ROFstID)
{
//Handle issue where load failed without completing update
//previous RO FST did not load, get last loaded ID
//if none, use -1 which will check all ROs in the Working Draft
string cfg = dv.DocVersionAssociations[0].Config;
AssociationConfig ac = new AssociationConfig((cfg == null || cfg.Length == 0) ? "<Config />" : cfg);
if (dv.DocVersionAssociations[0]?.MyROFst != null)
{
if (!int.TryParse(ac.ROUpdate_PrevROFSTID, out origfstid))
{
origfstid = -1;
}
}
else
{
origfstid = -1;
}
}
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, txtProcess, roFstInfo, origfstid, roFstInfo.ROFstID); ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, txtProcess, roFstInfo, origfstid, roFstInfo.ROFstID);
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
} }
@@ -1319,10 +1339,10 @@ namespace VEPROMS
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100; ProgressBar.Text = value;
ProgressBar.Maximum = 100; ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Value = 100;
txtProcess.AppendText(value); txtProcess.AppendText(value);
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
@@ -899,10 +899,10 @@ namespace VEPROMS
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Maximum = 100; ProgressBar.Text = value;
ProgressBar.Value = 100; ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Value = 100;
Application.DoEvents(); Application.DoEvents();
} }
} }
@@ -1539,8 +1539,27 @@ namespace VEPROMS
ROFstInfo.UpdateRoFst(SelectedROFst.MyRODb, dv, SelectedROFst, DoProgressBarRefresh); ROFstInfo.UpdateRoFst(SelectedROFst.MyRODb, dv, SelectedROFst, DoProgressBarRefresh);
SelectedROFst = null; // set to null to force getting the updated ROfst SelectedROFst = null; // set to null to force getting the updated ROfst
} }
else if (!dv.ROfstLastCompleted && origfstid == SelectedROFst.ROFstID)
{
//Handle issue where load failed without completing update
//previous RO FST did not load, get last loaded ID
//if none, use -1 which will check all ROs in the Working Draft
string cfg = dv.DocVersionAssociations[0].Config;
AssociationConfig ac = new AssociationConfig((cfg == null || cfg.Length == 0) ? "<Config />" : cfg);
if (dv.DocVersionAssociations[0]?.MyROFst != null)
{
if (!int.TryParse(ac.ROUpdate_PrevROFSTID, out origfstid))
{
origfstid = -1;
}
}
else
{
origfstid = -1;
}
}
ContentInfo.StaticContentInfoChange += ContentInfo_StaticContentInfoChange; // write changes to a text file ContentInfo.StaticContentInfoChange += ContentInfo_StaticContentInfoChange; // write changes to a text file
SelectedROFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); SelectedROFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, null, SelectedROFst, origfstid, SelectedROFst.ROFstID); ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, null, SelectedROFst, origfstid, SelectedROFst.ROFstID);
@@ -124,9 +124,26 @@ namespace VEPROMS.CSLA.Library
_Xp["ROUpdate", "LoadingFigures"] = value; // save selected value _Xp["ROUpdate", "LoadingFigures"] = value; // save selected value
} }
} }
#endregion // ROUpdate
#region ToString [Category("RO Update")]
public override string ToString() [DisplayName("Previous ROFSTID")]
[RefreshProperties(RefreshProperties.All)]
[Description("Previous ROFSTID")]
public string ROUpdate_PrevROFSTID
{
get
{
string s = _Xp["ROUpdate", "PrevROFSTID"];// get the saved value
return s;
}
set
{
_Xp["ROUpdate", "PrevROFSTID"] = value; // save selected value
}
}
#endregion // ROUpdate
#region ToString
public override string ToString()
{ {
string s = _Xp.ToString(); string s = _Xp.ToString();
if (s == "<Config/>" || s == "<Config></config>") return string.Empty; if (s == "<Config/>" || s == "<Config></config>") return string.Empty;
@@ -88,9 +88,9 @@ namespace VEPROMS.CSLA.Library
} }
public override string ToString() public override string ToString()
{ {
string itemTitle = Regex.Replace(this.Path, "^..+?\\u0007", ""); string itemTitle = Regex.Replace(this.Path, "^..+?\\u0007", "");
itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace("\\u8209?", "-").Replace(@"\u9586?",@"\"); itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace("\\u8209?", "-").Replace(@"\u9586?",@"\");
return string.Format("{4} item {0} by {1} on {2} @ {3}", this.ActionWhat, this.UserID, this.ActionWhen == DateTime.MinValue ? this.DTS.ToShortDateString() : this.ActionWhen.ToShortDateString(), this.ActionWhen == DateTime.MinValue ? this.DTS.ToShortTimeString() : this.ActionWhen.ToShortTimeString(), itemTitle); return string.Format("{4} item {0} by {1} on {2} @ {3}", this.ActionWhat, this.UserID, this.ActionWhen == DateTime.MinValue ? this.DTS.ToShortDateString() : this.ActionWhen.ToShortDateString(), this.ActionWhen == DateTime.MinValue ? this.DTS.ToString("HH:mm:ss") : this.ActionWhen.ToString("HH:mm:ss"), itemTitle);
//return string.Format("{0} by {1} on {2}", this.DeleteStatus == 0 ? "Changed" : "Deleted", this.UserID, this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss")); //return string.Format("{0} by {1} on {2}", this.DeleteStatus == 0 ? "Changed" : "Deleted", this.UserID, this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss"));
//return string.Format("{0} - {1} {2}", this.UserID, this.DTS, this.DeleteStatus == 0 ? "" : "Deleted"); //return string.Format("{0} - {1} {2}", this.UserID, this.DTS, this.DeleteStatus == 0 ? "" : "Deleted");
} }
@@ -102,7 +102,7 @@ namespace VEPROMS.CSLA.Library
who = string.Format(" by {0}", this.UserID); who = string.Format(" by {0}", this.UserID);
if (this.DTS != DateTime.Parse("1/1/1980")) if (this.DTS != DateTime.Parse("1/1/1980"))
when = string.Format(" on {0}", this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss")); when = string.Format(" on {0}", this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss"));
return string.Format("{0}{1}{2}", this.ActionWhat, who, when); return string.Format("{0}{1}{2}", this.ActionWhat, who, when);
} }
} }
@@ -177,7 +177,7 @@ namespace VEPROMS.CSLA.Library
public override string ToString() public override string ToString()
{ {
return string.Format("{0}{1} deleted by {2} on {3} @ {4}", this.Level == 0 ? "Previous " : this.Level == 1 ? "Next " : "", this.ItemType, this.UserID, this.DTS.ToShortDateString(), this.DTS.ToShortTimeString()); return string.Format("{0}{1} deleted by {2} on {3}", this.Level == 0 ? "Previous " : this.Level == 1 ? "Next " : "", this.ItemType, this.UserID, this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss"));
// return string.Format("Deleted by {0} on {1} @ {2}", this.UserID, this.DTS.ToShortDateString(), this.DTS.ToShortTimeString()); // return string.Format("Deleted by {0} on {1} @ {2}", this.UserID, this.DTS.ToShortDateString(), this.DTS.ToShortTimeString());
// return string.Format("(ItemID: {4}, DeleteID: {5}, {0} by {1} on {2} Level: {3}", this.DeleteStatus == 0 ? "Changed" : "Deleted", this.UserID, this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss"), Level.ToString(), this.ItemID.ToString(), this.DeleteStatus.ToString()); // return string.Format("(ItemID: {4}, DeleteID: {5}, {0} by {1} on {2} Level: {3}", this.DeleteStatus == 0 ? "Changed" : "Deleted", this.UserID, this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss"), Level.ToString(), this.ItemID.ToString(), this.DeleteStatus.ToString());
// return string.Format("Level: {3}, {0} - {1} {2}", this.UserID, this.DTS, this.DeleteStatus == 0 ? "" : "Deleted", this.Level.ToString()); // return string.Format("Level: {3}, {0} - {1} {2}", this.UserID, this.DTS, this.DeleteStatus == 0 ? "" : "Deleted", this.Level.ToString());
@@ -267,6 +267,14 @@ namespace VEPROMS.CSLA.Library
} }
} }
// pop up a message window telling the user the RO Update has completed and how many ROs were updated
// If we are updating RO from the Admin Tools (from the V button) and we are updating more than on procedure set, then just append the "RO Update Complete" text
// To the MessageList. Once completed will all procedure sets, Admin Tools will display one message box with all the results in it.
if (MessageList == null)
FlexibleMessageBox.Show(fixedROs == 0 ? "No ROs Required Updating" : string.Format("{0} ROs Updated for {1}", fixedROs, dvi.MyFolder.Name), "RO Update Complete");
else
MessageList.AppendLine((fixedROs == 0 ? "No ROs Required Updating for " : string.Format("{0} ROs Updated for ", fixedROs)) + dvi.MyFolder.Name);
return fixedROs; return fixedROs;
} }
@@ -320,7 +328,9 @@ namespace VEPROMS.CSLA.Library
{ {
if (myProgressBarRefresh != null) myProgressBarRefresh(0, 100, "Starting Update"); if (myProgressBarRefresh != null) myProgressBarRefresh(0, 100, "Starting Update");
DirectoryInfo di = new DirectoryInfo(rdi.FolderPath); int origFSTid = origROFst.ROFstID;
DirectoryInfo di = new DirectoryInfo(rdi.FolderPath);
string rofstfilepath = rdi.FolderPath + @"\ro.fst"; string rofstfilepath = rdi.FolderPath + @"\ro.fst";
FileStream fsIn = new FileStream(rofstfilepath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); FileStream fsIn = new FileStream(rofstfilepath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
FileInfo rofstFI = new FileInfo(rofstfilepath); FileInfo rofstFI = new FileInfo(rofstfilepath);
@@ -346,8 +356,9 @@ namespace VEPROMS.CSLA.Library
docver.DocVersionAssociations[0].MyROFst = rofst; docver.DocVersionAssociations[0].MyROFst = rofst;
SetAssociationLastCompleted(docver, string.Empty); SetAssociationLastCompleted(docver, string.Empty);
SetPrevFSTID(docver, origFSTid); // //C2026-008 Re-Architect RO.FST to include RO Modification date/time
return rofst; return rofst;
} }
// Read in the rofst & make the rofst record. // Read in the rofst & make the rofst record.
@@ -369,7 +380,10 @@ namespace VEPROMS.CSLA.Library
// Keep a list of ROIDs for Images that have changed. // Keep a list of ROIDs for Images that have changed.
List<string> MyChangedFigureROIDs = UpdateROFigures(rdi, myProgressBarRefresh, rofst, rodb, myLookup, docver); List<string> MyChangedFigureROIDs = UpdateROFigures(rdi, myProgressBarRefresh, rofst, rodb, myLookup, docver);
return rofst; //C2026-008 Re-Architect RO.FST to include RO Modification date/time
SetPrevFSTID(docver, origFSTid);
return rofst;
} }
} }
@@ -469,8 +483,22 @@ namespace VEPROMS.CSLA.Library
docver.Save(); docver.Save();
} }
// Place the status of loading the RO Figures when updating RO Values //C2026-008 Re-Architect RO.FST to include RO Modification date/time
private static void SetAssociationROFiguresLoading(DocVersion docver, string value) // Place the previous ROFSTID in the config in case network error or computer crashes while updating RO Values
private static void SetPrevFSTID(DocVersion docver, int value)
{
if (docver.DocVersionAssociations[0]?.MyROFst != null && value != -1)
{
string cfg = docver.DocVersionAssociations[0].Config;
AssociationConfig ac = new AssociationConfig((cfg == null || cfg.Length == 0) ? "<Config />" : cfg);
ac.ROUpdate_PrevROFSTID = value.ToString();
docver.DocVersionAssociations[0].Config = ac.ToString();
docver.Save();
}
}
// Place the status of loading the RO Figures when updating RO Values
private static void SetAssociationROFiguresLoading(DocVersion docver, string value)
{ {
string cfg = docver.DocVersionAssociations[0].Config; string cfg = docver.DocVersionAssociations[0].Config;
@@ -903,10 +931,10 @@ namespace VEPROMS.CSLA.Library
} }
} }
#endregion #endregion
} }
public class ROFstInfoROTableUpdateEventArgs public class ROFstInfoROTableUpdateEventArgs
{ {
private string _ROText; private string _ROText;
public string ROText public string ROText
@@ -1056,5 +1084,5 @@ namespace VEPROMS.CSLA.Library
this.RaiseListChangedEvents = true; this.RaiseListChangedEvents = true;
} }
} }
} }
@@ -1,16 +1,17 @@
using JR.Utils.GUI.Forms;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing;
using System.Data; using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml;
using VEPROMS.CSLA.Library; using VEPROMS.CSLA.Library;
using Volian.Base.Library; using Volian.Base.Library;
using Volian.Pipe.Library; using Volian.Pipe.Library;
using System.Xml;
using System.Diagnostics;
using JR.Utils.GUI.Forms;
namespace Volian.Controls.Library namespace Volian.Controls.Library
{ {
@@ -220,7 +221,10 @@ namespace Volian.Controls.Library
{ {
if (!DesignMode) // B2019-043 need to check if we are just saving changes to the user interface if (!DesignMode) // B2019-043 need to check if we are just saving changes to the user interface
{ {
rtxbComment.Text = value; if (value != null)
{
rtxbComment.Text = Regex.Replace(value, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
}
if (rtxbComment.Text != string.Empty) if (rtxbComment.Text != string.Empty)
rtxbComment.SelectionStart = rtxbComment.TextLength; // position cursor to end of text rtxbComment.SelectionStart = rtxbComment.TextLength; // position cursor to end of text
} }
+18 -14
View File
@@ -314,9 +314,9 @@ namespace Volian.Controls.Library
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100;
ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Text = value;
ProgressBar.Maximum = 100;
ProgressBar.Value = 100;
Application.DoEvents(); Application.DoEvents();
} }
} }
@@ -639,28 +639,32 @@ namespace Volian.Controls.Library
if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID) if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID)
{ {
string message = string.Empty; 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); FlexibleMessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
FinalProgressBarMessage = "Cannot check-out Working Draft"; 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 roFstInfo = ROFstInfo.Get(fstid);
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid); ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid);
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
Application.DoEvents(); Application.DoEvents();
FinalProgressBarMessage = "ROs values updated"; FinalProgressBarMessage = "ROs values updated";
MyROFST = roFstInfo; MyROFST = roFstInfo;
updatedROs = true; updatedROs = true;
} }
} }
//B2025-008 //B2025-008
@@ -887,9 +887,18 @@ namespace Volian.Controls.Library
Bar b = myTabItem.ContainerControl as Bar; Bar b = myTabItem.ContainerControl as Bar;
if (b != null) if (b != null)
{ {
b.CloseDockTab(myTabItem); try
//b.Items.Remove(myTabItem); {
RemoveItem(myTabItem); b.CloseDockTab(myTabItem);
}
catch
{
//This is to work around a bug inside 3rd party DotNetBar
//The bug occurs when events happen out of order and it tries
//to remove a TabItem from the Collection the has already been removed
}
RemoveItem(myTabItem);
} }
} }
/// <summary> /// <summary>
+26 -5
View File
@@ -3567,6 +3567,26 @@ namespace Volian.Controls.Library
ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv, roFstInfo, DoProgressBarRefresh); ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv, roFstInfo, DoProgressBarRefresh);
roFstInfo = Mydvi.DocVersionAssociations[0].MyROFst; roFstInfo = Mydvi.DocVersionAssociations[0].MyROFst;
} }
else if (!dv.ROfstLastCompleted && origfstid == roFstInfo.ROFstID)
{
//Handle issue where load failed without completing update
//previous RO FST did not load, get last loaded ID
//if none, use -1 which will check all ROs in the Working Draft
string cfg = dv.DocVersionAssociations[0].Config;
AssociationConfig ac = new AssociationConfig((cfg == null || cfg.Length == 0) ? "<Config />" : cfg);
if (dv.DocVersionAssociations[0]?.MyROFst != null)
{
if (!int.TryParse(ac.ROUpdate_PrevROFSTID, out origfstid))
{
origfstid = -1;
}
}
else
{
origfstid = -1;
}
}
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ContentInfo.StaticContentInfoChange += ContentInfo_StaticContentInfoChange; // write changes to a text file ContentInfo.StaticContentInfoChange += ContentInfo_StaticContentInfoChange; // write changes to a text file
ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, null, roFstInfo, origfstid, roFstInfo.ROFstID); ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, null, roFstInfo, origfstid, roFstInfo.ROFstID);
@@ -3578,7 +3598,7 @@ namespace Volian.Controls.Library
} }
Cursor = Cursors.Default; Cursor = Cursors.Default;
FinalProgressBarMessage = "ROs values updated"; FinalProgressBarMessage = "ROs values updated";
} }
private System.IO.StreamWriter swROUpdate; 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 // 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) void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
@@ -3618,10 +3638,11 @@ namespace Volian.Controls.Library
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100;
ProgressBar.Maximum = 100; ProgressBar.Text = value;
ProgressBar.Text = value; ProgressBar.Maximum = 100;
Application.DoEvents(); ProgressBar.Value = 100;
Application.DoEvents();
} }
} }
+25 -5
View File
@@ -2479,7 +2479,27 @@ namespace Volian.Controls.Library
ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv, roFstInfo, DoProgressBarRefresh); ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv, roFstInfo, DoProgressBarRefresh);
roFstInfo = MyDVI.DocVersionAssociations[0].MyROFst; roFstInfo = MyDVI.DocVersionAssociations[0].MyROFst;
} }
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); else if (!dv.ROfstLastCompleted && origfstid == roFstInfo.ROFstID)
{
//Handle issue where load failed without completing update
//previous RO FST did not load, get last loaded ID
//if none, use -1 which will check all ROs in the Working Draft
string cfg = dv.DocVersionAssociations[0].Config;
AssociationConfig ac = new AssociationConfig((cfg == null || cfg.Length == 0) ? "<Config />" : cfg);
if (dv.DocVersionAssociations[0]?.MyROFst != null)
{
if (!int.TryParse(ac.ROUpdate_PrevROFSTID, out origfstid))
{
origfstid = -1;
}
}
else
{
origfstid = -1;
}
}
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ContentInfo.StaticContentInfoChange += ContentInfo_StaticContentInfoChange; // write changes to a text file ContentInfo.StaticContentInfoChange += ContentInfo_StaticContentInfoChange; // write changes to a text file
ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, null, roFstInfo, origfstid, roFstInfo.ROFstID); ROFstInfo.RefreshROFstAtItemLevel(DocVersionInfo.Get(dv.VersionID), DoProgressBarRefresh, null, roFstInfo, origfstid, roFstInfo.ROFstID);
swROUpdate.Close(); swROUpdate.Close();
@@ -2530,10 +2550,10 @@ namespace Volian.Controls.Library
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100; ProgressBar.Text = value;
ProgressBar.Maximum = 100; ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Value = 100;
Application.DoEvents(); Application.DoEvents();
} }
} }
public List<string> roFstInfo_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args) public List<string> roFstInfo_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)