C2019-036 View Only mode work with Checked Out Procedures

This commit is contained in:
2025-11-17 07:05:52 -05:00
parent b0e4128d3c
commit bd89af5e8c
9 changed files with 208 additions and 27 deletions

View File

@@ -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>