| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- //
- // System.Windows.Forms.ProgressBar
- //
- // Author:
- // stubbed out by Jaak Simm ([email protected])
- // Remco de Jong ([email protected])
- //
- // (C) Ximian, Inc., 2002
- //
- using System.Drawing;
- using System.Drawing.Printing;
- using System.ComponentModel;
- namespace System.Windows.Forms {
- /// <summary>
- /// Represents a Windows progress bar control.
- ///
- /// </summary>
- [MonoTODO]
- public sealed class ProgressBar : Control {
- #region Fields
- private int maximum;
- private int minimum;
- private int step;
- private int val;
- #endregion
- #region Constructor
- [MonoTODO]
- public ProgressBar()
- {
- maximum=100;
- minimum=0;
- step=10;
- val=0;
- }
- #endregion
- internal override Gtk.Widget CreateWidget () {
- Gtk.ProgressBar pbar = new Gtk.ProgressBar ();
- return pbar;
- }
-
- /* #region Properties
- [MonoTODO]
- public override bool AllowDrop {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public override Color BackColor {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public override Color ForeColor {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- [MonoTODO]
- public override Image BackgroundImage {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- */
- /// This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
- /// public new bool CausesValidation {get; set;}
-
- /* [MonoTODO]
- protected override CreateParams CreateParams {
- get { throw new NotImplementedException (); }
- }
- [MonoTODO]
- protected override ImeMode DefaultImeMode {
- get { throw new NotImplementedException (); }
- }
- [MonoTODO]
- protected override Size DefaultSize {
- get { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public override Font Font {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- */
-
- /// This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
- /// public new ImeMode ImeMode {get; set;}
-
- public int Maximum {
- get {
- return maximum;
- }
- set {
- maximum=value;
- }
- }
-
- public int Minimum {
- get {
- return minimum;
- }
- set {
- minimum=value;
- }
- }
-
- /// This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
- /// public new bool TabStop {get; set;}
- /* [MonoTODO]
- public override RightToLeft RightToLeft {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- */
- public int Step {
- get {
- return step;
- }
- set {
- step=value;
- }
- }
-
- protected override void OnTextChanged(EventArgs e)
- {
- ((Gtk.ProgressBar)Widget).Text = Text;
- }
-
- public int Value {
- get {
- return val;
- }
- set {
- if (val <= maximum) {
- val=value;
- float fraction = ((float) val / (float) maximum);
- ((Gtk.ProgressBar)Widget).Fraction = fraction;
- }
- }
- }
- // #endregion
-
-
-
-
- /* #region Methods
- [MonoTODO]
- protected override void CreateHandle()
- {
- throw new NotImplementedException ();
- }
- */
- [MonoTODO]
- public void Increment(int value)
- {
- Value += value;
- }
-
- /* [MonoTODO]
- protected override void OnHandleCreated(EventArgs e)
- {
- throw new NotImplementedException ();
- }
- */
- [MonoTODO]
- public void PerformStep()
- {
- Value += step;
- }
-
- [MonoTODO]
- public override string ToString()
- {
- throw new NotImplementedException ();
- }
- // #endregion
-
-
-
-
- #region Events
- /*
- * This member supports the .NET Framework infrastructure and is not intended to be used directly from your code:
- public new event EventHandler DoubleClick;
- public new event EventHandler Enter;
- public new event KeyEventHandler KeyDown;
- public new event KeyPressEventHandler KeyPress;
- public new event KeyEventHandler KeyUp;
- public new event EventHandler Leave;
- public new event PaintEventHandler Paint;
- */
- #endregion
- }
- }
|