
Load all at once code to support print. Open Command from the Start (PROMS2010) Menu. Enter key on treeview executes Open. The Treeview was retaining focus after opening procedures or accessory documents. This was fixed. Tab Bar initialized to the full width. Items were not always being displayed after the tree was clicked. The RO and Transition Info tabs are made invisible for accessory documents. The Tags, RO and Transition tabs are made invisible when no doucment is selected. Enter the DSO Framer window when it is created. Enter the Accessory page editor or step editor when a tab is selected. Remember the last selection in a step editor page when you return. Activate one of the remaining tabs when a tab is closed. Embed the pushpin images.
232 lines
7.3 KiB
C#
232 lines
7.3 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Text;
|
|
using System.Drawing;
|
|
using VEPROMS.CSLA.Library;
|
|
using Volian.Controls.Library;
|
|
|
|
namespace Volian.Controls.Library
|
|
{
|
|
public partial class StepTabPanel : DevComponents.DotNetBar.PanelDockContainer
|
|
{
|
|
#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 _MyDisplayTabControl; }
|
|
//set { _MyDisplayTabControl = value; }
|
|
}
|
|
/// <summary>
|
|
/// StepPanel contained in this control.
|
|
/// </summary>
|
|
public Volian.Controls.Library.StepPanel MyStepPanel
|
|
{
|
|
get { return _MyStepPanel; }
|
|
//set { _MyStepPanel = value; }
|
|
}
|
|
/// <summary>
|
|
/// related DisplayTabItem
|
|
/// </summary>
|
|
public DisplayTabItem MyDisplayTabItem
|
|
{
|
|
get { return _MyDisplayTabItem; }
|
|
set { _MyDisplayTabItem = value; }
|
|
}
|
|
/// <summary>
|
|
/// Currently Selected ItemInfo
|
|
/// </summary>
|
|
public ItemInfo SelectedItemInfo
|
|
{
|
|
get { return _MyStepPanel.SelectedItemInfo; }
|
|
set { _MyStepPanel.SelectedItemInfo = value; }
|
|
}
|
|
/// <summary>
|
|
/// Currently Selected StepItem
|
|
/// </summary>
|
|
public StepItem SelectedStepItem
|
|
{
|
|
//get { return _MyStepPanel._LookupStepItems[_MyStepPanel.SelectedItemInfo.ItemID]; }
|
|
get { return _MyStepPanel.SelectedStepItem; }
|
|
}
|
|
/// <summary>
|
|
/// Procedure ItemInfo
|
|
/// </summary>
|
|
public ItemInfo MyProcedureItemInfo
|
|
{
|
|
get { return _MyStepPanel.MyProcedureItemInfo; }
|
|
set { _MyStepPanel.MyProcedureItemInfo = value; }
|
|
}
|
|
#endregion
|
|
#region Contructors
|
|
public StepTabPanel(DisplayTabControl myDisplayTabControl)
|
|
{
|
|
_MyDisplayTabControl = myDisplayTabControl;
|
|
InitializeComponent();
|
|
SetupStepTabPanel();
|
|
SetupStepPanel();
|
|
SetupStepTabRibbon();
|
|
}
|
|
#endregion
|
|
#region Private Methods - Setup
|
|
/// <summary>
|
|
/// Setup StepTabRibbon
|
|
/// </summary>
|
|
private void SetupStepTabRibbon()
|
|
{
|
|
_MyStepTabRibbon = new StepTabRibbon();
|
|
_MyStepTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
|
|
_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
|
|
_MyStepTabRibbon.Name = "displayTabRibbon1";
|
|
//_MyTabRibbon.MyDisplayRTB = null;
|
|
_MyStepTabRibbon.MyStepItem = null;
|
|
this.Controls.Add(_MyStepTabRibbon);
|
|
}
|
|
/// <summary>
|
|
/// Setup this within control
|
|
/// </summary>
|
|
private void SetupStepTabPanel()
|
|
{
|
|
Dock = System.Windows.Forms.DockStyle.Fill;
|
|
this.Enter += new EventHandler(StepTabPanel_Enter);
|
|
}
|
|
/// <summary>
|
|
/// Setup StepPanel
|
|
/// </summary>
|
|
private void SetupStepPanel()
|
|
{
|
|
//this.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
|
_MyStepPanel = new Volian.Controls.Library.StepPanel(this.components);
|
|
this.Controls.Add(_MyStepPanel);
|
|
//
|
|
// _MyPanel
|
|
//
|
|
_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 ItemSelectedChangedEvent(_MyStepPanel_ItemSelectedChanged);
|
|
}
|
|
#endregion
|
|
#region Event Handlers
|
|
private bool _ShowingItem = false;
|
|
public bool ShowingItem
|
|
{
|
|
get { return _ShowingItem; }
|
|
set { _ShowingItem = value; }
|
|
}
|
|
/// <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)
|
|
{
|
|
if (_ShowingItem) return;
|
|
_ShowingItem = true;
|
|
//if (ItemSelected != null)
|
|
_MyStepPanel.ItemShow();
|
|
_ShowingItem = false;
|
|
}
|
|
/// <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)
|
|
{
|
|
_MyDisplayTabControl.OnLinkActiveChanged(sender, 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)
|
|
{
|
|
_MyDisplayTabControl.OnLinkInsertTran(sender, 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)
|
|
{
|
|
_MyDisplayTabControl.OnLinkInsertRO(sender, 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)
|
|
{
|
|
_MyDisplayTabControl.OnLinkModifyTran(sender, 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, ItemSelectedChangedEventArgs args)
|
|
{
|
|
//_MyTabRibbon.MyDisplayRTB = args.MyDisplayItem.MyDisplayRTB;
|
|
_MyStepTabRibbon.MyStepItem = args.MyStepItem;
|
|
_MyDisplayTabControl.OnItemSelectedChanged(sender, 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)
|
|
{
|
|
_MyDisplayTabControl.OpenItem(args.MyStepItem.MyItemInfo);
|
|
}
|
|
/// <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)
|
|
{
|
|
_MyDisplayTabControl.OnItemClick(sender, 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)
|
|
{
|
|
_MyDisplayTabControl.OpenItem(args.MyLinkText.MyTranToItemInfo);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|