C2015-022 Separate Windows Upgrade – added logic to restore child tree nodes of a procedure set that was opened in a child window but then closed
C2015-022 Separate Windows Upgrade – added an event to allow us to update the bookmark list in child windows
This commit is contained in:
parent
60e9131698
commit
e4866e4ecc
@ -92,6 +92,18 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _ChildrenLoaded; }
|
||||
set { _ChildrenLoaded = value; }
|
||||
}
|
||||
protected bool _MovedToSeparateWindow = false; // C2015-022 tells us this tree node and childern are now in a child window (separate Window) - used on Parent window side for a folder context menu
|
||||
public bool MovedToSeparateWindow
|
||||
{
|
||||
get { return _MovedToSeparateWindow; }
|
||||
set { _MovedToSeparateWindow = value; }
|
||||
}
|
||||
protected bool _InChildWindow = false; // C2015-022 tells us this tree node is in the child window - used on child window side for folder context menu
|
||||
public bool InChildWindow
|
||||
{
|
||||
get { return _InChildWindow; }
|
||||
set { _InChildWindow = value; }
|
||||
}
|
||||
// Reset Node
|
||||
//public void CloseNode()
|
||||
//{
|
||||
|
@ -7,13 +7,27 @@ using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
public partial class DisplayBookMarks : UserControl
|
||||
public partial class DisplayBookMarks : UserControl
|
||||
{
|
||||
#region Properties
|
||||
private MostRecentItemList _MyBookMarks;
|
||||
#region delegates and Events
|
||||
// C2015-022 added event so that we can update child PROMS windows
|
||||
public delegate void ResetBookMarksInPROMSWindowsEvent(object sender, EventArgs args);
|
||||
public event ResetBookMarksInPROMSWindowsEvent ResetBookMarksInPROMSWindows;
|
||||
private void OnResetBookMarksInPROMSWindows()
|
||||
{
|
||||
if (ResetBookMarksInPROMSWindows != null)
|
||||
ResetBookMarksInPROMSWindows(this, new EventArgs());
|
||||
}
|
||||
#endregion //delegates and Events
|
||||
#region Properties
|
||||
private MostRecentItemList _MyBookMarks;
|
||||
public MostRecentItemList MyBookMarks
|
||||
{
|
||||
get { return _MyBookMarks; }
|
||||
set { _MyBookMarks = value; }
|
||||
}
|
||||
private ItemInfo _CurItemInfo = null;
|
||||
private bool _Initalizing = false;
|
||||
private DisplayTabControl _MyDisplayTabControl;
|
||||
@ -77,14 +91,23 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private void RefreshBookMarkData()
|
||||
{
|
||||
ResetBookMarkList();
|
||||
OnResetBookMarksInPROMSWindows(); // C2015-022 trigger event to update child PROMS windows with current bookmark list
|
||||
SaveBookMarks();
|
||||
}
|
||||
|
||||
// Part of Separate Windows upgrade C2015-022
|
||||
// Call from FrmVEPROMS which spins through all of the child windows and updates the bookmark list in each
|
||||
// - broke is code out of RefreshBookMarkData()
|
||||
public void ResetBookMarkList()
|
||||
{
|
||||
lbxBookMarks.DataSource = null;
|
||||
lbxBookMarks.DisplayMember = "MenuTitle";
|
||||
lbxBookMarks.DataSource = _MyBookMarks;
|
||||
btnClrBookMrks.Enabled = (lbxBookMarks.Items.Count > 0);
|
||||
btnRmvCurBookMrk.Enabled = lbxBookMarks.SelectedIndex > -1;
|
||||
SaveBookMarks();
|
||||
}
|
||||
private void SaveBookMarks()
|
||||
}
|
||||
private void SaveBookMarks()
|
||||
{
|
||||
Properties.Settings.Default.BookMarks = _MyBookMarks.ToSettings();
|
||||
Properties.Settings.Default.Save();
|
||||
|
Loading…
x
Reference in New Issue
Block a user