Improved keyboad shortcuts.
This commit is contained in:
@@ -12,6 +12,11 @@ public class KeyboardShortcutDialogResult
|
||||
/// </summary>
|
||||
public bool IsSuccess { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The application mode selected by the user.
|
||||
/// </summary>
|
||||
public WinoApplicationMode Mode { get; set; } = WinoApplicationMode.Mail;
|
||||
|
||||
/// <summary>
|
||||
/// The key combination entered by the user.
|
||||
/// </summary>
|
||||
@@ -23,21 +28,22 @@ public class KeyboardShortcutDialogResult
|
||||
public ModifierKeys ModifierKeys { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The mail operation selected by the user.
|
||||
/// The shortcut action selected by the user.
|
||||
/// </summary>
|
||||
public MailOperation MailOperation { get; set; }
|
||||
public KeyboardShortcutAction Action { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a successful result.
|
||||
/// </summary>
|
||||
public static KeyboardShortcutDialogResult Success(string key, ModifierKeys modifierKeys, MailOperation mailOperation)
|
||||
public static KeyboardShortcutDialogResult Success(WinoApplicationMode mode, string key, ModifierKeys modifierKeys, KeyboardShortcutAction action)
|
||||
{
|
||||
return new KeyboardShortcutDialogResult
|
||||
{
|
||||
IsSuccess = true,
|
||||
Mode = mode,
|
||||
Key = key,
|
||||
ModifierKeys = modifierKeys,
|
||||
MailOperation = mailOperation
|
||||
Action = action
|
||||
};
|
||||
}
|
||||
|
||||
@@ -51,4 +57,4 @@ public class KeyboardShortcutDialogResult
|
||||
IsSuccess = false
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models;
|
||||
|
||||
public class KeyboardShortcutTriggerDetails
|
||||
{
|
||||
public Guid ShortcutId { get; init; }
|
||||
public WinoApplicationMode Mode { get; init; }
|
||||
public KeyboardShortcutAction Action { get; init; }
|
||||
public string Key { get; init; } = string.Empty;
|
||||
public ModifierKeys ModifierKeys { get; init; }
|
||||
public bool Handled { get; set; }
|
||||
public object Sender { get; init; }
|
||||
public object Origin { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user