using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Models;
///
/// Result returned from keyboard shortcut dialog.
///
public class KeyboardShortcutDialogResult
{
///
/// Whether the dialog was completed successfully.
///
public bool IsSuccess { get; set; }
///
/// The key combination entered by the user.
///
public string Key { get; set; } = string.Empty;
///
/// The modifier keys selected by the user.
///
public ModifierKeys ModifierKeys { get; set; }
///
/// The mail operation selected by the user.
///
public MailOperation MailOperation { get; set; }
///
/// Creates a successful result.
///
public static KeyboardShortcutDialogResult Success(string key, ModifierKeys modifierKeys, MailOperation mailOperation)
{
return new KeyboardShortcutDialogResult
{
IsSuccess = true,
Key = key,
ModifierKeys = modifierKeys,
MailOperation = mailOperation
};
}
///
/// Creates a canceled result.
///
public static KeyboardShortcutDialogResult Canceled()
{
return new KeyboardShortcutDialogResult
{
IsSuccess = false
};
}
}