mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2026-11-25 04:17:46 +08:00
feat: Added a settings page.
This commit is contained in:
1 parent
5ccd8a7c53
commit
4f15d06e63
14 files changed
+201
-46
No files matched your search
@@ -1,11 +1,12 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using ReactiveUI;
|
||||
using ZonyLrcTools.Common;
|
||||
|
||||
namespace ZonyLrcTools.Desktop.ViewModels;
|
||||
|
||||
public class HomeViewModel : ViewModelBase
|
||||
{
|
||||
public ObservableCollection<SongInfo> Songs { get; } = [];
|
||||
public ObservableCollection<SongInfoViewModel> Songs { get; } = [];
|
||||
|
||||
private double _downloadProgress;
|
||||
|
||||
@@ -16,10 +17,20 @@ public class HomeViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
public class SongInfo
|
||||
public class SongInfoViewModel(MusicInfo info)
|
||||
{
|
||||
public string SongName { get; set; }
|
||||
public string ArtistName { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
public string DownloadStatus { get; set; }
|
||||
private MusicInfo Info { get; } = info;
|
||||
|
||||
public string SongName => Info.Name;
|
||||
public string ArtistName => Info.Artist;
|
||||
public string FilePath => Info.FilePath;
|
||||
|
||||
public DownloadStatus DownloadStatus { get; set; } = DownloadStatus.NotStarted;
|
||||
}
|
||||
|
||||
public enum DownloadStatus
|
||||
{
|
||||
NotStarted = 1,
|
||||
Completed,
|
||||
Failed
|
||||
}
|
||||
@@ -20,6 +20,8 @@ public class LyricsSettingsViewModel : ViewModelBase
|
||||
BrowseBlockWordFileCommand = ReactiveCommand.Create(BrowseBlockWordFile);
|
||||
}
|
||||
|
||||
public static string Version => typeof(Program).Assembly.GetName().Version!.ToString();
|
||||
|
||||
public TagInfoViewModel Tag { get; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> BrowseBlockWordFileCommand { get; }
|
||||
|
||||
Reference in new issue
Block a user