Tab Controls
This commit is contained in:
70
PROMS/Volian.Controls.Library/DisplayTabPanel.cs
Normal file
70
PROMS/Volian.Controls.Library/DisplayTabPanel.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
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 DisplayTabPanel : DevComponents.DotNetBar.PanelDockContainer
|
||||
{
|
||||
private DisplayTabControl _MyTabControl;
|
||||
private Volian.Controls.Library.DisplayPanel _MyPanel;
|
||||
private DisplayTabItem _TabItem;
|
||||
public DisplayTabItem TabItem
|
||||
{
|
||||
get { return _TabItem; }
|
||||
set { _TabItem = value; }
|
||||
}
|
||||
public ItemInfo ItemSelected
|
||||
{
|
||||
get { return _MyPanel.ItemSelected; }
|
||||
set { _MyPanel.ItemSelected = value; }
|
||||
}
|
||||
public ItemInfo MyItem
|
||||
{
|
||||
get { return _MyPanel.MyItem; }
|
||||
set { _MyPanel.MyItem = value; }
|
||||
}
|
||||
public DisplayTabPanel(DisplayTabControl myTabControl)
|
||||
{
|
||||
_MyTabControl = myTabControl;
|
||||
InitializeComponent();
|
||||
SetupDisplayTabPanel();
|
||||
SetupDisplayPanel();
|
||||
}
|
||||
private void SetupDisplayTabPanel()
|
||||
{
|
||||
Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
}
|
||||
private void SetupDisplayPanel()
|
||||
{
|
||||
//this.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||
_MyPanel = new Volian.Controls.Library.DisplayPanel(this.components);
|
||||
this.Controls.Add(_MyPanel);
|
||||
//
|
||||
// _MyPanel
|
||||
//
|
||||
_MyPanel.AutoScroll = true;
|
||||
_MyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
_MyPanel.LinkClicked +=new Volian.Controls.Library.DisplayPanelLinkEvent(_MyPanel_LinkClicked);
|
||||
_MyPanel.ItemClick +=new Volian.Controls.Library.DisplayPanelEvent(_MyPanel_ItemClick);
|
||||
_MyPanel.AttachmentClicked += new Volian.Controls.Library.DisplayPanelAttachmentEvent(_MyPanel_AttachmentClicked);
|
||||
}
|
||||
void _MyPanel_AttachmentClicked(object sender, DisplayPanelAttachmentEventArgs args)
|
||||
{
|
||||
_MyTabControl.OpenItem(args.MyDisplayItem.MyItem);
|
||||
}
|
||||
void _MyPanel_ItemClick(object sender, DisplayPanelEventArgs args)
|
||||
{
|
||||
_MyTabControl.OnItemClick(sender, args);
|
||||
}
|
||||
void _MyPanel_LinkClicked(object sender, DisplayLinkEventArgs args)
|
||||
{
|
||||
_MyTabControl.OpenItem(args.ItemTo);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user