C2015-028 Add Editorial Mode to PROMS Step Editor

This commit is contained in:
2025-09-25 08:01:19 -04:00
parent e8b32c4ed3
commit 9130604fa6
10 changed files with 161 additions and 38 deletions

View File

@@ -11,6 +11,7 @@ using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms;
using Volian.Base.Library;
using Microsoft.Win32;
using System.Linq;
namespace Volian.Controls.Library
{
@@ -261,24 +262,45 @@ namespace Volian.Controls.Library
get { return _ChgId; }
set { _ChgId = value; }
}
// C2015-028 Add Editorial Mode to PROMS Step Editor
public bool EditorialChange
{
get
{
if (_ChgId == null) return true;
if (_ChgId == "") return true;
if (_ChgId.ToUpper() == "EC") return true;
return false;
}
}
#endregion
#region Events
/// <summary>
/// This event is raised when a the "Tab" of a DisplayItem is clicked with a mouse.
/// So far this has just been used for demo purposes. It could be used to select a
/// step and it's children for the purpose of copying.
/// </summary>
public event StepPanelEvent ItemClick;
if (_ChgId.ToUpper() == "EC") { return true;}
return IsInEditorialMode;
}
}
// C2015-028 Add Editorial Mode to PROMS Step Editor
// property to hold if button in ribbon is toggled on or off
public bool IsInEditorialMode { get; set; } = false;
// C2015-028 Add Editorial Mode to PROMS Step Editor
// This is used when button in the ribbon is toggled on/off
// It iterates through all previously opened tabs
// and updates the "Editorial Mode" button
// and background color to match those of the current tab
public void SetEdititorialModeForAllTabs(bool mode)
{
foreach (DisplayTabItem tabItem in _MyDisplayTabItems.Values.Where(tabItem => tabItem.MyStepTabPanel != null))
{
tabItem.MyStepTabPanel.MyStepTabRibbon.SetEditorialMode(mode);
}
}
#endregion
#region Events
/// <summary>
/// This event is raised when a the "Tab" of a DisplayItem is clicked with a mouse.
/// So far this has just been used for demo purposes. It could be used to select a
/// step and it's children for the purpose of copying.
/// </summary>
public event StepPanelEvent ItemClick;
/// <summary>
/// Checks to see if the ItemClick event is handled and launches it
/// </summary>