DarkUI.Net5/Example/Forms/MainForm.cs
Robin 27a5ad0c6e DarkDialog & DarkMessageBox
Added a dynamic dialog window and message box.
2015-09-18 11:40:14 +01:00

26 lines
1.0 KiB
C#

using DarkUI;
namespace Example
{
public partial class MainForm : DarkForm
{
public MainForm()
{
InitializeComponent();
btnDialog.Click += delegate {
var msgBox = new DarkMessageBox("This is small",
"Dark UI Example", DarkMessageBoxIcon.Information, DarkDialogButton.AbortRetryIgnore);
msgBox.ShowDialog();
};
btnMessageBox.Click += delegate {
var msgBox = new DarkMessageBox("This is a test of the dark message box. It's cool, isn't it? You can have really quite a lot of text in here and the message box will size itself appropriately. I dislike how the default .NET message box handled this, so hopefully this will be a better option for you. :)",
"Dark UI Example", DarkMessageBoxIcon.Information, DarkDialogButton.AbortRetryIgnore);
msgBox.MaximumWidth = 350;
msgBox.ShowDialog();
};
}
}
}