ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/Win32/libWin32/Win32/UI/NumericBox.cs
Revision: 226
Committed: Sat Jun 2 14:54:17 2012 UTC (10 years, 9 months ago) by william
File size: 1020 byte(s)
Log Message:
+ commit final wip for numeric datatype converter

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 NumericBox : NumericBoxBase
13 {
14 public NumericBox() :base()
15 {
16 InitializeComponent();
17 }
18
19 //new public string Value
20 //{
21 // get { return base.Value; }
22 // set { base.Value = value; }
23 //}
24 protected override void CreateValidKeys(List<Keys> ValidKeys)
25 {
26 base.CreateStandardKeys(ValidKeys);
27 ValidKeys.Add(Keys.Decimal);
28 ValidKeys.Add(Keys.OemPeriod);
29 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.D0 && x <= Keys.D9));
30 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.NumPad0 && x <= Keys.NumPad9));
31 }
32 }
33 }
34