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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 william 221 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 william 223 namespace System.Windows.Forms
11 william 221 {
12     public partial class NumericBox : NumericBoxBase
13     {
14 william 223 public NumericBox() :base()
15 william 221 {
16     InitializeComponent();
17     }
18    
19 william 225 //new public string Value
20     //{
21     // get { return base.Value; }
22     // set { base.Value = value; }
23     //}
24 william 226 protected override void CreateValidKeys(List<Keys> ValidKeys)
25     {
26     base.CreateStandardKeys(ValidKeys);
27     ValidKeys.Add(Keys.Decimal);
28     ValidKeys.Add(Keys.OemPeriod);
29 william 906 ValidKeys.Add(Keys.OemMinus);
30     ValidKeys.Add(Keys.Subtract);
31 william 226 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.D0 && x <= Keys.D9));
32     ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.NumPad0 && x <= Keys.NumPad9));
33     }
34 william 221 }
35     }
36    

  ViewVC Help
Powered by ViewVC 1.1.22