ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/Win32/libWin32/Win32/UI/FloatBox.cs
Revision: 904
Committed: Wed Sep 17 13:01:31 2014 UTC (8 years, 8 months ago) by william
File size: 1318 byte(s)
Log Message:
+ fix other issues with resizing numeric inputs

File Contents

# Content
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9
10 namespace System.Windows.Forms
11 {
12 public partial class FloatBox : NumericBoxBase
13 {
14 public FloatBox()
15 : base()
16 {
17 InitializeComponent();
18 this.Value = (0).ToString();
19 this.ReadOnly = false;
20 }
21
22 //new public string Value
23 //{
24 // get { return base.Value; }
25 // set { base.Value = value.ToString(); }
26 //}
27 ////public override string Text
28 ////{
29 //// get { return base.Text; }
30 //// set { base.Text = value; }
31 ////}
32 protected override void CreateValidKeys(List<Keys> ValidKeys)
33 {
34 base.CreateStandardKeys(ValidKeys);
35 ValidKeys.Add(Keys.Decimal);
36 ValidKeys.Add(Keys.OemMinus);
37 ValidKeys.Add(Keys.OemPeriod);
38 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.D0 && x <= Keys.D9));
39 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.NumPad0 && x <= Keys.NumPad9));
40 }
41 }
42 }