Skip to content

Commit

Permalink
Merge pull request #51 from XanatosX/feature/40_add-missing-hotkey-view
Browse files Browse the repository at this point in the history
Add hotkey window to the application
  • Loading branch information
XanatosX authored Feb 1, 2023
2 parents 66e9345 + ebf763f commit 1c06a88
Show file tree
Hide file tree
Showing 22 changed files with 707 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/ModularToolManager/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ private Serilog.ILogger CreateLoggerConfig(IServiceCollection collection)
public override void OnFrameworkInitializationCompleted()
{
var provider = BuildServiceCollection().BuildServiceProvider();
Microsoft.Extensions.Logging.ILogger<App> testing = provider.GetRequiredService<Microsoft.Extensions.Logging.ILogger<App>>();
testing.LogError("test");
WeakReferenceMessenger.Default.Register<RefreshMainWindow>(this, (_, e) =>
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
Expand Down
38 changes: 38 additions & 0 deletions src/ModularToolManager/Models/HotkeyModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ModularToolManager.Models;

/// <summary>
/// Model representing a single hotkey
/// </summary>
internal class HotkeyModel
{
/// <summary>
/// The name of the hotkey
/// </summary>
public string? Name { get; init; }

/// <summary>
/// The description of the hotkey
/// </summary>
public string? Description { get; init; }

/// <summary>
/// Where does the hotkey work
/// </summary>
public string? WorkingOn { get; init; }

/// <summary>
/// The keys to press to trigger the hotkey
/// </summary>
public List<string>? Keys { get; init; }

/// <summary>
/// The order id for the hotkey
/// </summary>
public int OrderId { get; init; }
}
5 changes: 5 additions & 0 deletions src/ModularToolManager/ModularToolManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
<AvaloniaResource Include="Assets\**" />
<None Remove=".gitignore" />
<None Remove="Resources\dependencies.json" />
<None Remove="Resources\hotkeys.json" />
<None Remove="Resources\LICENSE" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\dependencies.json" />
<EmbeddedResource Include="Resources\hotkeys.json" />
<EmbeddedResource Include="Resources\LICENSE" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -43,6 +45,9 @@
<Compile Update="Views\AllPluginsView.axaml.cs">
<DependentUpon>AllPluginsView.axaml</DependentUpon>
</Compile>
<Compile Update="Views\HotkeysView.axaml.cs">
<DependentUpon>HotkeysView.axaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Properties.resx">
Expand Down
9 changes: 9 additions & 0 deletions src/ModularToolManager/Properties/Properties.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/ModularToolManager/Properties/Properties.resx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
<data name="Icon_hide" xml:space="preserve">
<value>eye_hide_regular</value>
</data>
<data name="Icon_Keyboard" xml:space="preserve">
<value>keyboard_regular</value>
</data>
<data name="Icon_language" xml:space="preserve">
<value>flag_regular</value>
</data>
Expand Down
198 changes: 198 additions & 0 deletions src/ModularToolManager/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions src/ModularToolManager/Properties/Resources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,51 @@
<data name="FunctionSelection_SearchForFunction" xml:space="preserve">
<value>Nach Funktion suchen</value>
</data>
<data name="Hotkey_Abort_Description" xml:space="preserve">
<value>Aktuelle aktion abbrechen</value>
</data>
<data name="Hotkey_Abort_Name" xml:space="preserve">
<value>Abbrechen des aktuellen vorgangs</value>
</data>
<data name="Hotkey_Abort_WorkingOn" xml:space="preserve">
<value>Sprache ändern, Funktion hinzufügen/Ändern, Einstellungs Fenster</value>
</data>
<data name="Hotkey_Abort_WorkingOn_Prefix_Colon" xml:space="preserve">
<value>Funktioniert an folgenden Stellen:</value>
</data>
<data name="Hotkey_About_Description" xml:space="preserve">
<value>Öffnen des "Über die Applikation" Fensters</value>
</data>
<data name="Hotkey_About_Name" xml:space="preserve">
<value>Über die Applikation</value>
</data>
<data name="Hotkey_Hide_Description" xml:space="preserve">
<value>Versteckt die Applikation im Infobereich</value>
</data>
<data name="Hotkey_Hide_Name" xml:space="preserve">
<value>Applikation verstecken</value>
</data>
<data name="Hotkey_Language_Description" xml:space="preserve">
<value>Öffnen der Spracheinstellungen der Applikation</value>
</data>
<data name="Hotkey_Language_Name" xml:space="preserve">
<value>Sprache der Anwendung ändern</value>
</data>
<data name="Hotkey_Main_Window_WorkinOn" xml:space="preserve">
<value>Hauptfenster</value>
</data>
<data name="Hotkey_New_Description" xml:space="preserve">
<value>Erstelle eine neue Funktion</value>
</data>
<data name="Hotkey_New_Name" xml:space="preserve">
<value>Neuer Funktion</value>
</data>
<data name="Hotkey_Report_Bug_Description" xml:space="preserve">
<value>Report a bug found within the application</value>
</data>
<data name="Hotkey_Report_Bug_Name" xml:space="preserve">
<value>Fehler melden</value>
</data>
<data name="Menu_File" xml:space="preserve">
<value>Datei</value>
</data>
Expand Down
Loading

0 comments on commit 1c06a88

Please sign in to comment.