feat(bookmark): ゲームのお気に入り(ブックマーク)登録機能および優先ソート・フィルターを追加
- GameItemBase に IsBookmarked プロパティおよび関連バインディング項目を追加 - 一覧カード内星アイコン、詳細ヘッダーボタン、右クリックコンテキストメニューからブックマーク切替可能に - ソート順に「★ ブックマーク優先」を追加し、サブフィルターに「★ ブックマークのみ」絞り込みを追加 - キャッシュ保存(UnifiedGameCacheEntry)にブックマーク状態を永続化し次回起動時も保持 - ステータスバーにブックマーク登録件数の集計表示を追加
This commit is contained in:
1 parent
59519208f3
commit
c0989362a9
6 files changed
+123
-8
No files matched your search
@@ -22,6 +22,7 @@ namespace GameLauncher.Models
|
||||
private ImageSource? _iconImage;
|
||||
private DateTime? _lastLaunched;
|
||||
private DateTime? _folderLastModified;
|
||||
private bool _isBookmarked;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
@@ -99,6 +100,31 @@ namespace GameLauncher.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>ユーザーによるブックマーク登録状態</summary>
|
||||
public bool IsBookmarked
|
||||
{
|
||||
get => this._isBookmarked;
|
||||
set
|
||||
{
|
||||
if (this._isBookmarked != value)
|
||||
{
|
||||
this._isBookmarked = value;
|
||||
this.OnPropertyChanged();
|
||||
this.OnPropertyChanged(nameof(this.BookmarkIcon));
|
||||
this.OnPropertyChanged(nameof(this.BookmarkTooltip));
|
||||
this.OnPropertyChanged(nameof(this.BookmarkButtonText));
|
||||
this.OnPropertyChanged(nameof(this.BookmarkBrush));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string BookmarkIcon => this._isBookmarked ? "★" : "☆";
|
||||
public string BookmarkTooltip => this._isBookmarked ? "ブックマーク解除" : "ブックマークに追加";
|
||||
public string BookmarkButtonText => this._isBookmarked ? "★ ブックマーク中" : "☆ ブックマーク";
|
||||
public Brush BookmarkBrush => this._isBookmarked
|
||||
? new SolidColorBrush(Color.FromRgb(0xFD, 0xCB, 0x6E))
|
||||
: new SolidColorBrush(Color.FromArgb(0x88, 0xAA, 0xAA, 0xBB));
|
||||
|
||||
/// <summary>ゲームエンジンの種別</summary>
|
||||
public abstract GameEngineKind EngineKind { get; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user