示例#1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.m_textBox != null)
         {
             this.m_textBox.Dispose();
         }
         if (this.m_plusButton != null)
         {
             this.m_plusButton.Dispose();
         }
         if (this.m_minusButton != null)
         {
             this.m_minusButton.Dispose();
         }
     }
     this.m_textBox     = null;
     this.m_plusButton  = null;
     this.m_minusButton = null;
     base.Dispose(disposing);
 }
示例#2
0
 public NumericUpDown()
 {
     this.m_gradientColors.PropertyChanged += new EventHandler(this.OnGradientColorPropertyChanged);
     this.m_textBox = new TextBox();
     this.m_textBox.BorderStyle = BorderStyle.None;
     this.m_textBox.Text = "0";
     this.m_textBox.KeyDown += new KeyEventHandler(this.OnTextBoxKeyDown);
     this.m_textBox.KeyPress += new KeyPressEventHandler(this.OnTextBoxKeyPress);
     this.m_textBox.KeyUp += new KeyEventHandler(this.OnTextBoxKeyUp);
     this.m_textBox.GotFocus += new EventHandler(this.OnTextBoxGotFocus);
     this.m_textBox.LostFocus += new EventHandler(this.OnTextBoxLostFocus);
     this.m_textBox.Disposed += new EventHandler(this.OnTextBoxDisposed);
     this.m_textBox.Multiline = true;
     this.m_textBox.TextAlign = this.m_textAlign;
     this.m_textBox.Visible = false;
     Imports.SetInputMode(this.m_textBox, Imports.InputMode.Numbers);
     this.m_plusButton = new SpinButton();
     this.m_plusButton.TabStop = false;
     this.m_plusButton.DefaultAdornmentType = AdornmentType.UpArrow;
     this.m_plusButton.AdornmentType = AdornmentType.UpArrow;
     this.m_plusButton.BorderStyle = RescoBorderStyle.Left;
     this.m_plusButton.SpinChanged += new SpinChangedEventHandler(this.OnPlusButtonSpinChanged);
     this.m_minusButton = new SpinButton();
     this.m_minusButton.TabStop = false;
     this.m_minusButton.DefaultAdornmentType = AdornmentType.DownArrow;
     this.m_minusButton.AdornmentType = AdornmentType.DownArrow;
     this.m_minusButton.BorderStyle = RescoBorderStyle.Left;
     this.m_minusButton.SpinChanged += new SpinChangedEventHandler(this.OnMinusButtonSpinChanged);
     base.Controls.Add(this.m_plusButton);
     base.Controls.Add(this.m_minusButton);
     base.Controls.Add(this.m_textBox);
     base.BorderStyle=(BorderStyle.FixedSingle);
     base.BackColor = SystemColors.Window;
     base.Size = new Size(100, 0x16);
     this.Refresh();
 }
示例#3
0
 public NumericUpDown()
 {
     this.m_gradientColors.PropertyChanged += new EventHandler(this.OnGradientColorPropertyChanged);
     this.m_textBox             = new TextBox();
     this.m_textBox.BorderStyle = BorderStyle.None;
     this.m_textBox.Text        = "0";
     this.m_textBox.KeyDown    += new KeyEventHandler(this.OnTextBoxKeyDown);
     this.m_textBox.KeyPress   += new KeyPressEventHandler(this.OnTextBoxKeyPress);
     this.m_textBox.KeyUp      += new KeyEventHandler(this.OnTextBoxKeyUp);
     this.m_textBox.GotFocus   += new EventHandler(this.OnTextBoxGotFocus);
     this.m_textBox.LostFocus  += new EventHandler(this.OnTextBoxLostFocus);
     this.m_textBox.Disposed   += new EventHandler(this.OnTextBoxDisposed);
     this.m_textBox.Multiline   = true;
     this.m_textBox.TextAlign   = this.m_textAlign;
     this.m_textBox.Visible     = false;
     Imports.SetInputMode(this.m_textBox, Imports.InputMode.Numbers);
     this.m_plusButton         = new SpinButton();
     this.m_plusButton.TabStop = false;
     this.m_plusButton.DefaultAdornmentType = AdornmentType.UpArrow;
     this.m_plusButton.AdornmentType        = AdornmentType.UpArrow;
     this.m_plusButton.BorderStyle          = RescoBorderStyle.Left;
     this.m_plusButton.SpinChanged         += new SpinChangedEventHandler(this.OnPlusButtonSpinChanged);
     this.m_minusButton         = new SpinButton();
     this.m_minusButton.TabStop = false;
     this.m_minusButton.DefaultAdornmentType = AdornmentType.DownArrow;
     this.m_minusButton.AdornmentType        = AdornmentType.DownArrow;
     this.m_minusButton.BorderStyle          = RescoBorderStyle.Left;
     this.m_minusButton.SpinChanged         += new SpinChangedEventHandler(this.OnMinusButtonSpinChanged);
     base.Controls.Add(this.m_plusButton);
     base.Controls.Add(this.m_minusButton);
     base.Controls.Add(this.m_textBox);
     base.BorderStyle = (BorderStyle.FixedSingle);
     base.BackColor   = SystemColors.Window;
     base.Size        = new Size(100, 0x16);
     this.Refresh();
 }
示例#4
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.m_textBox != null)
         {
             this.m_textBox.Dispose();
         }
         if (this.m_plusButton != null)
         {
             this.m_plusButton.Dispose();
         }
         if (this.m_minusButton != null)
         {
             this.m_minusButton.Dispose();
         }
     }
     this.m_textBox = null;
     this.m_plusButton = null;
     this.m_minusButton = null;
     base.Dispose(disposing);
 }