Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c42596811e | |||
| d095a19187 | |||
| 8089e2c898 | |||
| a657d03fb0 | |||
| 4e829200f5 | |||
| 56f14323d1 | |||
| 4fcd22ca68 | |||
| ef32564fba | |||
| d95505726f | |||
| 836cdaf087 | |||
| 6f5c41abb8 | |||
| 6379321785 | |||
| e4c6e4393e | |||
| 3e6bb81e39 | |||
| 81643e2aef | |||
| 8a186f9f0c | |||
| 14aa39976a | |||
| c077e0ddc2 | |||
| d198a7b63a |
Binary file not shown.
@@ -1337,11 +1337,13 @@ namespace VEPROMS
|
|||||||
pi.ClearChangeBarOverrides();
|
pi.ClearChangeBarOverrides();
|
||||||
|
|
||||||
//B2019-140 Change bars do not get refreshed when approval is run.
|
//B2019-140 Change bars do not get refreshed when approval is run.
|
||||||
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
ProcedureInfo newproc;
|
||||||
|
|
||||||
//// Refresh the StepPanel for the current Procedure
|
//// Refresh the StepPanel for the current Procedure
|
||||||
//// 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
|
||||||
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
|
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
|
||||||
if (dti != null)
|
if (dti != null)
|
||||||
{
|
{
|
||||||
@@ -1349,9 +1351,20 @@ namespace VEPROMS
|
|||||||
dti.MyStepTabPanel.MyStepPanel.Focus();
|
dti.MyStepTabPanel.MyStepPanel.Focus();
|
||||||
|
|
||||||
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
||||||
|
{
|
||||||
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||||
|
Application.DoEvents();
|
||||||
|
newproc = ProcedureInfo.Get(pi.ItemID);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
//since in a separate form, need to update the tree view
|
//since in a separate form, need to update the tree view
|
||||||
//so "Showing Change Bars" Content Menu Item is correct
|
//so "Showing Change Bars" Content Menu Item is correct
|
||||||
MyFrmVEPROMS.RefreshProcedureNode(newproc);
|
MyFrmVEPROMS.RefreshProcedureNode(newproc);
|
||||||
|
|||||||
@@ -628,20 +628,31 @@ namespace VEPROMS
|
|||||||
|
|
||||||
//B2019-140 Change bars do not get refreshed when approval is run.
|
//B2019-140 Change bars do not get refreshed when approval is run.
|
||||||
// Reset a Procedure and sub items in the cache
|
// Reset a Procedure and sub items in the cache
|
||||||
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
|
||||||
|
|
||||||
//// Refresh the StepPanel for the current Procedure
|
//// Refresh the StepPanel for the current Procedure
|
||||||
//// 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
|
||||||
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
|
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
|
||||||
if (dti != null)
|
if (dti != null)
|
||||||
{
|
{
|
||||||
|
_ = ItemInfo.ResetProcedure(pi.ItemID, true);
|
||||||
|
|
||||||
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>())
|
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
||||||
|
{
|
||||||
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_ = ItemInfo.ResetProcedure(pi.ItemID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1114,11 +1114,32 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
_Apples = new List<MiniConfig>();
|
_Apples = new List<MiniConfig>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B2026-017 Use Pre-typed in information when adding New Applicability
|
||||||
|
if (_Apples.Count == 0)
|
||||||
|
{
|
||||||
|
cfg.ID = textBox1.Text;
|
||||||
|
if (!string.IsNullOrEmpty(textBox2.Text))
|
||||||
|
{
|
||||||
|
cfg.Name = textBox2.Text;
|
||||||
|
}
|
||||||
|
cfg.Number = textBox3.Text;
|
||||||
|
cfg.Text = textBox4.Text;
|
||||||
|
cfg.OtherID = textBox8.Text;
|
||||||
|
cfg.OtherName = textBox9.Text;
|
||||||
|
cfg.OtherNumber = textBox10.Text;
|
||||||
|
cfg.OtherText = textBox11.Text;
|
||||||
|
cfg.ProcedureNumber = textBox5.Text;
|
||||||
|
cfg.SetID = textBox6.Text;
|
||||||
|
cfg.SetName = textBox7.Text;
|
||||||
|
}
|
||||||
_Apples.Add(cfg);
|
_Apples.Add(cfg);
|
||||||
|
|
||||||
bsApples.DataSource = null;
|
bsApples.DataSource = null;
|
||||||
bsApples.DataSource = _Apples;
|
bsApples.DataSource = _Apples;
|
||||||
lbApplicabilities.SelectedItem = cfg;
|
lbApplicabilities.SelectedItem = cfg;
|
||||||
|
lbApplicabilities_SelectedIndexChanged(sender, e);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ApplicIsUsed(MiniConfig cfg) // B2017-230 - don't allow user to remove an applicability that is being used (specified)
|
private bool ApplicIsUsed(MiniConfig cfg) // B2017-230 - don't allow user to remove an applicability that is being used (specified)
|
||||||
|
|||||||
@@ -2291,7 +2291,7 @@ OnPropertyChanged("Default_BkColor");
|
|||||||
public void RemoveSlave(int index)
|
public void RemoveSlave(int index)
|
||||||
{
|
{
|
||||||
XmlNode dd = _Xp.XmlContents.SelectSingleNode("//Slave[@index='" + index.ToString() + "']");
|
XmlNode dd = _Xp.XmlContents.SelectSingleNode("//Slave[@index='" + index.ToString() + "']");
|
||||||
dd.ParentNode.RemoveChild(dd);
|
dd?.ParentNode?.RemoveChild(dd);
|
||||||
}
|
}
|
||||||
public int MaxSlaveIndex
|
public int MaxSlaveIndex
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3841,7 +3841,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
//B2019-140 Change bars do not get refreshed when approval is run.
|
//B2019-140 Change bars do not get refreshed when approval is run.
|
||||||
// Reset a Procedure and sub items in the cache
|
// Reset a Procedure and sub items in the cache
|
||||||
public static ProcedureInfo ResetProcedure(int procID)
|
// **********************
|
||||||
|
// Be carefull calling this when the Procedure is Open
|
||||||
|
// When the Procedure is Open - use StepTabRibbon.RefreshProcedure(); instead
|
||||||
|
// When a Procedure is open and you try to refresh it,
|
||||||
|
// events can fire behind the scenes - causing data to try to be accessed while you are trying to refresh it
|
||||||
|
// When This occurs, it will cause a
|
||||||
|
// "ThreadException ... Collection was modified; enumeration operation may not execute.”
|
||||||
|
// **********************
|
||||||
|
public static ProcedureInfo ResetProcedure(int procID, bool resetindisplaytab = false)
|
||||||
{
|
{
|
||||||
// The following lines reload the procedure info cache
|
// The following lines reload the procedure info cache
|
||||||
ProcedureInfo newproc = ProcedureInfo.Get(procID, true);
|
ProcedureInfo newproc = ProcedureInfo.Get(procID, true);
|
||||||
@@ -3859,6 +3867,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ItemInfo newprocitem = Get(procID, true);
|
ItemInfo newprocitem = Get(procID, true);
|
||||||
newprocitem.RefreshConfig();
|
newprocitem.RefreshConfig();
|
||||||
|
|
||||||
|
if (!resetindisplaytab)
|
||||||
|
{
|
||||||
//Reload all the child/sub items
|
//Reload all the child/sub items
|
||||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||||
@@ -3879,6 +3889,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
pconfigrefresh_items[index].MyProcedure = newproc;
|
pconfigrefresh_items[index].MyProcedure = newproc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//return the changed procedure info
|
//return the changed procedure info
|
||||||
return newproc;
|
return newproc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
@@ -284,10 +285,17 @@ namespace Volian.Controls.Library
|
|||||||
Volian.Base.Library.BigNum MasterSlave_ApplicabilityTmp;
|
Volian.Base.Library.BigNum MasterSlave_ApplicabilityTmp;
|
||||||
StepConfig sc = MyItemInfo.MyConfig as StepConfig;
|
StepConfig sc = MyItemInfo.MyConfig as StepConfig;
|
||||||
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
|
||||||
ItemInfo startitm = MyItemInfo.FirstSibling;
|
ItemInfo startitm = MyItemInfo.FirstSibling;
|
||||||
while (startitm != null)
|
while (startitm != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// C2026-023: Check for Transitions when setting Applicability to all for a level
|
||||||
|
List<InvalidTransition> invalidTrans = WillTransitionsBeValidCommand.Execute(startitm.ItemID, MasterSlave_ApplicabilityTmp.ToString());
|
||||||
|
if (IsProcWithNoExternalTrans(startitm, invalidTrans))
|
||||||
|
{
|
||||||
StepConfig sc2 = startitm.MyConfig as StepConfig;
|
StepConfig sc2 = startitm.MyConfig as StepConfig;
|
||||||
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
||||||
{
|
{
|
||||||
@@ -295,11 +303,34 @@ namespace Volian.Controls.Library
|
|||||||
cnt.Config = sc2.ToString();
|
cnt.Config = sc2.ToString();
|
||||||
cnt.Save();
|
cnt.Save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (sb.Length == 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("The applicability for some Step(s) cannot be changed due to transition links.");
|
||||||
|
sb.AppendLine("Applicability settings for these steps will return to original settings when OK is selected.");
|
||||||
|
sb.AppendLine("Changing the applicability for would invalidate a transition in the following steps:");
|
||||||
|
sb.AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (InvalidTransition inv in invalidTrans.Where(x => !x.TgtStep.StartsWith(x.SrcStep)))
|
||||||
|
{
|
||||||
|
sb.AppendLine(string.Format("{0} : From {1} to {2}.", startitm.MyTab.CleanTextNoSymbols.Trim(), inv.TgtStep, inv.SrcStep));
|
||||||
|
}
|
||||||
|
|
||||||
|
invalidTrans.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
startitm = startitm.GetNext();
|
startitm = startitm.GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
_MyDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
_MyDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||||
|
|
||||||
|
if (sb.Length > 0)
|
||||||
|
FlexibleMessageBox.Show(sb.ToString(), "Transitions Affected By Applicability Change");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// B2021-149: for procedure, only consider external transitions as invalid
|
// B2021-149: for procedure, only consider external transitions as invalid
|
||||||
|
|||||||
@@ -4162,7 +4162,10 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
//B2026-024 Change bars should not show when updating Applicability.
|
||||||
|
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = false;
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = true;
|
||||||
}
|
}
|
||||||
public void SaveConfig()
|
public void SaveConfig()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1668,8 +1668,18 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
Clipboard.Clear();
|
Clipboard.Clear();
|
||||||
|
|
||||||
|
//Try to update the data object to persist beyond PROMS life
|
||||||
|
//if can't, log it and use old method of scoping clipboard to PROMS life
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Clipboard.SetDataObject(myDO, true); // this saves the cleaned up information to the Windows clipboard
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_MyLog.Warn($"Error Setting Clipboard Object to Persist beyond PROMS. Clipboard will be scoped to PROMS. Error:{ex.Message}");
|
||||||
Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard
|
Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard
|
||||||
}
|
}
|
||||||
|
}
|
||||||
iData = Clipboard.GetDataObject();
|
iData = Clipboard.GetDataObject();
|
||||||
bool noEquationData = true;
|
bool noEquationData = true;
|
||||||
// part of bug B2017-117 we were running out of window handles when printing, found this similar use of
|
// part of bug B2017-117 we were running out of window handles when printing, found this similar use of
|
||||||
|
|||||||
Reference in New Issue
Block a user