Skip to content

Instantly share code, notes, and snippets.

@SergioLuis
Created January 28, 2019 16:59
Show Gist options
  • Save SergioLuis/edd3f28fe8d2b5d7fb4517f7db7ee822 to your computer and use it in GitHub Desktop.
Save SergioLuis/edd3f28fe8d2b5d7fb4517f7db7ee822 to your computer and use it in GitHub Desktop.
The base implementation of a dialog that registers and unregisters itself against the WindowHandler
public class BaseDialog : Form
{
protected override void OnShown(EventArgs e)
{
WindowHandler.AddDialogForTesting(this);
base.OnShown(e);
}
protected override void OnClosed(EventArgs e)
{
WindowHandler.RemoveDialogFromTesting(this);
base.OnClosed(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment