This commit is contained in:
Kathy Ruffing 2011-01-05 12:04:22 +00:00
parent 0096b94fe8
commit 894f295c26

View File

@ -28,6 +28,11 @@ namespace Volian.Controls.Library
Showing = 8, Showing = 8,
Done = 16 Done = 16
} }
public enum E_ChangeBarPosition : int
{
Left = 0,
Right = 1
}
#endregion #endregion
public partial class StepItem : UserControl public partial class StepItem : UserControl
{ {
@ -117,6 +122,7 @@ namespace Volian.Controls.Library
private bool _Circle = false; private bool _Circle = false;
private bool _CheckOff = false; private bool _CheckOff = false;
private bool _ChangeBar = false; private bool _ChangeBar = false;
#endregion #endregion
#region Properties #region Properties
/// <summary> /// <summary>
@ -390,7 +396,7 @@ namespace Volian.Controls.Library
get { return Width - lblTab.Left; } get { return Width - lblTab.Left; }
set set
{ {
Width = RTBMargin + value + lblTab.Left; Width = RTBMargin + value + lblTab.Left +3; // +3 to allow for change bar position
} }
} }
/// <summary> /// <summary>
@ -440,7 +446,7 @@ namespace Volian.Controls.Library
lblTab.Width = tabString.Length * 8 * MyStepPanel.DPI / 96;// Adjust width for DPI lblTab.Width = tabString.Length * 8 * MyStepPanel.DPI / 96;// Adjust width for DPI
Invalidate(); Invalidate();
_MyStepRTB.Left = lblTab.Left + lblTab.Width;// +2; _MyStepRTB.Left = lblTab.Left + lblTab.Width;// +2;
_MyStepRTB.Width = Width - _MyStepRTB.Left - RTBMargin; _MyStepRTB.Width = Width - _MyStepRTB.Left - RTBMargin - 3; // adjust for Change Bar Position
_TabFormat = value; // tabString; _TabFormat = value; // tabString;
} }
} }
@ -457,6 +463,13 @@ namespace Volian.Controls.Library
return count; return count;
} }
} }
// hardcode to right for HLP. The change bar location from the format will need to be used to set this.
private E_ChangeBarPosition _ChangeBarPosition = E_ChangeBarPosition.Right;
public E_ChangeBarPosition ChangeBarPosition
{
get { return _ChangeBarPosition; }
set { _ChangeBarPosition = value; }
}
/// <summary> /// <summary>
/// Sets the previous item and adjusts locations /// Sets the previous item and adjusts locations
/// </summary> /// </summary>
@ -1956,7 +1969,12 @@ namespace Volian.Controls.Library
if (ChangeBar) if (ChangeBar)
{ {
Pen penCB = new Pen(_MyStepPanel.MyStepPanelSettings.ChangeBarColor, _MyStepPanel.MyStepPanelSettings.ChangeBarWeight); Pen penCB = new Pen(_MyStepPanel.MyStepPanelSettings.ChangeBarColor, _MyStepPanel.MyStepPanelSettings.ChangeBarWeight);
g.DrawLine(penCB, 0, _MyStepRTB.Top, 0, Height); if (ChangeBarPosition == E_ChangeBarPosition.Left)
g.DrawLine(penCB, 0, _MyStepRTB.Top, 0, Height); // left, top, right, bottom.
else
{
g.DrawLine(penCB, Width-2, _MyStepRTB.Top, Width-2, Height);
}
} }
} }
/// <summary> /// <summary>