using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AIStudio.Wpf.DiagramDesigner.Services
{
///
/// Available Button options.
/// Abstracted to allow some level of UI Agnosticness
///
public enum CustomDialogButtons
{
OK,
OKCancel,
YesNo,
YesNoCancel
}
///
/// Available Icon options.
/// Abstracted to allow some level of UI Agnosticness
///
public enum CustomDialogIcons
{
None,
Information,
Question,
Exclamation,
Stop,
Warning
}
///
/// Available DialogResults options.
/// Abstracted to allow some level of UI Agnosticness
///
public enum CustomDialogResults
{
None,
OK,
Cancel,
Yes,
No
}
///
/// This interface defines a interface that will allow
/// a ViewModel to show a messagebox
///
public interface IMessageBoxService
{
///
/// Shows an error message
///
/// The error message
void ShowError(string message);
///
/// Shows an error message with a custom caption
///
/// The error message
/// The caption
void ShowError(string message, string caption);
///
/// Shows an information message
///
/// The information message
void ShowInformation(string message);
///
/// Shows an information message with a custom caption
///
/// The information message
/// The caption
void ShowInformation(string message, string caption);
///
/// Shows an warning message
///
/// The warning message
void ShowWarning(string message);
///
/// Shows an warning message with a custom caption
///
/// The warning message
/// The caption
void ShowWarning(string message, string caption);
///
/// Displays a Yes/No dialog and returns the user input.
///
/// The message to be displayed.
/// The icon to be displayed.
/// User selection.
CustomDialogResults ShowYesNo(string message, CustomDialogIcons icon);
///
/// Displays a Yes/No dialog with a custom caption, and returns the user input.
///
/// The message to be displayed.
/// The caption
/// The icon to be displayed.
/// User selection.
CustomDialogResults ShowYesNo(string message, string caption, CustomDialogIcons icon);
///
/// Displays a Yes/No/Cancel dialog and returns the user input.
///
/// The message to be displayed.
/// The icon to be displayed.
/// User selection.
CustomDialogResults ShowYesNoCancel(string message, CustomDialogIcons icon);
///
/// Displays a Yes/No dialog with a default button selected, and returns the user input.
///
/// The message to be displayed.
/// The caption of the message box window
/// The icon to be displayed.
/// Default result for the message box
/// User selection.
CustomDialogResults ShowYesNo(string message, string caption, CustomDialogIcons icon, CustomDialogResults defaultResult);
///
/// Displays a Yes/No/Cancel dialog with a custom caption and returns the user input.
///
/// The message to be displayed.
/// The caption
/// The icon to be displayed.
/// User selection.
CustomDialogResults ShowYesNoCancel(string message, string caption, CustomDialogIcons icon);
///
/// Displays a Yes/No/Cancel dialog with a default button selected, and returns the user input.
///
/// The message to be displayed.
/// The caption of the message box window
/// The icon to be displayed.
/// /// Default result for the message box
/// User selection.
CustomDialogResults ShowYesNoCancel(string message, string caption, CustomDialogIcons icon, CustomDialogResults defaultResult);
///
/// Displays a OK/Cancel dialog and returns the user input.
///
/// The message to be displayed.
/// The icon to be displayed.
/// User selection.
CustomDialogResults ShowOkCancel(string message, CustomDialogIcons icon);
///
/// Displays a OK/Cancel dialog with a custom caption and returns the user input.
///
/// The message to be displayed.
/// The caption
/// The icon to be displayed.
/// User selection.
CustomDialogResults ShowOkCancel(string message, string caption, CustomDialogIcons icon);
///
/// Displays a OK/Cancel dialog with a default button selected, and returns the user input.
///
/// The message to be displayed.
/// The caption of the message box window
/// The icon to be displayed.
/// Default result for the message box
/// User selection.
CustomDialogResults ShowOkCancel(string message, string caption, CustomDialogIcons icon, CustomDialogResults defaultResult);
}
}