private void MainProgram_FormClosing(object sender, FormClosingEventArgs e) { if (isForceExit) { e.Cancel = false; return; } try { XMessageBox msg = new XMessageBox(); msg.SetInfo("Are you shure you want to exit?", MessageBoxButtons.YesNo); msg.ShowDialog(this); e.Cancel = (PreferencesManager.XMessageBox == DialogResult.No); } catch { e.Cancel = false; } if (!e.Cancel) { CustomThing(); } else { this.WindowState = FormWindowState.Minimized; ShowIcon = ShowInTaskbar = true; } }
private void jPictureBox2_Click(object sender, EventArgs e) { XMessageBox msg = new XMessageBox(); msg.SetInfo(LicenceManager.message, MessageBoxButtons.OK, "Licence Info"); msg.ShowDialog(this); }