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