AutoClosingMessageBox 1.0.0.2
See the version list below for details.
dotnet add package AutoClosingMessageBox --version 1.0.0.2
NuGet\Install-Package AutoClosingMessageBox -Version 1.0.0.2
<PackageReference Include="AutoClosingMessageBox" Version="1.0.0.2" />
paket add AutoClosingMessageBox --version 1.0.0.2
#r "nuget: AutoClosingMessageBox, 1.0.0.2"
// Install AutoClosingMessageBox as a Cake Addin #addin nuget:?package=AutoClosingMessageBox&version=1.0.0.2 // Install AutoClosingMessageBox as a Cake Tool #tool nuget:?package=AutoClosingMessageBox&version=1.0.0.2
Usage:
Use the AutoClosingMessageBox.Show
method either as follows:
// Fire and forget - it about to be closed after default timeout(1000ms)
AutoClosingMessageBox.Show("Hello, World!");
or follows:
// Wait for some result or make the default decision
var result = AutoClosingMessageBox.Show(
text: "To be or not to be?",
caption: "The question",
timeout: 2500,
buttons: MessageBoxButtons.YesNo,
defaultResult: DialogResult.Yes);
if(result == DialogResult.Yes) {
// to be
}
else {
// or not
}
You can also use the AutoClosingMessageBox.Factory
to get full control on MessageBox showing:
var toBeOrNotToBeQuestion = AutoClosingMessageBox.Factory(
showMethod: (caption, buttons) =>
MessageBox.Show(this, "To be or not to be?", caption, buttons, MessageBoxIcon.Question),
caption: "The question"
);
if(DialogResult.Yes == toBeOrNotToBeQuestion.Show(
timeout: 2500,
buttons: MessageBoxButtons.YesNo,
defaultResult: DialogResult.Yes)) {
// to be
}
else {
// or not
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AutoClosingMessageBox:
Package | Downloads |
---|---|
NKit.Windows
.NET Toolkits (class libraries) containing reusable code for speeding up development of any .NET applications. NKit.Standard is the .NET Standard compatible version of NKit. NKit.Windows is the .NET Framework compatbile version of NKit. NKit.Core is the latest .NET Core compatible version of NKit. |
GitHub repositories
This package is not used by any popular GitHub repositories.
The MessageBox which automatically closes after the specific timeout.
v1.0.0.2:
- New Show(IWin32Owner) API to support most popular scenarios (in the
context of #1 );
- New Factory() API to provide full control on MessageBox showing;