Exemplo n.º 1
0
 public DoubleInputBox()
     : base()
 {
     this.SetStyle(ControlStyles.FixedHeight, false);
     this.UpdateStyles();
     //
     this.m_UpButtonItem = new UpButtonItem();
     ((ISetOwnerHelper)this.m_UpButtonItem).SetOwner(this);
     this.m_DownButtonItem = new DownButtonItem();
     ((ISetOwnerHelper)this.m_DownButtonItem).SetOwner(this);
     //
     this.m_InputRegion              = new DoubleInputRegion(this);
     this.m_InputRegion.PopupClosed += new EventHandler(InputRegion_PopupClosed);
     //
     if (this.Text == null || this.Text.Length <= 0)
     {
         if (this.Minimum > 0)
         {
             this.Text = this.Minimum.ToString();
         }
         else
         {
             this.Text = "0";
         }
     }
 }
Exemplo n.º 2
0
 public DoubleInputBoxItem()
     : base()
 {
     this.m_UpButtonItem = new UpButtonItem();
     ((ISetOwnerHelper)this.m_UpButtonItem).SetOwner(this);
     this.m_DownButtonItem = new DownButtonItem();
     ((ISetOwnerHelper)this.m_DownButtonItem).SetOwner(this);
     //
     this.m_InputRegion              = new DoubleInputRegion(this);
     this.m_InputRegion.PopupClosed += new EventHandler(InputRegion_PopupClosed);
     //
     if (this.Text == null || this.Text.Length <= 0)
     {
         if (this.Minimum > 0)
         {
             this.Text = this.Minimum.ToString();
         }
         else
         {
             this.Text = "0";
         }
     }
     //
     //
     //
     this.Size = new Size(120, 21);
 }