/[RomCheater]/trunk/Win32/libWin32/Win32/UI/FloatBox.cs
ViewVC logotype

Annotation of /trunk/Win32/libWin32/Win32/UI/FloatBox.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 906 - (hide annotations) (download)
Wed Sep 17 13:07:57 2014 UTC (5 years, 5 months ago) by william
File size: 1361 byte(s)
+ fix input keys for some numeric input controls

1 william 88 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 william 220 public partial class FloatBox : NumericBoxBase
13 william 88 {
14     public FloatBox()
15 william 223 : base()
16 william 88 {
17     InitializeComponent();
18 william 225 this.Value = (0).ToString();
19 william 88 this.ReadOnly = false;
20     }
21    
22 william 225 //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 william 226 protected override void CreateValidKeys(List<Keys> ValidKeys)
33     {
34     base.CreateStandardKeys(ValidKeys);
35     ValidKeys.Add(Keys.Decimal);
36 william 904 ValidKeys.Add(Keys.OemMinus);
37 william 226 ValidKeys.Add(Keys.OemPeriod);
38 william 906 ValidKeys.Add(Keys.Subtract);
39 william 226 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.D0 && x <= Keys.D9));
40     ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.NumPad0 && x <= Keys.NumPad9));
41     }
42 william 88 }
43     }

  ViewVC Help
Powered by ViewVC 1.1.22