Object and Property name changes for consistency
This commit is contained in:
@@ -11,125 +11,212 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
public partial class StepTabPanel : DevComponents.DotNetBar.PanelDockContainer
|
||||
{
|
||||
private DisplayTabControl _MyTabControl;
|
||||
|
||||
public DisplayTabControl MyTabControl
|
||||
#region Private Fields
|
||||
private DisplayTabControl _MyDisplayTabControl;
|
||||
private StepTabRibbon _MyStepTabRibbon;
|
||||
private StepPanel _MyStepPanel;
|
||||
private DisplayTabItem _MyDisplayTabItem;
|
||||
#endregion
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Container
|
||||
/// </summary>
|
||||
public DisplayTabControl MyDisplayTabControl
|
||||
{
|
||||
get { return _MyTabControl; }
|
||||
set { _MyTabControl = value; }
|
||||
get { return _MyDisplayTabControl; }
|
||||
//set { _MyDisplayTabControl = value; }
|
||||
}
|
||||
private StepTabRibbon _MyTabRibbon;
|
||||
private Volian.Controls.Library.StepPanel _MyPanel;
|
||||
public Volian.Controls.Library.StepPanel MyPanel
|
||||
/// <summary>
|
||||
/// StepPanel contained in this control.
|
||||
/// </summary>
|
||||
public Volian.Controls.Library.StepPanel MyStepPanel
|
||||
{
|
||||
get { return _MyPanel; }
|
||||
set { _MyPanel = value; }
|
||||
get { return _MyStepPanel; }
|
||||
//set { _MyStepPanel = value; }
|
||||
}
|
||||
private DisplayTabItem _TabItem;
|
||||
public DisplayTabItem TabItem
|
||||
/// <summary>
|
||||
/// related DisplayTabItem
|
||||
/// </summary>
|
||||
public DisplayTabItem MyDisplayTabItem
|
||||
{
|
||||
get { return _TabItem; }
|
||||
set { _TabItem = value; }
|
||||
get { return _MyDisplayTabItem; }
|
||||
set { _MyDisplayTabItem = value; }
|
||||
}
|
||||
public ItemInfo ItemSelected
|
||||
/// <summary>
|
||||
/// Currently Selected ItemInfo
|
||||
/// </summary>
|
||||
public ItemInfo SelectedItemInfo
|
||||
{
|
||||
get { return _MyPanel.ItemSelected; }
|
||||
set { _MyPanel.ItemSelected = value; }
|
||||
get { return _MyStepPanel.SelectedItemInfo; }
|
||||
set { _MyStepPanel.SelectedItemInfo = value; }
|
||||
}
|
||||
public StepItem SelectedItem
|
||||
/// <summary>
|
||||
/// Currently Selected StepItem
|
||||
/// </summary>
|
||||
public StepItem SelectedStepItem
|
||||
{
|
||||
get { return _MyPanel._ItemLookup[_MyPanel.ItemSelected.ItemID]; }
|
||||
//get { return _MyStepPanel._LookupStepItems[_MyStepPanel.SelectedItemInfo.ItemID]; }
|
||||
get { return _MyStepPanel.SelectedStepItem; }
|
||||
}
|
||||
public ItemInfo MyItem
|
||||
/// <summary>
|
||||
/// Procedure ItemInfo
|
||||
/// </summary>
|
||||
public ItemInfo MyProcedureItemInfo
|
||||
{
|
||||
get { return _MyPanel.MyItem; }
|
||||
set { _MyPanel.MyItem = value; }
|
||||
get { return _MyStepPanel.MyProcedureItemInfo; }
|
||||
set { _MyStepPanel.MyProcedureItemInfo = value; }
|
||||
}
|
||||
public StepTabPanel(DisplayTabControl myTabControl)
|
||||
#endregion
|
||||
#region Contructors
|
||||
public StepTabPanel(DisplayTabControl myDisplayTabControl)
|
||||
{
|
||||
_MyTabControl = myTabControl;
|
||||
_MyDisplayTabControl = myDisplayTabControl;
|
||||
InitializeComponent();
|
||||
SetupDisplayTabPanel();
|
||||
SetupDisplayPanel();
|
||||
SetupDisplayTabRibbon();
|
||||
SetupStepTabPanel();
|
||||
SetupStepPanel();
|
||||
SetupStepTabRibbon();
|
||||
}
|
||||
private void SetupDisplayTabRibbon()
|
||||
#endregion
|
||||
#region Private Methods - Setup
|
||||
/// <summary>
|
||||
/// Setup StepTabRibbon
|
||||
/// </summary>
|
||||
private void SetupStepTabRibbon()
|
||||
{
|
||||
_MyTabRibbon = new StepTabRibbon();
|
||||
_MyTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
_MyTabRibbon.Location = new System.Drawing.Point(0, 0);
|
||||
_MyTabRibbon.Name = "displayTabRibbon1";
|
||||
_MyStepTabRibbon = new StepTabRibbon();
|
||||
_MyStepTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
|
||||
_MyStepTabRibbon.Name = "displayTabRibbon1";
|
||||
//_MyTabRibbon.MyDisplayRTB = null;
|
||||
_MyTabRibbon.MyDisplayItem = null;
|
||||
this.Controls.Add(_MyTabRibbon);
|
||||
_MyStepTabRibbon.MyStepItem = null;
|
||||
this.Controls.Add(_MyStepTabRibbon);
|
||||
}
|
||||
private void SetupDisplayTabPanel()
|
||||
/// <summary>
|
||||
/// Setup this within control
|
||||
/// </summary>
|
||||
private void SetupStepTabPanel()
|
||||
{
|
||||
Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Enter += new EventHandler(DisplayTabPanel_Enter);
|
||||
this.Enter += new EventHandler(StepTabPanel_Enter);
|
||||
}
|
||||
void DisplayTabPanel_Enter(object sender, EventArgs e)
|
||||
{
|
||||
//if (ItemSelected != null)
|
||||
_MyPanel.ItemShow();
|
||||
}
|
||||
private void SetupDisplayPanel()
|
||||
/// <summary>
|
||||
/// Setup StepPanel
|
||||
/// </summary>
|
||||
private void SetupStepPanel()
|
||||
{
|
||||
//this.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||
_MyPanel = new Volian.Controls.Library.StepPanel(this.components);
|
||||
this.Controls.Add(_MyPanel);
|
||||
_MyStepPanel = new Volian.Controls.Library.StepPanel(this.components);
|
||||
this.Controls.Add(_MyStepPanel);
|
||||
//
|
||||
// _MyPanel
|
||||
//
|
||||
_MyPanel.AutoScroll = true;
|
||||
_MyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
_MyPanel.LinkClicked +=new Volian.Controls.Library.DisplayPanelLinkEvent(_MyPanel_LinkClicked);
|
||||
_MyPanel.LinkActiveChanged += new Volian.Controls.Library.DisplayPanelLinkEvent(_MyPanel_LinkActiveChanged);
|
||||
_MyPanel.LinkInsertTran += new DisplayPanelLinkEvent(_MyPanel_LinkInsertTran);
|
||||
_MyPanel.LinkInsertRO += new DisplayPanelLinkEvent(_MyPanel_LinkInsertRO);
|
||||
_MyPanel.LinkModifyTran += new DisplayPanelLinkEvent(_MyPanel_LinkModifyTran);
|
||||
_MyPanel.LinkModifyRO += new DisplayPanelLinkEvent(_MyPanel_LinkModifyRO);
|
||||
_MyPanel.ItemClick +=new Volian.Controls.Library.DisplayPanelEvent(_MyPanel_ItemClick);
|
||||
_MyPanel.AttachmentClicked += new Volian.Controls.Library.DisplayPanelAttachmentEvent(_MyPanel_AttachmentClicked);
|
||||
_MyPanel.ItemSelectedChanged += new DisplayPanelEvent(_MyPanel_ItemSelectedChanged);
|
||||
_MyStepPanel.AutoScroll = true;
|
||||
_MyStepPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
_MyStepPanel.LinkClicked +=new Volian.Controls.Library.StepPanelLinkEvent(_MyStepPanel_LinkClicked);
|
||||
_MyStepPanel.LinkActiveChanged += new Volian.Controls.Library.StepPanelLinkEvent(_MyStepPanel_LinkActiveChanged);
|
||||
_MyStepPanel.LinkInsertTran += new StepPanelLinkEvent(_MyStepPanel_LinkInsertTran);
|
||||
_MyStepPanel.LinkInsertRO += new StepPanelLinkEvent(_MyStepPanel_LinkInsertRO);
|
||||
_MyStepPanel.LinkModifyTran += new StepPanelLinkEvent(_MyStepPanel_LinkModifyTran);
|
||||
_MyStepPanel.LinkModifyRO += new StepPanelLinkEvent(_MyStepPanel_LinkModifyRO);
|
||||
_MyStepPanel.ItemClick +=new Volian.Controls.Library.StepPanelEvent(_MyStepPanel_ItemClick);
|
||||
_MyStepPanel.AttachmentClicked += new Volian.Controls.Library.StepPanelAttachmentEvent(_MyStepPanel_AttachmentClicked);
|
||||
_MyStepPanel.ItemSelectedChanged += new StepPanelEvent(_MyStepPanel_ItemSelectedChanged);
|
||||
}
|
||||
void _MyPanel_LinkActiveChanged(object sender, DisplayLinkEventArgs args)
|
||||
#endregion
|
||||
#region Event Handlers
|
||||
/// <summary>
|
||||
/// Occurs when the user clicks on a StepTabPanel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void StepTabPanel_Enter(object sender, EventArgs e)
|
||||
{
|
||||
_MyTabControl.OnLinkActiveChanged(sender, args);
|
||||
}
|
||||
void _MyPanel_LinkInsertTran(object sender, DisplayLinkEventArgs args)
|
||||
//if (ItemSelected != null)
|
||||
_MyStepPanel.ItemShow();
|
||||
}
|
||||
/// <summary>
|
||||
/// Occurs when the cursor moves onto or off of a link
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_LinkActiveChanged(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
_MyTabControl.OnLinkInsertTran(sender, args);
|
||||
_MyDisplayTabControl.OnLinkActiveChanged(sender, args);
|
||||
}
|
||||
void _MyPanel_LinkInsertRO(object sender, DisplayLinkEventArgs args)
|
||||
/// <summary>
|
||||
/// Occurs when the user chooses to add a transition
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_LinkInsertTran(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
_MyTabControl.OnLinkInsertRO(sender, args);
|
||||
_MyDisplayTabControl.OnLinkInsertTran(sender, args);
|
||||
}
|
||||
void _MyPanel_LinkModifyTran(object sender, DisplayLinkEventArgs args)
|
||||
/// <summary>
|
||||
/// Occurs when the user chooses to add an RO
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_LinkInsertRO(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
_MyTabControl.OnLinkModifyTran(sender, args);
|
||||
_MyDisplayTabControl.OnLinkInsertRO(sender, args);
|
||||
}
|
||||
void _MyPanel_LinkModifyRO(object sender, DisplayLinkEventArgs args)
|
||||
/// <summary>
|
||||
/// Occurs when the user chosses to modify a transition
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_LinkModifyTran(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
_MyTabControl.OnLinkModifyRO(sender, args);
|
||||
_MyDisplayTabControl.OnLinkModifyTran(sender, args);
|
||||
}
|
||||
void _MyPanel_ItemSelectedChanged(object sender, DisplayPanelEventArgs args)
|
||||
/// <summary>
|
||||
/// Occurs when the user chooses to Modify an RO
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_LinkModifyRO(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
_MyDisplayTabControl.OnLinkModifyRO(sender, args);
|
||||
}
|
||||
/// <summary>
|
||||
/// Occurs when the Selected Item changes
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_ItemSelectedChanged(object sender, StepPanelEventArgs args)
|
||||
{
|
||||
//_MyTabRibbon.MyDisplayRTB = args.MyDisplayItem.MyDisplayRTB;
|
||||
_MyTabRibbon.MyDisplayItem = args.MyDisplayItem;
|
||||
_MyTabControl.OnItemSelectedChanged(sender, args);
|
||||
_MyStepTabRibbon.MyStepItem = args.MyStepItem;
|
||||
_MyDisplayTabControl.OnItemSelectedChanged(sender, args);
|
||||
}
|
||||
void _MyPanel_AttachmentClicked(object sender, DisplayPanelAttachmentEventArgs args)
|
||||
/// <summary>
|
||||
/// Occurs when the user clicks on the Attachment Expander
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_AttachmentClicked(object sender, StepPanelAttachmentEventArgs args)
|
||||
{
|
||||
_MyTabControl.OpenItem(args.MyDisplayItem.MyItem);
|
||||
_MyDisplayTabControl.OpenItem(args.MyStepItem.MyItemInfo);
|
||||
}
|
||||
void _MyPanel_ItemClick(object sender, DisplayPanelEventArgs args)
|
||||
/// <summary>
|
||||
/// Occurs when the user clicks on the tab next to an item
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_ItemClick(object sender, StepPanelEventArgs args)
|
||||
{
|
||||
_MyTabControl.OnItemClick(sender, args);
|
||||
_MyDisplayTabControl.OnItemClick(sender, args);
|
||||
}
|
||||
void _MyPanel_LinkClicked(object sender, DisplayLinkEventArgs args)
|
||||
/// <summary>
|
||||
/// Occurs when the user clicks on an item
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void _MyStepPanel_LinkClicked(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
_MyTabControl.OpenItem(args.ItemTo);
|
||||
_MyDisplayTabControl.OpenItem(args.MyTranToItemInfo);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user