chores: remove unused files

This commit is contained in:
Zhe Fang
2026-01-07 21:03:16 -05:00
parent 3bf0fbef5f
commit efc175668e
11 changed files with 11 additions and 97 deletions

View File

@@ -1,14 +0,0 @@
// 2025/6/23 by Zhe Fang
namespace BetterLyrics.WinUI3.Enums
{
public enum Language
{
FollowSystem,
English,
SimplifiedChinese,
TraditionalChinese,
Japanese,
Korean,
}
}

View File

@@ -1,10 +0,0 @@
// 2025/6/23 by Zhe Fang
namespace BetterLyrics.WinUI3.Enums
{
public enum LocalSearchTargetProps
{
LyricsOnly,
LyricsAndAlbumArt,
}
}

View File

@@ -1,8 +0,0 @@
namespace BetterLyrics.WinUI3.Enums
{
public enum SettingsStoreType
{
Container,
JSON
}
}

View File

@@ -1,6 +1,6 @@
namespace BetterLyrics.WinUI3.Enums namespace BetterLyrics.WinUI3.Enums
{ {
public enum ShortcutID public enum ShortcutId
{ {
LyricsWindowShowOrHide, LyricsWindowShowOrHide,
LyricsWindowSwitch, LyricsWindowSwitch,

View File

@@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using Windows.Graphics.Imaging;
using Windows.UI;
namespace BetterLyrics.WinUI3.Events
{
public class AlbumArtChangedEventArgs(SoftwareBitmap? albumArtSwBitmap, List<Color> albumArtLightAccentColors, List<Color> albumArtDarkAccentColors) : EventArgs
{
public SoftwareBitmap? AlbumArtSwBitmap { get; set; } = albumArtSwBitmap;
public List<Color> AlbumArtLightAccentColors { get; set; } = albumArtLightAccentColors;
public List<Color> AlbumArtDarkAccentColors { get; set; } = albumArtDarkAccentColors;
}
}

View File

@@ -1,14 +0,0 @@
// 2025/6/23 by Zhe Fang
using System;
using System.IO;
namespace BetterLyrics.WinUI3.Events
{
public class LibChangedEventArgs(string folder, string filePath, WatcherChangeTypes changeType) : EventArgs
{
public WatcherChangeTypes ChangeType { get; } = changeType;
public string FilePath { get; } = filePath;
public string Folder { get; } = folder;
}
}

View File

@@ -1,10 +0,0 @@
using BetterLyrics.WinUI3.Models.Lyrics;
using System;
namespace BetterLyrics.WinUI3.Events
{
public class LyricsChangedEventArgs(LyricsData? lyricsData) : EventArgs
{
public LyricsData? LyricsData { get; } = lyricsData;
}
}

View File

@@ -1,11 +0,0 @@
using BetterLyrics.WinUI3.Models.Settings;
using System;
using System.Collections.Generic;
namespace BetterLyrics.WinUI3.Events
{
public class MediaSourceProvidersInfoEventArgs(List<MediaSourceProviderInfo> sessionIds) : EventArgs
{
public List<MediaSourceProviderInfo> MediaSourceProviersInfo { get; set; } = sessionIds;
}
}

View File

@@ -20,7 +20,7 @@ namespace BetterLyrics.WinUI3.Hooks
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="keys"></param> /// <param name="keys"></param>
/// <param name="action"></param> /// <param name="action"></param>
private static void RegisterHotKey(Window window, ShortcutID id, List<string> keys, Action action) private static void RegisterHotKey(Window window, ShortcutId id, List<string> keys, Action action)
{ {
if (keys.Count == 0) return; if (keys.Count == 0) return;
@@ -58,7 +58,7 @@ namespace BetterLyrics.WinUI3.Hooks
} }
} }
private static void UnregisterHotKey(Window window, ShortcutID id) private static void UnregisterHotKey(Window window, ShortcutId id)
{ {
HWND hwnd = WindowNative.GetWindowHandle(window); HWND hwnd = WindowNative.GetWindowHandle(window);
User32.UnregisterHotKey(hwnd, (int)id); User32.UnregisterHotKey(hwnd, (int)id);
@@ -66,13 +66,13 @@ namespace BetterLyrics.WinUI3.Hooks
_keys.Remove((int)id); _keys.Remove((int)id);
} }
public static void UpdateHotKey(Window window, ShortcutID id, List<string> keys, Action action) public static void UpdateHotKey(Window window, ShortcutId id, List<string> keys, Action action)
{ {
UnregisterHotKey(window, id); UnregisterHotKey(window, id);
RegisterHotKey(window, id, keys, action); RegisterHotKey(window, id, keys, action);
} }
public static bool IsHotKeyRegistered(ShortcutID id) public static bool IsHotKeyRegistered(ShortcutId id)
{ {
return _actions.ContainsKey((int)id); return _actions.ContainsKey((int)id);
} }
@@ -82,7 +82,7 @@ namespace BetterLyrics.WinUI3.Hooks
return _keys.ContainsValue(keys); return _keys.ContainsValue(keys);
} }
public static bool TryInvokeAction(ShortcutID id) public static bool TryInvokeAction(ShortcutId id)
{ {
return TryInvokeAction((int)id); return TryInvokeAction((int)id);
} }

View File

@@ -96,11 +96,6 @@ namespace BetterLyrics.WinUI3.ViewModels
LastFMUser = e.User; LastFMUser = e.User;
} }
private void MediaSessionsService_SessionIdsChanged(object? sender, Events.MediaSourceProvidersInfoEventArgs e)
{
SelectedMediaSourceProvider = AppSettings.MediaSourceProvidersInfo.FirstOrDefault();
}
[RelayCommand] [RelayCommand]
private void LibreTranslateServerTest() private void LibreTranslateServerTest()
{ {

View File

@@ -79,7 +79,7 @@ public sealed partial class SystemTrayWindow : Window, IRecipient<PropertyChange
private void UpdateLyricsWindowSwitchShortcut() private void UpdateLyricsWindowSwitchShortcut()
{ {
GlobalHotKeyHook.UpdateHotKey(this, ShortcutID.LyricsWindowSwitch, GlobalHotKeyHook.UpdateHotKey(this, ShortcutId.LyricsWindowSwitch,
_settingsService.AppSettings.GeneralSettings.LyricsWindowSwitchShortcut, _settingsService.AppSettings.GeneralSettings.LyricsWindowSwitchShortcut,
() => () =>
{ {
@@ -90,7 +90,7 @@ public sealed partial class SystemTrayWindow : Window, IRecipient<PropertyChange
private void UpdatePlayOrPauseSongShortcut() private void UpdatePlayOrPauseSongShortcut()
{ {
GlobalHotKeyHook.UpdateHotKey(this, ShortcutID.PlayOrPauseSong, _settingsService.AppSettings.GeneralSettings.PlayOrPauseShortcut, (() => GlobalHotKeyHook.UpdateHotKey(this, ShortcutId.PlayOrPauseSong, _settingsService.AppSettings.GeneralSettings.PlayOrPauseShortcut, (() =>
{ {
if (_gsmtcService.CurrentIsPlaying) if (_gsmtcService.CurrentIsPlaying)
{ {
@@ -105,7 +105,7 @@ public sealed partial class SystemTrayWindow : Window, IRecipient<PropertyChange
private void UpdatePreviousSongShortcut() private void UpdatePreviousSongShortcut()
{ {
GlobalHotKeyHook.UpdateHotKey(this, ShortcutID.PreviousSong, _settingsService.AppSettings.GeneralSettings.PreviousSongShortcut, () => GlobalHotKeyHook.UpdateHotKey(this, ShortcutId.PreviousSong, _settingsService.AppSettings.GeneralSettings.PreviousSongShortcut, () =>
{ {
_ = _gsmtcService.PreviousAsync(); _ = _gsmtcService.PreviousAsync();
}); });
@@ -113,7 +113,7 @@ public sealed partial class SystemTrayWindow : Window, IRecipient<PropertyChange
private void UpdateNextSongShortcut() private void UpdateNextSongShortcut()
{ {
GlobalHotKeyHook.UpdateHotKey(this, ShortcutID.NextSong, _settingsService.AppSettings.GeneralSettings.NextSongShortcut, () => GlobalHotKeyHook.UpdateHotKey(this, ShortcutId.NextSong, _settingsService.AppSettings.GeneralSettings.NextSongShortcut, () =>
{ {
_ = _gsmtcService.NextAsync(); _ = _gsmtcService.NextAsync();
}); });
@@ -121,7 +121,7 @@ public sealed partial class SystemTrayWindow : Window, IRecipient<PropertyChange
private void UpdateLyricsWindowShowHideShortcut() private void UpdateLyricsWindowShowHideShortcut()
{ {
GlobalHotKeyHook.UpdateHotKey(this, ShortcutID.LyricsWindowShowOrHide, GlobalHotKeyHook.UpdateHotKey(this, ShortcutId.LyricsWindowShowOrHide,
_settingsService.AppSettings.GeneralSettings.ShowOrHideLyricsWindowShortcut, _settingsService.AppSettings.GeneralSettings.ShowOrHideLyricsWindowShortcut,
() => () =>
{ {