Mtf.MessageBoxes 1.0.7

Additional Details

Wrong package

There is a newer version of this package available.
See the version list below for details.
dotnet add package Mtf.MessageBoxes --version 1.0.7                
NuGet\Install-Package Mtf.MessageBoxes -Version 1.0.7                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mtf.MessageBoxes" Version="1.0.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mtf.MessageBoxes --version 1.0.7                
#r "nuget: Mtf.MessageBoxes, 1.0.7"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mtf.MessageBoxes as a Cake Addin
#addin nuget:?package=Mtf.MessageBoxes&version=1.0.7

// Install Mtf.MessageBoxes as a Cake Tool
#tool nuget:?package=Mtf.MessageBoxes&version=1.0.7                

MessageBoxes Documentation

Overview

This documentation provides guidance on how to use the MessageBoxes.dll library in your project. This library includes functionalities for displaying various message boxes, such as informational, confirmation, and error messages.

Referencing MessageBoxes.dll

To use the MessageBoxes library, you need to reference MessageBoxes.dll in your project.

  1. Add Reference:

    • Right-click on your project in the Solution Explorer.
    • Select Add > Reference....
    • In the Reference Manager, browse to the location of MessageBoxes.dll and add it.
  2. Include the Namespace: At the top of your code file, include the MessageBoxes namespace:

    using MessageBoxes;
    

Using Message Boxes

InfoBox

To show an informational message box, use the InfoBox.Show method:

InfoBox.Show("Title", "Message");
  • Parameters:
    • Title: The title of the message box.
    • Message: The message content displayed in the box.

ConfirmBox

To display a confirmation message box that asks the user to confirm an action, use the ConfirmBox:

var result = ConfirmBox.Show("Title", "Do you want to proceed?");
if (result == ConfirmBoxResult.Yes)
{
    // User clicked Yes
}
else
{
    // User clicked No
}
  • Returns:
    • ConfirmBoxResult.Yes: User clicked Yes.
    • ConfirmBoxResult.No: User clicked No.

ErrorBox

To show an error message box, use the ErrorBox:

try
{
    // Code that may throw an exception
}
catch (Exception ex)
{
    ErrorBox.Show(ex);
}
ErrorBox.Show("Error Title", "An error occurred. Please try again.");
  • Parameters:
    • Error Title: The title of the error message box.
    • Error Message: The message explaining the error.

Examples from MessageBoxSender

You can see examples of how to call these message boxes in the message.bat file of the MessageBoxSender application. Here are some sample calls:

:: Example of InfoBox
MessageBoxSender InfoBox "Application Update" "An update is available."

:: Example of ConfirmBox
MessageBoxSender ConfirmBox "Confirmation" "Do you want to save changes?"

:: Example of ErrorBox
MessageBoxSender ErrorBox "Critical Error" "An unexpected error has occurred."

Conclusion

This document outlines how to use the MessageBoxes.dll in your project effectively. You can now display informative, confirmatory, and error messages using the provided methods. For any further questions, refer to the documentation of the MessageBoxes library or seek additional resources.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows10.0 is compatible. 
.NET Framework net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8.1

    • No dependencies.
  • net8.0-windows10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Mtf.MessageBoxes:

Package Downloads
Mtf.Controls

Custom Windows Forms Controls. The library includes various controls, such as: - AnsiColoringRichTextBox - FileBrowserView - Kbd300ASimulator - MovablePanel - MovableSizablePanel - MtfListView - MtfPictureBox - MtfTreeView - PasswordBox - SourceCodeViewerRichTextBox - TransparentPanel Compatibility: - .NET Framework 4.8.1 - .NET 8 - .NET 9

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.14 88 11/11/2024
1.0.13 85 11/11/2024
1.0.12 79 11/1/2024
1.0.11 79 10/26/2024
1.0.10 77 10/25/2024
1.0.9 75 10/25/2024
1.0.8 86 10/25/2024 1.0.8 is deprecated.
1.0.7 88 10/25/2024 1.0.7 is deprecated.