private void frmMain_FormClosing(object sender, FormClosingEventArgs e) { if (instance.IsFirstInstance && instance.OtherInstancesOpen) { if (MessageBox.Show("You are about to close the first instance of SLeek. This may cause any other open instances of SLeek to close. Are you sure you want to continue?", "SLeek", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { e.Cancel = true; return; } } debugLogForm.Dispose(); debugLogForm.Close(); debugLogForm = null; if (netcom.IsLoggedIn) netcom.Logout(); instance.Config.CurrentConfig.MainWindowState = (int)this.WindowState; }
private void InitializeDebugLogForm() { debugLogForm = new frmDebugLog(instance); }