Files
mirror-processhacker/trunk/ProcessHacker/Forms/MessageBoxWindow.cs
T
wj32 9cb7746b79 added users list
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1384 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2009-06-07 08:25:00 +00:00

74 lines
1.9 KiB
C#

using System.Windows.Forms;
namespace ProcessHacker
{
public partial class MessageBoxWindow : Form
{
public MessageBoxWindow()
{
InitializeComponent();
this.AddEscapeToClose();
comboIcon.SelectedItem = "None";
}
public MessageBoxIcon MessageBoxIcon
{
get
{
switch (comboIcon.SelectedItem.ToString())
{
case "None":
return MessageBoxIcon.None;
case "Error":
return MessageBoxIcon.Error;
case "Information":
return MessageBoxIcon.Information;
case "Question":
return MessageBoxIcon.Question;
case "Warning":
return MessageBoxIcon.Warning;
default:
return MessageBoxIcon.None;
}
}
}
public string MessageBoxText
{
get { return textText.Text; }
set { textText.Text = value; }
}
public int MessageBoxTimeout
{
get
{
int timeout = 0;
int.TryParse(textTimeout.Text, out timeout);
return timeout;
}
}
public string MessageBoxTitle
{
get { return textTitle.Text; }
set { textTitle.Text = value; }
}
private void buttonOK_Click(object sender, System.EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
private void buttonCancel_Click(object sender, System.EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}