C2019-036 View Only mode work with Checked Out Procedures
This commit is contained in:
@@ -9,6 +9,7 @@ using System.Drawing;
|
||||
using System.Text.RegularExpressions;
|
||||
using Volian.Base.Library;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System.Linq;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
@@ -386,6 +387,26 @@ namespace Volian.Controls.Library
|
||||
// The following line expands the items needed to display SelectedItemInfo
|
||||
ExpandAsNeeded(myItemInfo);
|
||||
}
|
||||
|
||||
//C2019-036 View Only mode work with Checked Out Procedures
|
||||
public void ResetAll()
|
||||
{
|
||||
List<int> itemIDs = Controls.OfType<RTBItem>().Where(t => t?.MyItemInfo?.ActiveParent != null && t.MyItemInfo.ActiveParent.GetType() == typeof(ItemInfo)).Select(x => (x.MyItemInfo.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
|
||||
|
||||
foreach (int itemID in itemIDs)
|
||||
{
|
||||
ItemInfo.ResetParts(itemID);
|
||||
}
|
||||
|
||||
// The following line actually reloads the procedure item
|
||||
MyProcedureItemInfo = ItemInfo.Get(MyProcedureItemInfo.ItemID, true);
|
||||
MyProcedureItemInfo.RefreshConfig();
|
||||
ContentInfo.Refresh(Content.Get(MyProcedureItemInfo.MyContent.ContentID, true));
|
||||
|
||||
// The following line expands the items needed to display SelectedItemInfo
|
||||
ExpandAsNeeded(SelectedItemInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Currently selected StepRTB
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user