mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-01 22:59:27 +03:00
34 lines
767 B
C#
34 lines
767 B
C#
using DarkUI;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Example
|
|
{
|
|
public partial class DockDocument : DarkDocument
|
|
{
|
|
#region Constructor Region
|
|
|
|
public DockDocument()
|
|
{
|
|
InitializeComponent();
|
|
|
|
// Workaround to stop the textbox from highlight all text.
|
|
txtDocument.SelectionStart = txtDocument.Text.Length;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Event Handler Region
|
|
|
|
public override void Close()
|
|
{
|
|
var result = DarkMessageBox.ShowWarning(@"You will lose any unsaved changes. Continue?", @"Close document", DarkDialogButton.YesNo);
|
|
if (result == DialogResult.No)
|
|
return;
|
|
|
|
base.Close();
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|