Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f1bb45e42 | |||
| f39aefd28f | |||
| 2cfc43dbfd | |||
| f4168b5202 | |||
| 2d93b652e8 | |||
| 70782cd655 | |||
| 768fcc4f05 | |||
| 727491f99b | |||
| c5f1c3a340 | |||
| a78311104a | |||
| 4b5b06210c | |||
| 333645b044 | |||
| 23173074aa | |||
| be8bb9c4e1 | |||
| d07e132216 | |||
| 401fa12851 | |||
| 194ca84d38 | |||
| 7bbf62d735 | |||
| 3924e2fca5 | |||
| 2e39102e7c | |||
| 2a0849fae5 | |||
| 9f4e8f6eef | |||
| d0fe36f86e | |||
| 10da22cd77 | |||
| 6dacc2d515 | |||
| 7baa9628d6 | |||
| ec5229101f | |||
| a0e0b1e788 | |||
| f1e04396de | |||
| d0cae8c2fc | |||
| 90c215d4c1 | |||
| 1b1dc78548 | |||
| a112163f85 | |||
| 2a9f2e188d | |||
| 652e0cb06f | |||
| 123b1b08c2 | |||
| b321bc354b | |||
| 03d7397242 | |||
| 7273a8b13b |
Binary file not shown.
@@ -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);
|
||||||
@@ -1478,19 +1470,34 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
ProcedureConfig pc = procedureInfo.MyConfig as ProcedureConfig;
|
ProcedureConfig pc = procedureInfo.MyConfig as ProcedureConfig;
|
||||||
if (pc == null) return;
|
if (pc == null) return;
|
||||||
pc.SelectedSlave = selectedSlave;
|
|
||||||
|
pc.SelectedSlave = selectedSlave;
|
||||||
pc.Print_Rev = revNumber;
|
pc.Print_Rev = revNumber;
|
||||||
//AppRevDate Change
|
//AppRevDate Change
|
||||||
pc.Print_RevDate = revDate.ToString("MM/dd/yyyy");
|
pc.Print_RevDate = revDate.ToString("MM/dd/yyyy");
|
||||||
pc.Print_ChangeBarDate = dts.ToString("MM/dd/yyyy HH:mm:ss");
|
pc.Print_ChangeBarDate = dts.ToString("MM/dd/yyyy HH:mm:ss"); //this is needed to set the changebar date for an indeividual unit also
|
||||||
using (Item itm = Item.Get(procedureInfo.ItemID))
|
using (Item itm = Item.Get(procedureInfo.ItemID))
|
||||||
{
|
{
|
||||||
itm.MyContent.Config = pc.ToString();
|
itm.MyContent.Config = pc.ToString();
|
||||||
//itm.DTS = dts;
|
//itm.DTS = dts;
|
||||||
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
|
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
itm.Save();
|
itm.Save();
|
||||||
}
|
|
||||||
|
|
||||||
|
//C2026-015 set overall change bar date
|
||||||
|
if (selectedSlave > 0)
|
||||||
|
{
|
||||||
|
pc.SelectedSlave = 0;
|
||||||
|
pc.Print_Rev = revNumber;
|
||||||
|
pc.Print_RevDate = revDate.ToString("MM/dd/yyyy");
|
||||||
|
pc.Print_ChangeBarDate = dts.ToString("MM/dd/yyyy HH:mm:ss"); //this is needed to set the changebar date for an indeividual unit also
|
||||||
|
using (Item itm2 = Item.Get(procedureInfo.ItemID))
|
||||||
|
{
|
||||||
|
itm2.MyContent.Config = pc.ToString();
|
||||||
|
itm2.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
|
itm2.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class RevType
|
public class RevType
|
||||||
|
|||||||
@@ -68,8 +68,26 @@ namespace VEPROMS
|
|||||||
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");// ("MM/dd/yyyy HH:mm:ss");
|
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");// ("MM/dd/yyyy HH:mm:ss");
|
||||||
|
|
||||||
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({ dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss")}) by ({ VlnSettings.UserID}) on ({DateTime.Now})", DateTime.Now, VlnSettings.UserID, 0);
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss")}) by ({VlnSettings.UserID}) on ({DateTime.Now})", DateTime.Now, VlnSettings.UserID, 0);
|
||||||
|
|
||||||
|
//CSM C2026-014 if multi-unit, set for each unit
|
||||||
|
System.Data.DataTable dt = RevisionData.GetRevisionDataByUnit(MyProcInfo.ItemID);
|
||||||
|
if (RevisionData.HasUnits(dt))
|
||||||
|
{
|
||||||
|
//Change the ChangeBarDate for each unit
|
||||||
|
foreach (DataRow r in dt.Rows)
|
||||||
|
{
|
||||||
|
if (!r.IsNull("UnitID"))
|
||||||
|
{
|
||||||
|
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
||||||
|
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss")}) by ({VlnSettings.UserID}) on ({DateTime.Now}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyProcConfig.SelectedSlave = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -108,7 +126,10 @@ namespace VEPROMS
|
|||||||
sb.Append($" The Procedure Viewer Change Bar Date will be set to ({maxDTS}).");
|
sb.Append($" The Procedure Viewer Change Bar Date will be set to ({maxDTS}).");
|
||||||
foreach (DataRow r in dt.Rows)
|
foreach (DataRow r in dt.Rows)
|
||||||
{
|
{
|
||||||
sb.Append($"\r\n The Change Bar Date for Unit ({r["UnitName"]}) will be set to ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}).");
|
if (!r.IsNull("UnitID"))
|
||||||
|
{
|
||||||
|
sb.Append($"\r\n The Change Bar Date for Unit ({r["UnitName"]}) will be set to ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}).");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.Append("\r\n Any Change Bars for Units not listed above will use the Overall/Procedure Viewer Change Bar Date (as these Units have no approvals).");
|
sb.Append("\r\n Any Change Bars for Units not listed above will use the Overall/Procedure Viewer Change Bar Date (as these Units have no approvals).");
|
||||||
@@ -121,12 +142,14 @@ namespace VEPROMS
|
|||||||
//Change the ChangeBarDate for each unit
|
//Change the ChangeBarDate for each unit
|
||||||
foreach (DataRow r in dt.Rows)
|
foreach (DataRow r in dt.Rows)
|
||||||
{
|
{
|
||||||
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
if (!r.IsNull("UnitID"))
|
||||||
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
|
{
|
||||||
|
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
||||||
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
|
||||||
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
|
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MyProcConfig.SelectedSlave = 0;
|
MyProcConfig.SelectedSlave = 0;
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -4113,7 +4113,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// date). Print_ViewableAfterChangeBarDate was created to get only that user specified date, if it exists. If it does exist, we compare
|
// date). Print_ViewableAfterChangeBarDate was created to get only that user specified date, if it exists. If it does exist, we compare
|
||||||
// that with the Content datetime, otherwise we proceed as before.
|
// that with the Content datetime, otherwise we proceed as before.
|
||||||
DateTime? viewableStartingDateTime = (MyProcedure.MyConfig as ProcedureConfig).Print_ViewableStartingChangeBarDate;
|
DateTime? viewableStartingDateTime = (MyProcedure.MyConfig as ProcedureConfig).Print_ViewableStartingChangeBarDate;
|
||||||
if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate)
|
if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate && (MyProcedure.MyConfig as ProcedureConfig).SelectedSlave == 0)
|
||||||
return (MyContent.DTS > viewableStartingDateTime);
|
return (MyContent.DTS > viewableStartingDateTime);
|
||||||
return (MyContent.DTS > MyProcedure.ChangeBarDate);
|
return (MyContent.DTS > MyProcedure.ChangeBarDate);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ namespace Volian.Controls.Library
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
#region Component Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,7 +33,6 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
this.gpItem = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.gpItem = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
this.btnApplicabilitychg2 = new DevComponents.DotNetBar.ButtonItem();
|
|
||||||
this.btnApplicabilitychg = new DevComponents.DotNetBar.ButtonX();
|
this.btnApplicabilitychg = new DevComponents.DotNetBar.ButtonX();
|
||||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||||
this.gpItem.SuspendLayout();
|
this.gpItem.SuspendLayout();
|
||||||
@@ -42,14 +40,14 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
// btnApplicabilitychg
|
// btnApplicabilitychg
|
||||||
//
|
//
|
||||||
this.btnApplicabilitychg.Location = new System.Drawing.Point(60, 8);
|
this.btnApplicabilitychg.Location = new System.Drawing.Point(90, 8);
|
||||||
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(4);
|
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.btnApplicabilitychg.BackColor = System.Drawing.SystemColors.Control;
|
this.btnApplicabilitychg.BackColor = System.Drawing.SystemColors.Control;
|
||||||
this.btnApplicabilitychg.Name = "btnApplicabilitychg";
|
this.btnApplicabilitychg.Name = "btnApplicabilitychg";
|
||||||
this.btnApplicabilitychg.Size = new System.Drawing.Size(80, 22);
|
this.btnApplicabilitychg.Size = new System.Drawing.Size(87, 22);
|
||||||
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2);
|
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Change applicability settings - All At Level", "", "When clicked, all steps at the level of the current step will have their applicability settings changed. Note that for two column procedures, the left column and right column are handled separately.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Set All at Level", "", "When clicked, all steps at that level of the current step will be set to the selected applicability. Note that the Set All at Level button is disabled for RNO step types unless they are substeps off of a RNO step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); // C2026-034 fix tool tip text.
|
||||||
this.btnApplicabilitychg.TabIndex = 0;
|
this.btnApplicabilitychg.TabIndex = 0;
|
||||||
this.btnApplicabilitychg.Text = "Set All at Level";
|
this.btnApplicabilitychg.Text = "Set All at Level";
|
||||||
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
||||||
@@ -106,13 +104,12 @@ namespace Volian.Controls.Library
|
|||||||
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
//this.gpItem.Controls.Add(this.btnApplicabilitychg);
|
|
||||||
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
||||||
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
||||||
this.gpItem.Margin = new System.Windows.Forms.Padding(4);
|
this.gpItem.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.gpItem.Name = "gpItem";
|
this.gpItem.Name = "gpItem";
|
||||||
this.gpItem.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
|
this.gpItem.Padding = new System.Windows.Forms.Padding(0, 20, 0, 0);
|
||||||
this.gpItem.Size = new System.Drawing.Size(432, 85);
|
this.gpItem.Size = new System.Drawing.Size(432, 85);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -169,9 +166,9 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
private DevComponents.DotNetBar.Controls.GroupPanel gpMode;
|
private DevComponents.DotNetBar.Controls.GroupPanel gpMode;
|
||||||
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
|
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
|
||||||
private DevComponents.DotNetBar.ButtonItem btnApplicabilitychg2;
|
|
||||||
private DevComponents.DotNetBar.ButtonX btnApplicabilitychg;
|
private DevComponents.DotNetBar.ButtonX btnApplicabilitychg;
|
||||||
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,20 +21,24 @@ namespace Volian.Controls.Library
|
|||||||
if (ApplicabilityViewModeChanged != null)
|
if (ApplicabilityViewModeChanged != null)
|
||||||
ApplicabilityViewModeChanged(this, new EventArgs());
|
ApplicabilityViewModeChanged(this, new EventArgs());
|
||||||
}
|
}
|
||||||
|
|
||||||
private DisplayTabItem _MyDisplayTabItem = null;
|
private DisplayTabItem _MyDisplayTabItem = null;
|
||||||
public DisplayTabItem MyDisplayTabItem
|
public DisplayTabItem MyDisplayTabItem
|
||||||
{
|
{
|
||||||
get { return _MyDisplayTabItem; }
|
get { return _MyDisplayTabItem; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (DesignMode) return; // B2019-043 need to check if we are just saving changes to the user interface
|
if (DesignMode) return; // B2019-043 need to check if we are just saving changes to the user interface
|
||||||
_MyDisplayTabItem = value;
|
_MyDisplayTabItem = value;
|
||||||
gpMode.Controls.Clear();
|
gpMode.Controls.Clear();
|
||||||
gpItem.Controls.Clear();
|
gpItem.Controls.Clear();
|
||||||
MyCheckBoxes.Clear();
|
MyCheckBoxes.Clear();
|
||||||
if (_MyDisplayTabItem != null)
|
if (_MyDisplayTabItem != null)
|
||||||
{
|
{
|
||||||
DocVersionConfig dcfg = _MyDisplayTabItem.MyItemInfo.MyDocVersion.MyConfig as DocVersionConfig;
|
//B2026-043 Fix "Set All At Level" button.
|
||||||
|
DevComponents.DotNetBar.Controls.GroupPanel gpSubItem = InitializegpSubItem();
|
||||||
|
|
||||||
|
DocVersionConfig dcfg = _MyDisplayTabItem.MyItemInfo.MyDocVersion.MyConfig as DocVersionConfig;
|
||||||
List<string> names = new List<string>();
|
List<string> names = new List<string>();
|
||||||
for (int n = 1; n <= dcfg.Unit_Count; n++)
|
for (int n = 1; n <= dcfg.Unit_Count; n++)
|
||||||
{
|
{
|
||||||
@@ -42,7 +46,7 @@ namespace Volian.Controls.Library
|
|||||||
names.Add(dcfg.Unit_Name);
|
names.Add(dcfg.Unit_Name);
|
||||||
}
|
}
|
||||||
dcfg.SelectedSlave = 0;
|
dcfg.SelectedSlave = 0;
|
||||||
// string[] names = dcfg.Unit_Name.Split(',');
|
// string[] names = dcfg.Unit_Name.Split(',');
|
||||||
int apple = -1;
|
int apple = -1;
|
||||||
if(_MyDisplayTabItem.MyStepTabPanel != null)
|
if(_MyDisplayTabItem.MyStepTabPanel != null)
|
||||||
apple = _MyDisplayTabItem.MyStepTabPanel.MyStepPanel.ApplDisplayMode;
|
apple = _MyDisplayTabItem.MyStepTabPanel.MyStepPanel.ApplDisplayMode;
|
||||||
@@ -54,11 +58,13 @@ namespace Volian.Controls.Library
|
|||||||
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddItemMode("All", "-1");
|
AddItemMode("All", "-1", ref gpSubItem);
|
||||||
i = 0;
|
i = 0;
|
||||||
foreach (string name in names)
|
foreach (string name in names)
|
||||||
AddItemMode(name.Trim(), (++i).ToString());
|
AddItemMode(name.Trim(), (++i).ToString(), ref gpSubItem);
|
||||||
AddItemMode("None", "0");
|
AddItemMode("None", "0", ref gpSubItem);
|
||||||
|
gpItem.Controls.Add(gpSubItem);
|
||||||
|
gpSubItem.BringToFront();
|
||||||
gpItem.Controls.Add(btnApplicabilitychg);
|
gpItem.Controls.Add(btnApplicabilitychg);
|
||||||
btnApplicabilitychg.BringToFront();
|
btnApplicabilitychg.BringToFront();
|
||||||
if (_MyDisplayTabItem.MyStepTabPanel != null)
|
if (_MyDisplayTabItem.MyStepTabPanel != null)
|
||||||
@@ -85,6 +91,37 @@ namespace Volian.Controls.Library
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private DevComponents.DotNetBar.Controls.GroupPanel InitializegpSubItem() //B2026-043 Fix "Set All At Level" button.
|
||||||
|
{
|
||||||
|
DevComponents.DotNetBar.Controls.GroupPanel gpSubItem;
|
||||||
|
gpSubItem = new DevComponents.DotNetBar.Controls.GroupPanel
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// gpSubItem
|
||||||
|
//
|
||||||
|
AutoSize = true,
|
||||||
|
AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink,
|
||||||
|
CanvasColor = System.Drawing.SystemColors.Control,
|
||||||
|
ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007,
|
||||||
|
DisabledBackColor = System.Drawing.Color.Empty,
|
||||||
|
Dock = System.Windows.Forms.DockStyle.Top,
|
||||||
|
Location = new System.Drawing.Point(0, 49),
|
||||||
|
Margin = new System.Windows.Forms.Padding(4),
|
||||||
|
Name = "gpSubItem",
|
||||||
|
Padding = new System.Windows.Forms.Padding(13, 12, 13, 37)
|
||||||
|
};
|
||||||
|
gpSubItem.BackColor = Color.Transparent;
|
||||||
|
gpSubItem.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||||
|
gpSubItem.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||||
|
gpSubItem.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
|
||||||
|
gpSubItem.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
|
gpSubItem.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
|
gpSubItem.TabIndex = 1;
|
||||||
|
gpSubItem.Text = "";
|
||||||
|
gpSubItem.Location = new System.Drawing.Point(0, 49);
|
||||||
|
gpSubItem.Size = new System.Drawing.Size(400, 250);
|
||||||
|
return gpSubItem;
|
||||||
|
}
|
||||||
private Dictionary<int, CheckBox> MyCheckBoxes = new Dictionary<int, CheckBox>();
|
private Dictionary<int, CheckBox> MyCheckBoxes = new Dictionary<int, CheckBox>();
|
||||||
private string _MyApplicability = string.Empty;
|
private string _MyApplicability = string.Empty;
|
||||||
public string MyApplicability
|
public string MyApplicability
|
||||||
@@ -128,20 +165,25 @@ namespace Volian.Controls.Library
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
//}
|
//}
|
||||||
private void AddItemMode(string name, string value)
|
private void AddItemMode(string name, string value, ref DevComponents.DotNetBar.Controls.GroupPanel gpSubItem)
|
||||||
{
|
{
|
||||||
CheckBox cb = new CheckBox();
|
CheckBox cb = new CheckBox();
|
||||||
cb.BackColor = Color.Transparent;
|
cb.BackColor = Color.Transparent;
|
||||||
|
cb.Height = 24;
|
||||||
|
cb.Width = 75;
|
||||||
|
cb.AutoSize = true;
|
||||||
cb.Text = name;
|
cb.Text = name;
|
||||||
cb.Tag = value;
|
cb.Tag = value;
|
||||||
cb.Dock = DockStyle.Top;
|
cb.Dock = DockStyle.Top;
|
||||||
gpItem.Controls.Add(cb);
|
gpSubItem.Controls.Add(cb);
|
||||||
cb.BringToFront();
|
cb.BringToFront();
|
||||||
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
|
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
|
||||||
MyCheckBoxes.Add(value == null ? -1 : int.Parse(value), cb);
|
MyCheckBoxes.Add(value == null ? -1 : int.Parse(value), cb);
|
||||||
}
|
}
|
||||||
private void cb_CheckedChanged(object sender, EventArgs e)
|
private void cb_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
|
ei.SaveCurrentAndContents(); // C2026-035 save unsaved step text.
|
||||||
UnwireCheckboxes(false);
|
UnwireCheckboxes(false);
|
||||||
CheckBox cb = sender as CheckBox;
|
CheckBox cb = sender as CheckBox;
|
||||||
CheckState cs = cb.CheckState;
|
CheckState cs = cb.CheckState;
|
||||||
@@ -287,8 +329,12 @@ namespace Volian.Controls.Library
|
|||||||
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
|
ei.SaveCurrentAndContents(); // C2026-035 save unsaved step text.
|
||||||
|
|
||||||
ItemInfo startitm = MyItemInfo.FirstSibling;
|
|
||||||
|
|
||||||
|
ItemInfo startitm = MyItemInfo.FirstSibling;
|
||||||
while (startitm != null)
|
while (startitm != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -390,10 +436,18 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_MyItemInfo = value;
|
_MyItemInfo = value;
|
||||||
if (_MyItemInfo != null)
|
if (_MyItemInfo != null)
|
||||||
{
|
{
|
||||||
if (this.Visible == false) return;
|
if (this.Visible == false) return;
|
||||||
|
if (_MyItemInfo.IsRNOPart == true) // Check if step is an RNO disable "Set All To Level" button.
|
||||||
|
{
|
||||||
|
btnApplicabilitychg.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
btnApplicabilitychg.Enabled = true;
|
||||||
|
}
|
||||||
IItemConfig cfg = _MyItemInfo.MyConfig as IItemConfig;
|
IItemConfig cfg = _MyItemInfo.MyConfig as IItemConfig;
|
||||||
List<int> apples = cfg.MasterSlave_Applicability.GetFlags();
|
List<int> apples = cfg.MasterSlave_Applicability.GetFlags();
|
||||||
UnwireCheckboxes(true);
|
UnwireCheckboxes(true);
|
||||||
@@ -489,7 +543,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
public DisplayApplicability()
|
public DisplayApplicability()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent(); //B2026-043 Fix "Set All At Level" button.
|
||||||
this.VisibleChanged += new EventHandler(DisplayApplicability_VisibleChanged);
|
this.VisibleChanged += new EventHandler(DisplayApplicability_VisibleChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,3 +554,4 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user