Added application setting objects.
This commit is contained in:
@@ -16,7 +16,7 @@ public class AudioBitmapImageCache(IAudioImageExtractor audioImageExtractor) : M
|
|||||||
|
|
||||||
protected override MemoryCacheOptions Options => new()
|
protected override MemoryCacheOptions Options => new()
|
||||||
{
|
{
|
||||||
SizeLimit = 40,
|
SizeLimit = 200_000_000,
|
||||||
CompactionPercentage = 0.2,
|
CompactionPercentage = 0.2,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -87,6 +87,6 @@ public class AudioBitmapImageCache(IAudioImageExtractor audioImageExtractor) : M
|
|||||||
|
|
||||||
protected override long GetEntrySize(BitmapImage entry)
|
protected override long GetEntrySize(BitmapImage entry)
|
||||||
{
|
{
|
||||||
return entry.PixelWidth * entry.PixelHeight;
|
return entry.DecodePixelWidth * entry.DecodePixelHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Harmonia.WinUI.Converters;
|
namespace Harmonia.WinUI.Converters;
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,16 @@
|
|||||||
<ProjectCapability Include="Msix" />
|
<ProjectCapability Include="Msix" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
|
||||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250310001" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250310001" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Harmonia.Core\Harmonia.Core.csproj" />
|
<ProjectReference Include="..\Harmonia.Core\Harmonia.Core.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Views\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
|
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
|
||||||
|
|||||||
10
Harmonia.WinUI/Session/ApplicationSession.cs
Normal file
10
Harmonia.WinUI/Session/ApplicationSession.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
namespace Harmonia.WinUI.Session;
|
||||||
|
|
||||||
|
public partial class ApplicationSession
|
||||||
|
{
|
||||||
|
public WindowSession Window { get; set; } = new();
|
||||||
|
public NavigationSession Navigation { get; set; } = new();
|
||||||
|
public AudioLibrarySession Library { get; set; } = new();
|
||||||
|
public AudioPlayerSession Player { get; set; } = new();
|
||||||
|
public PlaylistSession Playlist { get; set; } = new();
|
||||||
|
}
|
||||||
8
Harmonia.WinUI/Session/AudioLibrarySession.cs
Normal file
8
Harmonia.WinUI/Session/AudioLibrarySession.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Harmonia.WinUI.Session;
|
||||||
|
|
||||||
|
public partial class AudioLibrarySession
|
||||||
|
{
|
||||||
|
public string? FlexViewType { get; set; }
|
||||||
|
public string? LibraryViewType { get; set; }
|
||||||
|
public string? Breadcrumbs { get; set; }
|
||||||
|
}
|
||||||
13
Harmonia.WinUI/Session/AudioPlayerSession.cs
Normal file
13
Harmonia.WinUI/Session/AudioPlayerSession.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
namespace Harmonia.WinUI.Session;
|
||||||
|
|
||||||
|
public partial class AudioPlayerSession
|
||||||
|
{
|
||||||
|
public string? PlaylistUID { get; set; }
|
||||||
|
public string? PlaylistSongUID { get; set; }
|
||||||
|
public double Position { get; set; } = 0.0;
|
||||||
|
public string? PlaybackState { get; set; }
|
||||||
|
public double Volume { get; set; } = 1.0;
|
||||||
|
public bool IsMuted { get; set; }
|
||||||
|
public string? RepeatState { get; set; }
|
||||||
|
public bool IsRandom { get; set; }
|
||||||
|
}
|
||||||
6
Harmonia.WinUI/Session/NavigationSession.cs
Normal file
6
Harmonia.WinUI/Session/NavigationSession.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Harmonia.WinUI.Session;
|
||||||
|
|
||||||
|
public partial class NavigationSession
|
||||||
|
{
|
||||||
|
public string? CurrentPage { get; set; }
|
||||||
|
}
|
||||||
6
Harmonia.WinUI/Session/PlaylistSession.cs
Normal file
6
Harmonia.WinUI/Session/PlaylistSession.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Harmonia.WinUI.Session;
|
||||||
|
|
||||||
|
public partial class PlaylistSession
|
||||||
|
{
|
||||||
|
public string? OpenPlaylistUID { get; set; }
|
||||||
|
}
|
||||||
6
Harmonia.WinUI/Session/WindowSession.cs
Normal file
6
Harmonia.WinUI/Session/WindowSession.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Harmonia.WinUI.Session;
|
||||||
|
|
||||||
|
public partial class WindowSession
|
||||||
|
{
|
||||||
|
public bool IsMaximized { get; set; }
|
||||||
|
}
|
||||||
8
Harmonia.WinUI/ViewModels/ViewModelBase.cs
Normal file
8
Harmonia.WinUI/ViewModels/ViewModelBase.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
|
namespace Harmonia.WinUI.ViewModels;
|
||||||
|
|
||||||
|
public partial class ViewModelBase : ObservableObject
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user