diff options
| author | MichaelTheShifter <[email protected]> | 2016-06-24 16:44:42 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-06-24 16:44:51 -0400 |
| commit | ecee91bc559e1c0d716a3032e371218812df61e7 (patch) | |
| tree | 49acdb538b13bc3da89185413bc4096d4e6d81f7 /source/WindowsFormsApplication1/ProgressBarEX.cs | |
| parent | 8ea0903788b02b352cc25c9b6f46d439bdb1356a (diff) | |
| download | shiftos-c--ecee91bc559e1c0d716a3032e371218812df61e7.tar.gz shiftos-c--ecee91bc559e1c0d716a3032e371218812df61e7.tar.bz2 shiftos-c--ecee91bc559e1c0d716a3032e371218812df61e7.zip | |
Loads of changes...
Custom shifter options using Lua, and other stuff.
Diffstat (limited to 'source/WindowsFormsApplication1/ProgressBarEX.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/ProgressBarEX.cs | 35 |
1 files changed, 34 insertions, 1 deletions
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); |
