Added new DisplayTabControl to form replacing system.windows.forms.tabcontol.
This commit is contained in:
@@ -115,7 +115,7 @@ namespace VEPROMS
|
||||
case "ProcedureInfo":
|
||||
_LastProcedureInfo = (ProcedureInfo)(_LastTreeNode.VEObject);
|
||||
_LastProcedure = _LastProcedureInfo.Get();
|
||||
OpenItem((ItemInfo)_LastProcedureInfo);
|
||||
tc.OpenItem((ItemInfo)_LastProcedureInfo);
|
||||
if (_LastProcedureInfo.ItemAnnotationCount > 0)
|
||||
{
|
||||
if (!cbCmntDontPopup.Checked)
|
||||
@@ -126,7 +126,7 @@ namespace VEPROMS
|
||||
case "SectionInfo":
|
||||
_LastSectionInfo = (SectionInfo)(_LastTreeNode.VEObject);
|
||||
_LastSection = _LastSectionInfo.Get();
|
||||
OpenItem((ItemInfo)_LastSectionInfo);
|
||||
tc.OpenItem((ItemInfo)_LastSectionInfo);
|
||||
if (_LastSectionInfo.ItemAnnotationCount > 0)
|
||||
{
|
||||
if (!cbCmntDontPopup.Checked)
|
||||
@@ -137,7 +137,7 @@ namespace VEPROMS
|
||||
case "StepInfo":
|
||||
_LastStepInfo = (StepInfo)(_LastTreeNode.VEObject);
|
||||
_LastStep = _LastStepInfo.Get();
|
||||
OpenItem((ItemInfo)_LastStepInfo);
|
||||
tc.OpenItem((ItemInfo)_LastStepInfo);
|
||||
if (_LastStepInfo.ItemAnnotationCount > 0)
|
||||
{
|
||||
if (!cbCmntDontPopup.Checked)
|
||||
@@ -357,32 +357,32 @@ namespace VEPROMS
|
||||
return rtnColor;
|
||||
}
|
||||
|
||||
private void SetupEditorColors(DisplayPanel vlnCSLAPanel1, TabPage pg)
|
||||
{
|
||||
// setup color
|
||||
if (_LastFolderInfo == null)
|
||||
{
|
||||
// user didn't select a FolderInfo type of node.
|
||||
// walk up the tree to find the first FolderInfo node type
|
||||
VETreeNode tn = (VETreeNode)(tv.SelectedNode);
|
||||
while (tn != null && tn.VEObject.GetType().Name != "FolderInfo")
|
||||
tn = (VETreeNode)tn.Parent;
|
||||
_LastFolderInfo = (FolderInfo)(tn.VEObject);
|
||||
_LastFolder = _LastFolderInfo.Get();
|
||||
}
|
||||
//private void SetupEditorColors(DisplayPanel vlnCSLAPanel1, TabPage pg)
|
||||
//{
|
||||
// // setup color
|
||||
// if (_LastFolderInfo == null)
|
||||
// {
|
||||
// // user didn't select a FolderInfo type of node.
|
||||
// // walk up the tree to find the first FolderInfo node type
|
||||
// VETreeNode tn = (VETreeNode)(tv.SelectedNode);
|
||||
// while (tn != null && tn.VEObject.GetType().Name != "FolderInfo")
|
||||
// tn = (VETreeNode)tn.Parent;
|
||||
// _LastFolderInfo = (FolderInfo)(tn.VEObject);
|
||||
// _LastFolder = _LastFolderInfo.Get();
|
||||
// }
|
||||
|
||||
if ((_LastFolderInfo.FolderConfig.Color_editbackground != null) && !(_LastFolderInfo.FolderConfig.Color_editbackground.Equals("")))
|
||||
{
|
||||
vlnCSLAPanel1.ActiveColor = cGetColor(_LastFolderInfo.FolderConfig.Color_editbackground);
|
||||
}
|
||||
if ((_LastFolderInfo.FolderConfig.Default_BkColor != null) && !(_LastFolderInfo.FolderConfig.Default_BkColor.Equals("")))
|
||||
{
|
||||
vlnCSLAPanel1.InactiveColor = _LastFolderInfo.FolderConfig.Default_BkColor;
|
||||
vlnCSLAPanel1.TabColor = vlnCSLAPanel1.InactiveColor;
|
||||
vlnCSLAPanel1.PanelColor = vlnCSLAPanel1.InactiveColor;
|
||||
pg.BackColor = vlnCSLAPanel1.InactiveColor;
|
||||
}
|
||||
}
|
||||
// if ((_LastFolderInfo.FolderConfig.Color_editbackground != null) && !(_LastFolderInfo.FolderConfig.Color_editbackground.Equals("")))
|
||||
// {
|
||||
// vlnCSLAPanel1.ActiveColor = cGetColor(_LastFolderInfo.FolderConfig.Color_editbackground);
|
||||
// }
|
||||
// if ((_LastFolderInfo.FolderConfig.Default_BkColor != null) && !(_LastFolderInfo.FolderConfig.Default_BkColor.Equals("")))
|
||||
// {
|
||||
// vlnCSLAPanel1.InactiveColor = _LastFolderInfo.FolderConfig.Default_BkColor;
|
||||
// vlnCSLAPanel1.TabColor = vlnCSLAPanel1.InactiveColor;
|
||||
// vlnCSLAPanel1.PanelColor = vlnCSLAPanel1.InactiveColor;
|
||||
// pg.BackColor = vlnCSLAPanel1.InactiveColor;
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Display a Property Page for the current tree node
|
||||
@@ -764,14 +764,14 @@ namespace VEPROMS
|
||||
/// <param name="item"></param>
|
||||
private void OpenTransition(ItemInfo item)
|
||||
{
|
||||
OpenItem(item);
|
||||
tc.OpenItem(item);
|
||||
}
|
||||
|
||||
private void OpenItem(ItemInfo item)
|
||||
{
|
||||
DisplayPanel vlnCSLAPanel1 = AddProcedureTab(item.MyProcedure);
|
||||
vlnCSLAPanel1.ItemSelect(item);
|
||||
}
|
||||
//private void OpenItem(ItemInfo item)
|
||||
//{
|
||||
// DisplayPanel vlnCSLAPanel1 = AddProcedureTab(item.MyProcedure);
|
||||
// vlnCSLAPanel1.ItemSelect(item);
|
||||
//}
|
||||
|
||||
private void vlnCSLAPanel1_LinkClicked(object sender, Volian.Controls.Library.DisplayLinkEventArgs args)
|
||||
{
|
||||
@@ -782,51 +782,51 @@ namespace VEPROMS
|
||||
break;
|
||||
case ParsedLinkType.Transition:
|
||||
case ParsedLinkType.TransitionRange:
|
||||
OpenItem(args.MyTransition.MyItemToID);
|
||||
tc.OpenItem(args.MyTransition.MyItemToID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private DisplayPanel GetPanelFromPage(TabPage tp)
|
||||
{
|
||||
return (DisplayPanel)tp.Controls["vlnCSLAPanel1"];
|
||||
}
|
||||
//private DisplayPanel GetPanelFromPage(TabPage tp)
|
||||
//{
|
||||
// return (DisplayPanel)tp.Controls["vlnCSLAPanel1"];
|
||||
//}
|
||||
|
||||
private DisplayPanel AddProcedureTab(ItemInfo pi)
|
||||
{
|
||||
if (tc.TabPages.ContainsKey(pi.MyContent.Number))
|
||||
{
|
||||
tc.SelectTab(pi.MyContent.Number);
|
||||
return GetPanelFromPage(tc.SelectedTab);
|
||||
}
|
||||
else
|
||||
{
|
||||
TabPage pg = new TabPage(pi.MyContent.Number);
|
||||
pg.Name = pi.MyContent.Number;
|
||||
tc.TabPages.Add(pg);
|
||||
tc.SelectedTab = pg;
|
||||
DisplayPanel vlnCSLAPanel1 = new Volian.Controls.Library.DisplayPanel(this.components);
|
||||
pg.Controls.Add(vlnCSLAPanel1);
|
||||
//
|
||||
// vlnCSLAPanel1
|
||||
//
|
||||
vlnCSLAPanel1.ActiveColor = System.Drawing.Color.SkyBlue;
|
||||
vlnCSLAPanel1.AutoScroll = true;
|
||||
vlnCSLAPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
vlnCSLAPanel1.InactiveColor = System.Drawing.Color.Linen;
|
||||
vlnCSLAPanel1.Name = "vlnCSLAPanel1";
|
||||
vlnCSLAPanel1.PanelColor = System.Drawing.Color.LightGray;
|
||||
vlnCSLAPanel1.ProcFont = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
|
||||
vlnCSLAPanel1.SectFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
|
||||
vlnCSLAPanel1.StepFont = new System.Drawing.Font("Arial", 10F);
|
||||
vlnCSLAPanel1.TabColor = System.Drawing.Color.Beige;
|
||||
SetupEditorColors(vlnCSLAPanel1,pg); // check for overridden color values
|
||||
vlnCSLAPanel1.TabIndex = 9;
|
||||
vlnCSLAPanel1.LinkClicked += new Volian.Controls.Library.DisplayPanelLinkEvent(this.vlnCSLAPanel1_LinkClicked);
|
||||
vlnCSLAPanel1.MyItem = pi;
|
||||
return vlnCSLAPanel1;
|
||||
}
|
||||
}
|
||||
//private DisplayPanel AddProcedureTab(ItemInfo pi)
|
||||
//{
|
||||
// if (tc.TabPages.ContainsKey(pi.MyContent.Number))
|
||||
// {
|
||||
// tc.SelectTab(pi.MyContent.Number);
|
||||
// return GetPanelFromPage(tc.SelectedTab);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// TabPage pg = new TabPage(pi.MyContent.Number);
|
||||
// pg.Name = pi.MyContent.Number;
|
||||
// tc.TabPages.Add(pg);
|
||||
// tc.SelectedTab = pg;
|
||||
// DisplayPanel vlnCSLAPanel1 = new Volian.Controls.Library.DisplayPanel(this.components);
|
||||
// pg.Controls.Add(vlnCSLAPanel1);
|
||||
// //
|
||||
// // vlnCSLAPanel1
|
||||
// //
|
||||
// vlnCSLAPanel1.ActiveColor = System.Drawing.Color.SkyBlue;
|
||||
// vlnCSLAPanel1.AutoScroll = true;
|
||||
// vlnCSLAPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
// vlnCSLAPanel1.InactiveColor = System.Drawing.Color.Linen;
|
||||
// vlnCSLAPanel1.Name = "vlnCSLAPanel1";
|
||||
// vlnCSLAPanel1.PanelColor = System.Drawing.Color.LightGray;
|
||||
// vlnCSLAPanel1.ProcFont = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
|
||||
// vlnCSLAPanel1.SectFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
|
||||
// vlnCSLAPanel1.StepFont = new System.Drawing.Font("Arial", 10F);
|
||||
// vlnCSLAPanel1.TabColor = System.Drawing.Color.Beige;
|
||||
// SetupEditorColors(vlnCSLAPanel1,pg); // check for overridden color values
|
||||
// vlnCSLAPanel1.TabIndex = 9;
|
||||
// vlnCSLAPanel1.LinkClicked += new Volian.Controls.Library.DisplayPanelLinkEvent(this.vlnCSLAPanel1_LinkClicked);
|
||||
// vlnCSLAPanel1.MyItem = pi;
|
||||
// return vlnCSLAPanel1;
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region Font
|
||||
|
Reference in New Issue
Block a user