Skip to content

Commit 0254302

Browse files
committed
Added GlobalWindowManager events.
1 parent 50e8874 commit 0254302

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Forms/InputBytesForm.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Diagnostics.Contracts;
33
using System.Windows.Forms;
4+
using ReClassNET.UI;
45

56
namespace ReClassNET.Forms
67
{
@@ -22,6 +23,22 @@ public InputBytesForm(int currentSize)
2223
FormatLabelText(newSizeLabel, currentSize);
2324
}
2425

26+
protected override void OnLoad(EventArgs e)
27+
{
28+
base.OnLoad(e);
29+
30+
GlobalWindowManager.AddWindow(this);
31+
}
32+
33+
protected override void OnFormClosed(FormClosedEventArgs e)
34+
{
35+
base.OnFormClosed(e);
36+
37+
GlobalWindowManager.RemoveWindow(this);
38+
}
39+
40+
#region Event Handler
41+
2542
private void hexRadioButton_CheckedChanged(object sender, EventArgs e)
2643
{
2744
bytesNumericUpDown.Hexadecimal = hexRadioButton.Checked;
@@ -32,6 +49,8 @@ private void bytesNumericUpDown_ValueChanged(object sender, EventArgs e)
3249
FormatLabelText(newSizeLabel, currentSize + Bytes);
3350
}
3451

52+
#endregion
53+
3554
private void FormatLabelText(Label label, int size)
3655
{
3756
Contract.Requires(label != null);

0 commit comments

Comments
 (0)