This commit is contained in:
@@ -16,6 +16,9 @@ namespace Volian.Controls.Library
|
||||
private StepTabPanel _MyStepTabPanel;
|
||||
private string _MyKey;
|
||||
private DSOTabPanel _MyDSOTabPanel;
|
||||
private DocumentInfo _MyDocumentInfo;
|
||||
|
||||
|
||||
#endregion
|
||||
#region Properties
|
||||
/// <summary>
|
||||
@@ -59,6 +62,13 @@ namespace Volian.Controls.Library
|
||||
get { return _MyStepTabPanel.SelectedItemInfo; }
|
||||
set { _MyStepTabPanel.SelectedItemInfo = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Current DocumentInfo for this page - only set if library document
|
||||
/// </summary>
|
||||
public DocumentInfo MyDocumentInfo
|
||||
{
|
||||
get { return _MyDocumentInfo; }
|
||||
}
|
||||
#endregion
|
||||
#region Constructors
|
||||
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey)
|
||||
@@ -69,16 +79,24 @@ namespace Volian.Controls.Library
|
||||
container.Add(this);
|
||||
InitializeComponent();
|
||||
this.Click += new EventHandler(DisplayTabItem_Click);
|
||||
//this.GotFocus += new EventHandler(DisplayTabItem_GotFocus);
|
||||
//this.LostFocus += new EventHandler(DisplayTabItem_LostFocus);
|
||||
//this.MouseDown += new System.Windows.Forms.MouseEventHandler(DisplayTabItem_MouseDown);
|
||||
//this.MouseUp += new System.Windows.Forms.MouseEventHandler(DisplayTabItem_MouseUp);
|
||||
if (myItemInfo.MyContent.MyEntry == null)
|
||||
SetupStepTabPanel();
|
||||
else
|
||||
SetupDSOTabPanel();
|
||||
Name = string.Format("DisplayTabItem {0}", myItemInfo.ItemID);
|
||||
}
|
||||
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, DocumentInfo myDocumentInfo, string myKey)
|
||||
{
|
||||
_MyKey = myKey;
|
||||
_MyDisplayTabControl = myDisplayTabControl;
|
||||
_MyDocumentInfo = myDocumentInfo;
|
||||
container.Add(this);
|
||||
InitializeComponent();
|
||||
this.Click += new EventHandler(DisplayTabItem_Click);
|
||||
SetupLibraryDocumentDSOTabPanel();
|
||||
Name = string.Format("DisplayTabLibraryDocument {0}", myDocumentInfo.DocID);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedChanged()
|
||||
{
|
||||
//Console.WriteLine("=>=>=>=> OnDisplayedChanged");
|
||||
@@ -168,13 +186,7 @@ namespace Volian.Controls.Library
|
||||
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||
Text = _MyItemInfo.TabTitle;
|
||||
Tooltip = _MyItemInfo.TabToolTip;
|
||||
//
|
||||
//Console.WriteLine("this.Focus {0}", Name);
|
||||
//this.Focus();
|
||||
//Console.WriteLine("Controls.Add {0}", Name);
|
||||
_MyDisplayTabControl.Controls.Add(_MyDSOTabPanel);
|
||||
//Console.WriteLine("Enabled = false {0}", Name);
|
||||
//_MyDisplayTabControl.MyBar.Enabled = false;
|
||||
DSOTabPanel.IgnoreEnter = true;
|
||||
Console.WriteLine("AddRange {0}", Name);
|
||||
_MyDisplayTabControl.MyBar.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
|
||||
@@ -182,15 +194,32 @@ namespace Volian.Controls.Library
|
||||
//
|
||||
// tabPanel
|
||||
//
|
||||
//Console.WriteLine("Enabled = true {0}", Name);
|
||||
//_MyDisplayTabControl.MyBar.Enabled = true;
|
||||
//Console.WriteLine("SelectedDisplayTabItem {0}", Name);
|
||||
_MyDisplayTabControl.SelectedDisplayTabItem = this;
|
||||
//Console.WriteLine("MyDisplayTabItem {0}", Name);
|
||||
_MyDSOTabPanel.MyDisplayTabItem = this;
|
||||
DSOTabPanel.IgnoreEnter = false;
|
||||
//_MyDisplayTabControl.OnItemSelectedChanged(this, new ItemSelectedChangedEventArgs(MyItemInfo));
|
||||
}
|
||||
private void SetupLibraryDocumentDSOTabPanel()
|
||||
{
|
||||
_MyDSOTabPanel = new DSOTabPanel(_MyDocumentInfo, _MyDisplayTabControl);
|
||||
//
|
||||
// tabItem
|
||||
//
|
||||
Control = _MyDSOTabPanel;
|
||||
Name = "tabLibraryDocument " + _MyDocumentInfo.DocID;
|
||||
Text = _MyDocumentInfo.LibTitle;
|
||||
DocumentConfig dc = new DocumentConfig(_MyDocumentInfo);
|
||||
Tooltip = dc.LibDoc_Comment;
|
||||
_MyDisplayTabControl.Controls.Add(_MyDSOTabPanel);
|
||||
DSOTabPanel.IgnoreEnter = true;
|
||||
_MyDisplayTabControl.MyBar.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
|
||||
this});
|
||||
//
|
||||
// tabPanel
|
||||
//
|
||||
_MyDisplayTabControl.SelectedDisplayTabItem = this;
|
||||
_MyDSOTabPanel.MyDisplayTabItem = this;
|
||||
DSOTabPanel.IgnoreEnter = false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user