private void frmController_Load(object sender, EventArgs e) { Visible = false; if (WOTHelper.FindProcess("WOT.Stats")) { DevExpress.XtraEditors.XtraMessageBox.Show("WOT Statistics is already running", "WOT Statistics", MessageBoxButtons.OK, MessageBoxIcon.Hand); this.Close(); } else { if (UserSettings.MinimiseonStartup == true) { WOTTrayApp sysTray = new WOTTrayApp(); sysTray.Show(); } else { using (frmMain wotGUI = new frmMain()) { wotGUI.ShowDialog(); } } } }
public clsController() { //Visible = false; if (WOTHelper.FindProcess("WOT.Stats")) { DevExpress.XtraEditors.XtraMessageBox.Show("WOT Statistics is already running", "WOT Statistics", MessageBoxButtons.OK, MessageBoxIcon.Hand); _error = true; Application.Exit(); } else { using (frmUpdater wotGUI = new frmUpdater()) { wotGUI.ShowDialog(); } } }