expose CancelKeyPress as an overridable method on Application
This commit is contained in:
parent
88a27eb26f
commit
935daede06
@ -360,10 +360,22 @@ namespace MBS.Framework
|
|||||||
if (ShortName == null)
|
if (ShortName == null)
|
||||||
throw new ArgumentException("must specify a ShortName for the application");
|
throw new ArgumentException("must specify a ShortName for the application");
|
||||||
|
|
||||||
|
Console.CancelKeyPress += Console_CancelKeyPress;
|
||||||
|
|
||||||
InitializeInternal();
|
InitializeInternal();
|
||||||
Initialized = true;
|
Initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void OnCancelKeyPress(ConsoleCancelEventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
|
||||||
|
{
|
||||||
|
OnCancelKeyPress(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public event ApplicationActivatedEventHandler BeforeActivated;
|
public event ApplicationActivatedEventHandler BeforeActivated;
|
||||||
protected virtual void OnBeforeActivated(ApplicationActivatedEventArgs e)
|
protected virtual void OnBeforeActivated(ApplicationActivatedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user