public void OnStartup(StartupEventArgs e) { if (e.Args.Length == 0) { if (enforcer.ShouldApplicationExit()) { Environment.Exit(0); } } }