From ecee91bc559e1c0d716a3032e371218812df61e7 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Fri, 24 Jun 2016 16:44:42 -0400 Subject: Loads of changes... Custom shifter options using Lua, and other stuff. --- source/WindowsFormsApplication1/ProgressBarEX.cs | 35 +++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'source/WindowsFormsApplication1/ProgressBarEX.cs') diff --git a/source/WindowsFormsApplication1/ProgressBarEX.cs b/source/WindowsFormsApplication1/ProgressBarEX.cs index e474a87..0e64aad 100644 --- a/source/WindowsFormsApplication1/ProgressBarEX.cs +++ b/source/WindowsFormsApplication1/ProgressBarEX.cs @@ -17,7 +17,37 @@ namespace ShiftOS InitializeComponent(); } -#region " Properties " + #region " Properties " + + private string _label = "Progress:"; + private bool show_label = false; + + public string Label + { + get + { + return _label; + } + set + { + _label = value; + this.Invalidate(); + } + } + + public bool ShowLabel + { + get + { + return show_label; + } + set + { + show_label = value; + this.Invalidate(); + } + } + private int _Value = 0; public int Value @@ -295,6 +325,9 @@ namespace ShiftOS private void DoPaintValue(Graphics g) { string valStr = GetRelativeValue().ToString() + "%"; + if (show_label) + valStr = _label + " " + valStr; + StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Center; SizeF s = g.MeasureString(valStr, this.Font); -- cgit v1.2.3