9 |
|
|
10 |
|
namespace System.Windows.Forms |
11 |
|
{ |
12 |
+ |
|
13 |
|
[DefaultEvent("ValueChanged")] |
14 |
|
public partial class MaskedHexBox : UserControl |
15 |
|
{ |
16 |
+ |
const int ReferenceWidthPixels = 114; |
17 |
+ |
const double ReferenceWidthPercent = 0.50; |
18 |
+ |
|
19 |
|
public MaskedHexBox() |
20 |
|
{ |
21 |
|
InitializeComponent(); |
49 |
|
if (e.KeyCode > Keys.F && e.KeyCode <= Keys.Z && !e.Control && !e.Alt) |
50 |
|
{ |
51 |
|
e.SuppressKeyPress = true; |
52 |
< |
} |
52 |
> |
} |
53 |
|
} |
54 |
|
|
55 |
|
|
56 |
+ |
|
57 |
+ |
|
58 |
+ |
|
59 |
+ |
new public int Width { get { return base.Width; } set { base.Width = value; } } |
60 |
+ |
|
61 |
+ |
|
62 |
+ |
|
63 |
|
new public Font Font |
64 |
|
{ |
65 |
|
get { return base.Font; } |
66 |
|
set |
67 |
|
{ |
68 |
|
base.Font = value; |
69 |
< |
txtMaskedHexBox.Font = value; |
69 |
> |
|
70 |
> |
Font t = value; |
71 |
> |
|
72 |
> |
txtMaskedHexBox.Font = new Font(t.FontFamily, t.SizeInPoints + 4, t.Style); |
73 |
|
btnCopy.Font = value; |
74 |
|
btnPaste.Font = value; |
75 |
|
} |