diff --git a/PROMS/Volian.Controls.Library/DisplayItem.cs b/PROMS/Volian.Controls.Library/DisplayItem.cs index 7b1b9943..2b80f67b 100644 --- a/PROMS/Volian.Controls.Library/DisplayItem.cs +++ b/PROMS/Volian.Controls.Library/DisplayItem.cs @@ -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.ToLower()); tabString = tabString.Replace("", 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; diff --git a/PROMS/Volian.Controls.Library/DisplayItem.designer.cs b/PROMS/Volian.Controls.Library/DisplayItem.designer.cs index 172a8506..1901a79a 100644 --- a/PROMS/Volian.Controls.Library/DisplayItem.designer.cs +++ b/PROMS/Volian.Controls.Library/DisplayItem.designer.cs @@ -101,8 +101,8 @@ namespace Volian.Controls.Library this.Name = "DisplayItem"; this.Size = new System.Drawing.Size(314, 20); this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lblTab_MouseDown); - this.Move += new System.EventHandler(this.vlnCSLARTB_Move); - this.Resize += new System.EventHandler(this.vlnCSLARTB_Resize); + this.Move += new System.EventHandler(this.DisplayItem_Move); + this.Resize += new System.EventHandler(this.DisplayItem_Resize); this.ResumeLayout(false); } diff --git a/PROMS/Volian.Controls.Library/DisplayPanel.cs b/PROMS/Volian.Controls.Library/DisplayPanel.cs index 6dc272c0..9f5ad72d 100644 --- a/PROMS/Volian.Controls.Library/DisplayPanel.cs +++ b/PROMS/Volian.Controls.Library/DisplayPanel.cs @@ -100,7 +100,7 @@ namespace Volian.Controls.Library InactiveColor = PanelColor = BackColor; foreach (Control ctrl in Controls) { - if (ctrl.GetType().Name == "vlnCSLARTB") + if (ctrl.GetType().Name == "DisplayItem") { DisplayItem rtb = (DisplayItem)ctrl; rtb.BackColor = BackColor; @@ -116,21 +116,21 @@ namespace Volian.Controls.Library get { return _MyItem; } set { - //// TIMING: vlnCSLARTB.TimeIt("pMyItem Start"); + //// TIMING: DisplayItem.TimeIt("pMyItem Start"); _MyItem = value; if(value != null) _Layout = _MyItem.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData; - //// TIMING: vlnCSLARTB.TimeIt("pMyItem Layout"); + //// TIMING: DisplayItem.TimeIt("pMyItem Layout"); //this.Layout += new LayoutEventHandler(DisplayPanel_Layout); //this.Scroll += new ScrollEventHandler(DisplayPanel_Scroll); - //// TIMING: vlnCSLARTB.TimeIt("pMyItem Scroll"); + //// TIMING: DisplayItem.TimeIt("pMyItem Scroll"); Controls.Clear(); ItemLookup = new Dictionary(); - //// TIMING: vlnCSLARTB.TimeIt("pMyItem Clear"); + //// TIMING: DisplayItem.TimeIt("pMyItem Clear"); //SuspendLayout(); DisplayItem vlnRTF = new DisplayItem(_MyItem, this, null, ChildRelation.None, false); //ResumeLayout(); - //// TIMING: vlnCSLARTB.TimeIt("pMyItem End"); + //// TIMING: DisplayItem.TimeIt("pMyItem End"); } } internal Dictionary _ItemLookup; @@ -349,7 +349,7 @@ namespace Volian.Controls.Library // Walk through the controls and find the next control for each if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("'Item','Next'"); foreach (Control control in Controls) - if (control.GetType().Name == "vlnCSLARTB") + if (control.GetType().Name == "DisplayItem") { DisplayItem rtb = (DisplayItem)control; DisplayItem nxt = rtb.NextItem; @@ -516,11 +516,11 @@ namespace Volian.Controls.Library } public partial class DisplayPanelEventArgs { - private DisplayItem _MyVlnCSLARTB; // Volian Property Snippet - public DisplayItem MyVlnCSLARTB + private DisplayItem _MyDisplayItem; // Volian Property Snippet + public DisplayItem MyDisplayItem { - get { return _MyVlnCSLARTB; } - set { _MyVlnCSLARTB = value; } + get { return _MyDisplayItem; } + set { _MyDisplayItem = value; } } private MouseEventArgs _MyMouseEventArgs; // Volian Property Snippet public MouseEventArgs MyMouseEventArgs @@ -529,9 +529,9 @@ namespace Volian.Controls.Library set { _MyMouseEventArgs = value; } } - public DisplayPanelEventArgs(DisplayItem myVlnCSLARTB, MouseEventArgs myMouseEventArgs) + public DisplayPanelEventArgs(DisplayItem myDisplayItem, MouseEventArgs myMouseEventArgs) { - _MyVlnCSLARTB = myVlnCSLARTB; + _MyDisplayItem = myDisplayItem; _MyMouseEventArgs = myMouseEventArgs; } }