1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/akwkevin-aistudio.-wpf.-diagram

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
Клонировать/Скачать
IMessageBoxService.cs 6.8 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
艾竹 Отправлено 2 лет назад 4b798f7
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AIStudio.Wpf.DiagramDesigner.Services
{
/// <summary>
/// Available Button options.
/// Abstracted to allow some level of UI Agnosticness
/// </summary>
public enum CustomDialogButtons
{
OK,
OKCancel,
YesNo,
YesNoCancel
}
/// <summary>
/// Available Icon options.
/// Abstracted to allow some level of UI Agnosticness
/// </summary>
public enum CustomDialogIcons
{
None,
Information,
Question,
Exclamation,
Stop,
Warning
}
/// <summary>
/// Available DialogResults options.
/// Abstracted to allow some level of UI Agnosticness
/// </summary>
public enum CustomDialogResults
{
None,
OK,
Cancel,
Yes,
No
}
/// <summary>
/// This interface defines a interface that will allow
/// a ViewModel to show a messagebox
/// </summary>
public interface IMessageBoxService
{
/// <summary>
/// Shows an error message
/// </summary>
/// <param name="message">The error message</param>
void ShowError(string message);
/// <summary>
/// Shows an error message with a custom caption
/// </summary>
/// <param name="message">The error message</param>
/// <param name="caption">The caption</param>
void ShowError(string message, string caption);
/// <summary>
/// Shows an information message
/// </summary>
/// <param name="message">The information message</param>
void ShowInformation(string message);
/// <summary>
/// Shows an information message with a custom caption
/// </summary>
/// <param name="message">The information message</param>
/// <param name="caption">The caption</param>
void ShowInformation(string message, string caption);
/// <summary>
/// Shows an warning message
/// </summary>
/// <param name="message">The warning message</param>
void ShowWarning(string message);
/// <summary>
/// Shows an warning message with a custom caption
/// </summary>
/// <param name="message">The warning message</param>
/// <param name="caption">The caption</param>
void ShowWarning(string message, string caption);
/// <summary>
/// Displays a Yes/No dialog and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="icon">The icon to be displayed.</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowYesNo(string message, CustomDialogIcons icon);
/// <summary>
/// Displays a Yes/No dialog with a custom caption, and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="caption">The caption</param>
/// <param name="icon">The icon to be displayed.</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowYesNo(string message, string caption, CustomDialogIcons icon);
/// <summary>
/// Displays a Yes/No/Cancel dialog and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="icon">The icon to be displayed.</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowYesNoCancel(string message, CustomDialogIcons icon);
/// <summary>
/// Displays a Yes/No dialog with a default button selected, and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="caption">The caption of the message box window</param>
/// <param name="icon">The icon to be displayed.</param>
/// <param name="defaultResult">Default result for the message box</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowYesNo(string message, string caption, CustomDialogIcons icon, CustomDialogResults defaultResult);
/// <summary>
/// Displays a Yes/No/Cancel dialog with a custom caption and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="caption">The caption</param>
/// <param name="icon">The icon to be displayed.</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowYesNoCancel(string message, string caption, CustomDialogIcons icon);
/// <summary>
/// Displays a Yes/No/Cancel dialog with a default button selected, and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="caption">The caption of the message box window</param>
/// <param name="icon">The icon to be displayed.</param>
/// /// <param name="defaultResult">Default result for the message box</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowYesNoCancel(string message, string caption, CustomDialogIcons icon, CustomDialogResults defaultResult);
/// <summary>
/// Displays a OK/Cancel dialog and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="icon">The icon to be displayed.</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowOkCancel(string message, CustomDialogIcons icon);
/// <summary>
/// Displays a OK/Cancel dialog with a custom caption and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="caption">The caption</param>
/// <param name="icon">The icon to be displayed.</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowOkCancel(string message, string caption, CustomDialogIcons icon);
/// <summary>
/// Displays a OK/Cancel dialog with a default button selected, and returns the user input.
/// </summary>
/// <param name="message">The message to be displayed.</param>
/// <param name="caption">The caption of the message box window</param>
/// <param name="icon">The icon to be displayed.</param>
/// <param name="defaultResult">Default result for the message box</param>
/// <returns>User selection.</returns>
CustomDialogResults ShowOkCancel(string message, string caption, CustomDialogIcons icon, CustomDialogResults defaultResult);
}
}

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/akwkevin-aistudio.-wpf.-diagram.git
git@gitlife.ru:oschina-mirror/akwkevin-aistudio.-wpf.-diagram.git
oschina-mirror
akwkevin-aistudio.-wpf.-diagram
akwkevin-aistudio.-wpf.-diagram
1.0.7Demo