public static StopInstance ( |
||
pInstance | ||
return | void |
private void ConsoleOutputWindow_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.C && e.Control) { AemActions.StopInstance(mAemInstance); } }
static void Application_ThreadExit(object sender, EventArgs e) { // automatically stop instances that are still running on exit try { if (Program.InstanceList != null) { foreach (AemInstance instance in Program.InstanceList) { Process process = instance.GetInstanceJavaProcess(); if (process != null && !process.HasExited) { try { AemActions.StopInstance(instance); instance.NotifyIcon.Visible = false; instance.NotifyIcon.Dispose(); instance.NotifyIcon = null; } catch (Exception ex) { mLog.Error("Error stopping instance '" + instance.Name + "'.", ex); } } } } } catch (Exception ex) { mLog.Error("Error checking for running instances or application shutdown.", ex); } }