15 |
|
public NumericBoxBase() |
16 |
|
{ |
17 |
|
InitializeComponent(); |
18 |
< |
this.Value = 0; |
18 |
> |
this.Value = (0).ToString(); |
19 |
|
this.ReadOnly = false; |
20 |
|
} |
21 |
|
|
22 |
< |
private ValueType _Value; |
22 |
> |
private string _Value; |
23 |
|
[Browsable(true)] |
24 |
< |
public ValueType Value |
24 |
> |
public string Value |
25 |
|
{ |
26 |
|
get { return _Value; } |
27 |
< |
set { _Value = value; this.Text = value.ToString(); } |
27 |
> |
set { _Value = value; this.Text = value; } |
28 |
|
} |
29 |
|
|
30 |
|
private bool _ReadOnly; |
83 |
|
e.SuppressKeyPress = true; |
84 |
|
} |
85 |
|
} |
86 |
+ |
|
87 |
+ |
private void txtValueBox_TextChanged(object sender, EventArgs e) |
88 |
+ |
{ |
89 |
+ |
this.Value = this.Text; |
90 |
+ |
} |
91 |
|
} |
92 |
|
|
93 |
|
#region NumericBox Extensions |