/[OhmsLawCalc]/trunk/OhmsLawCalc/UI/FloatBox.cs
ViewVC logotype

Contents of /trunk/OhmsLawCalc/UI/FloatBox.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18 - (show annotations) (download)
Wed Jan 29 06:09:45 2014 UTC (6 years, 6 months ago) by william
File size: 1275 byte(s)

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.OemPeriod);
37 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.D0 && x <= Keys.D9));
38 ValidKeys.AddRange(Enum.GetValues(typeof(Keys)).Cast<Keys>().Where(x => x >= Keys.NumPad0 && x <= Keys.NumPad9));
39 }
40 }
41 }

  ViewVC Help
Powered by ViewVC 1.1.22