Move common things to AppCore from GuiApp

This commit is contained in:
2023-08-07 12:06:34 +02:00
parent 3d0eda54fb
commit 936c3896b9
48 changed files with 427 additions and 187 deletions

View File

@@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.2" />
<PackageReference Include="PropertyChanged.SourceGenerator" Version="1.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

View File

@@ -1,5 +1,5 @@
using System.ComponentModel;
using Avalonia.Input;
using FileTime.App.Core.Models;
using PropertyChanged.SourceGenerator;
namespace FileTime.App.FuzzyPanel;
@@ -44,9 +44,9 @@ public abstract partial class FuzzyPanelViewModel<TItem> : IFuzzyPanelViewModel<
public abstract void UpdateFilteredMatches();
public virtual Task<bool> HandleKeyDown(KeyEventArgs keyEventArgs)
public virtual Task<bool> HandleKeyDown(GeneralKeyEventArgs keyEventArgs)
{
if (keyEventArgs.Key == Key.Down)
if (keyEventArgs.Key == Keys.Down)
{
var nextItem = SelectedItem is null
? FilteredMatches.FirstOrDefault()
@@ -60,7 +60,7 @@ public abstract partial class FuzzyPanelViewModel<TItem> : IFuzzyPanelViewModel<
return Task.FromResult(true);
}
else if (keyEventArgs.Key == Key.Up)
else if (keyEventArgs.Key == Keys.Up)
{
var previousItem = SelectedItem is null
? FilteredMatches.LastOrDefault()