diff --git a/src/Artemis.Core/Models/ProfileConfiguration/ProfileConfigurationHotkey.cs b/src/Artemis.Core/Models/ProfileConfiguration/Hotkey.cs
similarity index 85%
rename from src/Artemis.Core/Models/ProfileConfiguration/ProfileConfigurationHotkey.cs
rename to src/Artemis.Core/Models/ProfileConfiguration/Hotkey.cs
index 0a735f875..aaa5485e6 100644
--- a/src/Artemis.Core/Models/ProfileConfiguration/ProfileConfigurationHotkey.cs
+++ b/src/Artemis.Core/Models/ProfileConfiguration/Hotkey.cs
@@ -6,18 +6,18 @@ namespace Artemis.Core
///
/// Represents a key or combination of keys that changes the suspension status of a
///
- public class ProfileConfigurationHotkey : CorePropertyChanged, IStorageModel
+ public class Hotkey : CorePropertyChanged, IStorageModel
{
///
- /// Creates a new instance of
+ /// Creates a new instance of
///
- public ProfileConfigurationHotkey()
+ public Hotkey()
{
Entity = new ProfileConfigurationHotkeyEntity();
}
- internal ProfileConfigurationHotkey(ProfileConfigurationHotkeyEntity entity)
+ internal Hotkey(ProfileConfigurationHotkeyEntity entity)
{
Entity = entity;
Load();
diff --git a/src/Artemis.Core/Models/ProfileConfiguration/ProfileConfiguration.cs b/src/Artemis.Core/Models/ProfileConfiguration/ProfileConfiguration.cs
index a278443cd..942f1af4c 100644
--- a/src/Artemis.Core/Models/ProfileConfiguration/ProfileConfiguration.cs
+++ b/src/Artemis.Core/Models/ProfileConfiguration/ProfileConfiguration.cs
@@ -104,12 +104,12 @@ namespace Artemis.Core
///
/// Gets or sets the hotkey used to enable or toggle the profile
///
- public ProfileConfigurationHotkey? EnableHotkey { get; set; }
+ public Hotkey? EnableHotkey { get; set; }
///
/// Gets or sets the hotkey used to disable the profile
///
- public ProfileConfigurationHotkey? DisableHotkey { get; set; }
+ public Hotkey? DisableHotkey { get; set; }
///
/// Gets the ID of the profile of this profile configuration
@@ -246,8 +246,8 @@ namespace Artemis.Core
? new NodeScript("Activate profile", "Whether or not the profile should be active", Entity.ActivationCondition, this)
: new NodeScript("Activate profile", "Whether or not the profile should be active", this);
- EnableHotkey = Entity.EnableHotkey != null ? new ProfileConfigurationHotkey(Entity.EnableHotkey) : null;
- DisableHotkey = Entity.DisableHotkey != null ? new ProfileConfigurationHotkey(Entity.DisableHotkey) : null;
+ EnableHotkey = Entity.EnableHotkey != null ? new Hotkey(Entity.EnableHotkey) : null;
+ DisableHotkey = Entity.DisableHotkey != null ? new Hotkey(Entity.DisableHotkey) : null;
}
///
diff --git a/src/Artemis.Core/Services/Input/Enums/KeyboardModifierKey.cs b/src/Artemis.Core/Services/Input/Enums/KeyboardModifierKey.cs
index 2ebde89e7..306822572 100644
--- a/src/Artemis.Core/Services/Input/Enums/KeyboardModifierKey.cs
+++ b/src/Artemis.Core/Services/Input/Enums/KeyboardModifierKey.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
namespace Artemis.Core.Services
{
@@ -9,18 +10,23 @@ namespace Artemis.Core.Services
public enum KeyboardModifierKey
{
/// No modifiers are pressed.
+ [Description("None")]
None = 0,
/// The ALT key.
+ [Description("Alt")]
Alt = 1,
/// The CTRL key.
+ [Description("Ctrl")]
Control = 2,
/// The SHIFT key.
+ [Description("Shift")]
Shift = 4,
/// The Windows logo key.
+ [Description("Win")]
Windows = 8
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml b/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml
index 36b985041..3ee84f85d 100644
--- a/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml
+++ b/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml
@@ -96,6 +96,36 @@
+
+
+ Represents a control that can be used to display or edit instances.
+
+
+
+
+ Creates a new instance of the class
+
+
+
+
+ Gets or sets the currently displayed icon as either a or an
+ pointing
+ to an SVG
+
+
+
+
+ Gets or sets the currently displayed icon as either a or an
+ pointing
+ to an SVG
+
+
+
+
+
+
+
+
Gets or sets the to display
diff --git a/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileEdit/ProfileConfigurationHotkeyViewModel.cs b/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileEdit/ProfileConfigurationHotkeyViewModel.cs
index 183447733..fbba87b5a 100644
--- a/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileEdit/ProfileConfigurationHotkeyViewModel.cs
+++ b/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileEdit/ProfileConfigurationHotkeyViewModel.cs
@@ -22,7 +22,7 @@ namespace Artemis.UI.Screens.Sidebar.Dialogs.ProfileEdit
UpdateHotkeyDisplay();
}
- public ProfileConfigurationHotkey Hotkey => _isDisableHotkey ? _profileConfiguration.DisableHotkey : _profileConfiguration.EnableHotkey;
+ public Hotkey Hotkey => _isDisableHotkey ? _profileConfiguration.DisableHotkey : _profileConfiguration.EnableHotkey;
public string Hint
{
@@ -66,13 +66,13 @@ namespace Artemis.UI.Screens.Sidebar.Dialogs.ProfileEdit
if (_isDisableHotkey)
{
- _profileConfiguration.DisableHotkey ??= new ProfileConfigurationHotkey();
+ _profileConfiguration.DisableHotkey ??= new Hotkey();
_profileConfiguration.DisableHotkey.Key = (KeyboardKey?) e.Key;
_profileConfiguration.DisableHotkey.Modifiers = (KeyboardModifierKey?) Keyboard.Modifiers;
}
else
{
- _profileConfiguration.EnableHotkey ??= new ProfileConfigurationHotkey();
+ _profileConfiguration.EnableHotkey ??= new Hotkey();
_profileConfiguration.EnableHotkey.Key = (KeyboardKey?) e.Key;
_profileConfiguration.EnableHotkey.Modifiers = (KeyboardModifierKey?) Keyboard.Modifiers;
}
diff --git a/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj b/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj
index 7dbbc699f..180b48704 100644
--- a/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj
+++ b/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj
@@ -44,6 +44,9 @@
+
+ HotkeyBox.axaml
+ %(Filename)
diff --git a/src/Avalonia/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs b/src/Avalonia/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs
index 8ea3417ad..cc68222dd 100644
--- a/src/Avalonia/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs
+++ b/src/Avalonia/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs
@@ -21,43 +21,7 @@ namespace Artemis.UI.Shared.Controls
public static readonly StyledProperty