TBMM/GCMM/CustomMessageBox.cs

48 lines
1.2 KiB
C#
Raw Normal View History

using GCMM.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
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;
}
}
}