|
- using System.Windows.Forms;
-
- namespace GCMM
- {
- public partial class CustomMessageBox : Form
- {
- public bool ApplyToAll { get; private set; }
- public CustomMessageBox()
- {
- InitializeComponent();
- yesbtn.Click += (sender, e) =>
- {
- DialogResult = DialogResult.Yes;
- ApplyToAll = applyToAll.Checked;
- Close();
- };
- nobtn.Click += (sender, e) =>
- {
- DialogResult = DialogResult.No;
- ApplyToAll = applyToAll.Checked;
- Close();
- };
- /*cancelbtn.Click += (sender, e) =>
- {
- DialogResult = DialogResult.Cancel;
- Close();
- };*/
- }
-
- public CustomMessageBox(string message, string caption) : this()
- {
- content.Text = message;
- Text = caption;
- }
- }
- }
|