This commit is contained in:
@@ -228,20 +228,20 @@ namespace Volian.Controls.Library
|
||||
switch (_Type / 10000)
|
||||
{
|
||||
case 0: // Procedure
|
||||
//// TIMING: vlnCSLARTB.TimeIt("TabFormat Start");
|
||||
//// TIMING: DisplayItem.TimeIt("TabFormat Start");
|
||||
tabString = _MyItem.MyContent.Number.PadRight(20);
|
||||
//// TIMING: vlnCSLARTB.TimeIt("TabFormat End");
|
||||
//// TIMING: DisplayItem.TimeIt("TabFormat End");
|
||||
break;
|
||||
case 1: // Section
|
||||
//// TIMING: vlnCSLARTB.TimeIt("TabFormat Start");
|
||||
//// TIMING: DisplayItem.TimeIt("TabFormat Start");
|
||||
tabString = _MyItem.MyContent.Number.PadRight(20);
|
||||
//// TIMING: vlnCSLARTB.TimeIt("TabFormat End");
|
||||
//// TIMING: DisplayItem.TimeIt("TabFormat End");
|
||||
break;
|
||||
case 2: // Step
|
||||
//// TIMING: vlnCSLARTB.TimeIt("TabFormat Start");
|
||||
//// TIMING: DisplayItem.TimeIt("TabFormat Start");
|
||||
//int ordinal = _MyItem.Ordinal;
|
||||
int ordinal = Ordinal;
|
||||
//// TIMING: vlnCSLARTB.TimeIt("TabFormat End");
|
||||
//// TIMING: DisplayItem.TimeIt("TabFormat End");
|
||||
string alpha = AlphabeticalNumbering.Convert(ordinal);
|
||||
tabString = tabString.Replace("<alpha>", alpha.ToLower());
|
||||
tabString = tabString.Replace("<ALPHA>", alpha);
|
||||
@@ -420,17 +420,17 @@ namespace Volian.Controls.Library
|
||||
#region Constructors
|
||||
public DisplayItem(ItemInfo item, DisplayPanel panel, DisplayItem parent, ChildRelation relationType, bool expand)
|
||||
{
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB Top");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB Top");
|
||||
InitializeComponent();// TODO: Performance 25%
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB InitComp");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB InitComp");
|
||||
BackColor = panel.PanelColor;
|
||||
_DisplayRTB.BackColor = panel.InactiveColor;
|
||||
// TODO: Adjust top based upon format
|
||||
// TODO: Remove Label and just output ident on the paint event
|
||||
lblTab.Top = 3;
|
||||
_DisplayRTB.Top = 3;
|
||||
this.Paint += new PaintEventHandler(vlnCSLARTB_Paint);
|
||||
this.BackColorChanged += new EventHandler(vlnCSLARTB_BackColorChanged);
|
||||
this.Paint += new PaintEventHandler(DisplayItem_Paint);
|
||||
this.BackColorChanged += new EventHandler(DisplayItem_BackColorChanged);
|
||||
//_DisplayRTB.Enter += new EventHandler(_DisplayRTB_Enter);
|
||||
//_DisplayRTB.Leave += new EventHandler(_DisplayRTB_Leave);
|
||||
//_DisplayRTB.GotFocus += new EventHandler(_DisplayRTB_GotFocus);
|
||||
@@ -465,15 +465,15 @@ namespace Volian.Controls.Library
|
||||
if(parent != null)RNOLevel = parent.RNOLevel;
|
||||
if (item != null)
|
||||
{
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB before _Layout");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB before _Layout");
|
||||
_Layout = item.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData;
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB _Layout");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB _Layout");
|
||||
if (parent != null)
|
||||
SeqLevel = parent.SeqLevel + ((relationType == ChildRelation.After || relationType == ChildRelation.Before) && TemporaryFormat.IsSequential(item) ? 1 : 0);
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB seqLevel");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB seqLevel");
|
||||
MyItem = item;
|
||||
}
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB MyItem");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB MyItem");
|
||||
switch (relationType)
|
||||
{
|
||||
case ChildRelation.After:
|
||||
@@ -499,9 +499,9 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB Parent");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB Parent");
|
||||
SetText();
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB SetText");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB SetText");
|
||||
if (item != null)
|
||||
{
|
||||
Name = string.Format("Item-{0}", item.ItemID);
|
||||
@@ -528,10 +528,10 @@ namespace Volian.Controls.Library
|
||||
else // otherwise only expand one level
|
||||
Expand(false);
|
||||
}
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB before Controls Add");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB before Controls Add");
|
||||
panel.Controls.Add(this);
|
||||
_Loading = false;
|
||||
//// TIMING: vlnCSLARTB.TimeIt("CSLARTB Controls Add");
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB Controls Add");
|
||||
}
|
||||
|
||||
//void DisplayItem_Move(object sender, EventArgs e)
|
||||
@@ -613,7 +613,7 @@ namespace Volian.Controls.Library
|
||||
if(scrollValue >= _Panel.VerticalScroll.Minimum && scrollValue <= _Panel.VerticalScroll.Maximum) // If it is within range
|
||||
_Panel.VerticalScroll.Value = scrollValue; // Center the item
|
||||
}
|
||||
private void vlnCSLARTB_Paint(object sender, PaintEventArgs e)
|
||||
private void DisplayItem_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
Graphics g = e.Graphics;
|
||||
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
@@ -635,7 +635,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
|
||||
void vlnCSLARTB_BackColorChanged(object sender, EventArgs e)
|
||||
void DisplayItem_BackColorChanged(object sender, EventArgs e)
|
||||
{
|
||||
_DisplayRTB.BackColor = BackColor;
|
||||
}
|
||||
@@ -790,7 +790,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
public void Expand(bool expand)
|
||||
{
|
||||
//// TIMING: vlnCSLARTB.TimeIt("Expand Start");
|
||||
//// TIMING: DisplayItem.TimeIt("Expand Start");
|
||||
if (_ChildrenLoaded)
|
||||
{
|
||||
// Unhide Children
|
||||
@@ -826,7 +826,7 @@ namespace Volian.Controls.Library
|
||||
Expanding = ExpandingStatus.Done;
|
||||
BottomMost.AdjustLocation();
|
||||
Expanding = ExpandingStatus.No;
|
||||
//// TIMING: vlnCSLARTB.TimeIt("Expand End");
|
||||
//// TIMING: DisplayItem.TimeIt("Expand End");
|
||||
}
|
||||
private void vlnExp_BeforeExpand(object sender, vlnExpanderEventArgs args)
|
||||
{
|
||||
@@ -915,12 +915,12 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
get { return (IDisplayRTB)_DisplayRTB; }
|
||||
}
|
||||
private void vlnCSLARTB_Resize(object sender, EventArgs e)
|
||||
private void DisplayItem_Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (_MyItem == null) return;
|
||||
AdjustLocation();
|
||||
}
|
||||
private void vlnCSLARTB_Move(object sender, EventArgs e)
|
||||
private void DisplayItem_Move(object sender, EventArgs e)
|
||||
{
|
||||
if (_Panel.Scrolling == 0) return;
|
||||
if (_MyItem == null) return;
|
||||
|
Reference in New Issue
Block a user