refactor: reorganize engine-based structure and add agent rules
- Engines/ 配下へエンジン別に再編 (Common/Rgss/Tkool/Tyrano/Wolf/Unity/Nwjs) - ゲーム個別処理を Engines/<Engine>/Games/<GameName>/ へ分離し、共通処理から明示呼び出し - 外部ツールを Engines/<Engine>/Tools/ へ移動し、AppPathHelper 経由で解決 - 旧 Tools/ 直下参照と不要な参照ファイル/バックアップを削除 - エージェント規則 AGENTS.md を追加し、README から参照 - publish.ps1 を Engines/<Engine>/Tools/ の再帰配置に対応
This commit is contained in:
1 parent
0d11039ee9
commit
8cea2a147d
47 files changed
+2976
-176
No files matched your search
@@ -4,6 +4,8 @@ using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using GameLauncher.Engines.Tkool;
|
||||
using GameLauncher.Engines.Unity;
|
||||
|
||||
namespace GameLauncher.Models
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using GameLauncher.Engines.Tkool;
|
||||
using GameLauncher.Engines.Unity;
|
||||
|
||||
namespace GameLauncher.Models
|
||||
{
|
||||
@@ -29,6 +31,9 @@ namespace GameLauncher.Models
|
||||
/// <summary>Wolf RPG アーカイブ解凍ツールの実行ファイルパス(UberWolfCli.exe / WolfDec.exe など)</summary>
|
||||
public string WolfExtractorPath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>ウィンドウ拡大用の外部ツール実行ファイルパス(Sizer等。空の場合はランチャー内蔵のWin32 API方式を使用)</summary>
|
||||
public string WindowResizeToolPath { get; set; } = string.Empty;
|
||||
|
||||
// フィルター状態の保存(再起動時復元用)
|
||||
public string TkoolEngineFilter { get; set; } = "All";
|
||||
public bool TkoolFilterModdedOnly { get; set; }
|
||||
|
||||
@@ -1,652 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace GameLauncher.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 各プラグイン改造の個別有効/無効オプション(互換用)
|
||||
/// </summary>
|
||||
public class ModPluginOptions : System.ComponentModel.INotifyPropertyChanged
|
||||
{
|
||||
private bool _speedUp = true;
|
||||
private bool _antigravityGameTweaks = true;
|
||||
private bool _dropItem99 = true;
|
||||
private bool _turnStartFullRecover = true;
|
||||
private bool _turnStartFullRecoverHp = true;
|
||||
private bool _turnStartFullRecoverMp = true;
|
||||
private bool _turnStartFullRecoverTp = true;
|
||||
private bool _maxGainGold = true;
|
||||
private bool _maxGainExp = true;
|
||||
private bool _instantMessage = true;
|
||||
|
||||
public bool SpeedUp
|
||||
{
|
||||
get => _speedUp;
|
||||
set { if (_speedUp != value) { _speedUp = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool AntigravityGameTweaks
|
||||
{
|
||||
get => _antigravityGameTweaks;
|
||||
set { if (_antigravityGameTweaks != value) { _antigravityGameTweaks = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool DropItem99
|
||||
{
|
||||
get => _dropItem99;
|
||||
set { if (_dropItem99 != value) { _dropItem99 = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool TurnStartFullRecover
|
||||
{
|
||||
get => _turnStartFullRecover;
|
||||
set { if (_turnStartFullRecover != value) { _turnStartFullRecover = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool TurnStartFullRecoverHp
|
||||
{
|
||||
get => _turnStartFullRecoverHp;
|
||||
set { if (_turnStartFullRecoverHp != value) { _turnStartFullRecoverHp = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool TurnStartFullRecoverMp
|
||||
{
|
||||
get => _turnStartFullRecoverMp;
|
||||
set { if (_turnStartFullRecoverMp != value) { _turnStartFullRecoverMp = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool TurnStartFullRecoverTp
|
||||
{
|
||||
get => _turnStartFullRecoverTp;
|
||||
set { if (_turnStartFullRecoverTp != value) { _turnStartFullRecoverTp = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool MaxGainGold
|
||||
{
|
||||
get => _maxGainGold;
|
||||
set { if (_maxGainGold != value) { _maxGainGold = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool MaxGainExp
|
||||
{
|
||||
get => _maxGainExp;
|
||||
set { if (_maxGainExp != value) { _maxGainExp = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool InstantMessage
|
||||
{
|
||||
get => _instantMessage;
|
||||
set { if (_instantMessage != value) { _instantMessage = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged;
|
||||
protected void OnPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string? name = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs(name));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ツクールおよびティラノスクリプトゲームのデータモデル
|
||||
/// </summary>
|
||||
public class TkoolGameItem : GameItemBase
|
||||
{
|
||||
private string _pluginsJsPath = string.Empty;
|
||||
private string _pluginsDirPath = string.Empty;
|
||||
private TkoolEngineType _engineType = TkoolEngineType.Unknown;
|
||||
private bool _isModded;
|
||||
private bool _applyMod = true;
|
||||
private bool _hasCustomApplyMod;
|
||||
private bool _isInitializingApplyMod;
|
||||
private ModPluginOptions _modOptions = new();
|
||||
|
||||
// app.asar 関連プロパティ
|
||||
private bool _isAsar;
|
||||
private bool _isAsarExtracted;
|
||||
private string? _asarPath;
|
||||
private string? _asarExtractedDirPath;
|
||||
private string? _relativePluginsJsInAsar;
|
||||
|
||||
public override GameEngineKind EngineKind => EngineType switch
|
||||
{
|
||||
TkoolEngineType.Tyrano => GameEngineKind.Tyrano,
|
||||
TkoolEngineType.Wolf => GameEngineKind.Wolf,
|
||||
TkoolEngineType.SrpgStudio => GameEngineKind.SrpgStudio,
|
||||
_ => GameEngineKind.Tkool
|
||||
};
|
||||
|
||||
public string PluginsJsPath
|
||||
{
|
||||
get => _pluginsJsPath;
|
||||
set { if (_pluginsJsPath != value) { _pluginsJsPath = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public string PluginsDirPath
|
||||
{
|
||||
get => _pluginsDirPath;
|
||||
set { if (_pluginsDirPath != value) { _pluginsDirPath = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public override bool IsMV => EngineType == TkoolEngineType.MV;
|
||||
public override bool IsMZ => EngineType == TkoolEngineType.MZ;
|
||||
public override bool IsTyrano => EngineType == TkoolEngineType.Tyrano;
|
||||
public override bool IsVX => EngineType == TkoolEngineType.VX;
|
||||
public override bool IsVXAce => EngineType == TkoolEngineType.VXAce;
|
||||
public override bool IsWolf => EngineType == TkoolEngineType.Wolf;
|
||||
public override bool IsSrpgStudio => EngineType == TkoolEngineType.SrpgStudio;
|
||||
public override bool IsRgss => EngineType is TkoolEngineType.VX or TkoolEngineType.VXAce;
|
||||
|
||||
/// <summary>
|
||||
/// 「プリンセスシナジー」(ツクールMZ製・専用改造対象ゲーム)かどうか。
|
||||
/// タイトルまたはフォルダ名に "プリンセスシナジー" を含み、エンジンがMZの場合のみ true。
|
||||
/// これにより当該機能が他ゲームに表示・適用されるのを防ぎます。
|
||||
/// </summary>
|
||||
public override bool IsPrincessSynergy =>
|
||||
!string.IsNullOrEmpty(Title) && Title.Contains("プリンセスシナジー");
|
||||
|
||||
// SRPG Studio アーカイブ関連プロパティ
|
||||
private bool _hasSrpgArchive;
|
||||
private bool _isSrpgExtracted;
|
||||
private string? _srpgArchivePath;
|
||||
|
||||
public override bool HasSrpgArchive
|
||||
{
|
||||
get => _hasSrpgArchive;
|
||||
set
|
||||
{
|
||||
if (_hasSrpgArchive != value)
|
||||
{
|
||||
_hasSrpgArchive = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(SrpgBadgeVisibility));
|
||||
OnPropertyChanged(nameof(SrpgBadgeText));
|
||||
OnPropertyChanged(nameof(SrpgBadgeBackground));
|
||||
OnPropertyChanged(nameof(SrpgDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsSrpgExtracted
|
||||
{
|
||||
get => _isSrpgExtracted;
|
||||
set
|
||||
{
|
||||
if (_isSrpgExtracted != value)
|
||||
{
|
||||
_isSrpgExtracted = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(SrpgBadgeText));
|
||||
OnPropertyChanged(nameof(SrpgBadgeBackground));
|
||||
OnPropertyChanged(nameof(SrpgDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string? SrpgArchivePath
|
||||
{
|
||||
get => _srpgArchivePath;
|
||||
set { if (_srpgArchivePath != value) { _srpgArchivePath = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public override Visibility SrpgBadgeVisibility => HasSrpgArchive ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
public override string SrpgBadgeText => !HasSrpgArchive ? string.Empty : (IsSrpgExtracted ? "SRPG (抽出済)" : "SRPG (暗号化)");
|
||||
|
||||
public override Brush SrpgBadgeBackground => IsSrpgExtracted
|
||||
? new SolidColorBrush(Color.FromRgb(0x00, 0x89, 0x7B))
|
||||
: new SolidColorBrush(Color.FromRgb(0x09, 0x84, 0xE3));
|
||||
|
||||
public override string SrpgDetailStatusText => !HasSrpgArchive
|
||||
? string.Empty
|
||||
: (IsSrpgExtracted ? "📦 SRPGアーカイブ(スクリプト/リソース抽出済み・改造可能)" : "🔒 SRPG暗号化アーカイブ(ボタンで抽出・改造・再構築可能)");
|
||||
|
||||
// RGSS (VX / VX Ace) アーカイブ関連プロパティ
|
||||
private bool _hasRgssArchive;
|
||||
private bool _isRgssExtracted;
|
||||
private string? _rgssArchivePath;
|
||||
|
||||
public override bool HasRgssArchive
|
||||
{
|
||||
get => _hasRgssArchive;
|
||||
set
|
||||
{
|
||||
if (_hasRgssArchive != value)
|
||||
{
|
||||
_hasRgssArchive = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(RgssBadgeVisibility));
|
||||
OnPropertyChanged(nameof(RgssBadgeText));
|
||||
OnPropertyChanged(nameof(RgssBadgeBackground));
|
||||
OnPropertyChanged(nameof(RgssDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsRgssExtracted
|
||||
{
|
||||
get => _isRgssExtracted;
|
||||
set
|
||||
{
|
||||
if (_isRgssExtracted != value)
|
||||
{
|
||||
_isRgssExtracted = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(RgssBadgeText));
|
||||
OnPropertyChanged(nameof(RgssBadgeBackground));
|
||||
OnPropertyChanged(nameof(RgssDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string? RgssArchivePath
|
||||
{
|
||||
get => _rgssArchivePath;
|
||||
set { if (_rgssArchivePath != value) { _rgssArchivePath = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public override Visibility RgssBadgeVisibility => HasRgssArchive ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
public override string RgssBadgeText => !HasRgssArchive ? string.Empty : (IsRgssExtracted ? "RGSS (抽出済)" : "RGSS (暗号化)");
|
||||
|
||||
public override Brush RgssBadgeBackground => IsRgssExtracted
|
||||
? new SolidColorBrush(Color.FromRgb(0x00, 0x89, 0x7B))
|
||||
: new SolidColorBrush(Color.FromRgb(0xD3, 0x54, 0x00));
|
||||
|
||||
public override string RgssDetailStatusText => !HasRgssArchive
|
||||
? string.Empty
|
||||
: (IsRgssExtracted ? "📦 RGSSアーカイブ(スクリプト抽出済み・改造可能)" : "🔒 RGSS暗号化アーカイブ(起動時またはボタンでスクリプト抽出可能)");
|
||||
|
||||
public TkoolEngineType EngineType
|
||||
{
|
||||
get => _engineType;
|
||||
set
|
||||
{
|
||||
if (_engineType != value)
|
||||
{
|
||||
_engineType = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(EngineKind));
|
||||
OnPropertyChanged(nameof(EngineDisplayName));
|
||||
OnPropertyChanged(nameof(IsMV));
|
||||
OnPropertyChanged(nameof(IsMZ));
|
||||
OnPropertyChanged(nameof(IsTyrano));
|
||||
OnPropertyChanged(nameof(IsVX));
|
||||
OnPropertyChanged(nameof(IsVXAce));
|
||||
OnPropertyChanged(nameof(IsWolf));
|
||||
OnPropertyChanged(nameof(IsSrpgStudio));
|
||||
OnPropertyChanged(nameof(IsRgss));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ================= WOLF RPGエディター関連プロパティ =================
|
||||
private bool _wolfProxyDll = false;
|
||||
private double _wolfSpeedMultiplier = 3.0;
|
||||
private bool _hasWolfArchive = false;
|
||||
private bool _isWolfExtracted = false;
|
||||
|
||||
/// <summary>プロキシDLL(version.dll 倍速/メモリフック)を適用するか</summary>
|
||||
public bool WolfProxyDll
|
||||
{
|
||||
get => _wolfProxyDll;
|
||||
set { if (_wolfProxyDll != value) { _wolfProxyDll = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>プロキシDLLのスピード倍率</summary>
|
||||
public double WolfSpeedMultiplier
|
||||
{
|
||||
get => _wolfSpeedMultiplier;
|
||||
set { if (_wolfSpeedMultiplier != value) { _wolfSpeedMultiplier = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>Data.wolf アーカイブが存在するか</summary>
|
||||
public override bool HasWolfArchive
|
||||
{
|
||||
get => _hasWolfArchive;
|
||||
set
|
||||
{
|
||||
if (_hasWolfArchive != value)
|
||||
{
|
||||
_hasWolfArchive = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(WolfArchiveBadgeVisibility));
|
||||
OnPropertyChanged(nameof(WolfArchiveBadgeText));
|
||||
OnPropertyChanged(nameof(WolfArchiveBadgeBackground));
|
||||
OnPropertyChanged(nameof(WolfArchiveDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Data.wolf が解凍済み(Dataフォルダが存在)か</summary>
|
||||
public override bool IsWolfExtracted
|
||||
{
|
||||
get => _isWolfExtracted;
|
||||
set
|
||||
{
|
||||
if (_isWolfExtracted != value)
|
||||
{
|
||||
_isWolfExtracted = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(WolfArchiveBadgeVisibility));
|
||||
OnPropertyChanged(nameof(WolfArchiveBadgeText));
|
||||
OnPropertyChanged(nameof(WolfArchiveBadgeBackground));
|
||||
OnPropertyChanged(nameof(WolfArchiveDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility WolfArchiveBadgeVisibility => IsWolf && HasWolfArchive ? Visibility.Visible : Visibility.Collapsed;
|
||||
public string WolfArchiveBadgeText => IsWolfExtracted ? "Data解凍済" : "Data.wolf保護";
|
||||
public string WolfArchiveBadgeBackground => IsWolfExtracted ? "#00B894" : "#636E72";
|
||||
public string WolfArchiveDetailStatusText => IsWolfExtracted
|
||||
? "Data フォルダに解凍・抽出済みです。ウディタは Data フォルダのマップ・イベント・データベース等を優先して読み込みます。直接ファイルを改造できます。"
|
||||
: "Data.wolf アーカイブで暗号化・保護されています。下の「Data.wolf を解凍」を実行すると、全データを展開して直接編集・改造可能になります。";
|
||||
|
||||
// ================= SRPG Studio関連プロパティ =================
|
||||
private bool _srpgProxyDll = false;
|
||||
private double _srpgSpeedMultiplier = 3.0;
|
||||
|
||||
/// <summary>SRPG Studio プロキシDLL(version.dll 倍速機能)を適用するか</summary>
|
||||
public bool SrpgProxyDll
|
||||
{
|
||||
get => _srpgProxyDll;
|
||||
set { if (_srpgProxyDll != value) { _srpgProxyDll = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>SRPG Studio プロキシDLLのスピード倍率</summary>
|
||||
public double SrpgSpeedMultiplier
|
||||
{
|
||||
get => _srpgSpeedMultiplier;
|
||||
set { if (_srpgSpeedMultiplier != value) { _srpgSpeedMultiplier = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>SRPG Studio プラグイン改造オプション(PluginOptionsのエイリアス)</summary>
|
||||
public ObservableCollection<ModPluginOptionItem> SrpgModOptions => PluginOptions;
|
||||
|
||||
public override bool IsModded
|
||||
{
|
||||
get => _isModded;
|
||||
set { if (_isModded != value) { _isModded = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public bool HasCustomApplyMod
|
||||
{
|
||||
get => _hasCustomApplyMod;
|
||||
set { if (_hasCustomApplyMod != value) { _hasCustomApplyMod = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public override bool ApplyMod
|
||||
{
|
||||
get => _applyMod;
|
||||
set
|
||||
{
|
||||
if (_applyMod != value)
|
||||
{
|
||||
_applyMod = value;
|
||||
if (!_isInitializingApplyMod)
|
||||
{
|
||||
HasCustomApplyMod = true;
|
||||
}
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDefaultApplyMod(bool defaultVal)
|
||||
{
|
||||
if (!_hasCustomApplyMod)
|
||||
{
|
||||
_isInitializingApplyMod = true;
|
||||
_applyMod = defaultVal;
|
||||
_isInitializingApplyMod = false;
|
||||
OnPropertyChanged(nameof(ApplyMod));
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsAsar
|
||||
{
|
||||
get => _isAsar;
|
||||
set
|
||||
{
|
||||
if (_isAsar != value)
|
||||
{
|
||||
_isAsar = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(AsarBadgeVisibility));
|
||||
OnPropertyChanged(nameof(AsarBadgeText));
|
||||
OnPropertyChanged(nameof(AsarBadgeBackground));
|
||||
OnPropertyChanged(nameof(AsarDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsAsarExtracted
|
||||
{
|
||||
get => _isAsarExtracted;
|
||||
set
|
||||
{
|
||||
if (_isAsarExtracted != value)
|
||||
{
|
||||
_isAsarExtracted = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(AsarBadgeText));
|
||||
OnPropertyChanged(nameof(AsarBadgeBackground));
|
||||
OnPropertyChanged(nameof(AsarDetailStatusText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string? AsarPath
|
||||
{
|
||||
get => _asarPath;
|
||||
set { if (_asarPath != value) { _asarPath = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public string? AsarExtractedDirPath
|
||||
{
|
||||
get => _asarExtractedDirPath;
|
||||
set { if (_asarExtractedDirPath != value) { _asarExtractedDirPath = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public string? RelativePluginsJsInAsar
|
||||
{
|
||||
get => _relativePluginsJsInAsar;
|
||||
set { if (_relativePluginsJsInAsar != value) { _relativePluginsJsInAsar = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public override Visibility AsarBadgeVisibility => IsAsar ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
public override string AsarBadgeText => !IsAsar ? string.Empty : (IsAsarExtracted ? "ASAR (解凍済)" : "ASAR (圧縮)");
|
||||
|
||||
public override Brush AsarBadgeBackground => IsAsarExtracted
|
||||
? new SolidColorBrush(Color.FromRgb(0x00, 0x89, 0x7B))
|
||||
: new SolidColorBrush(Color.FromRgb(0x5E, 0x35, 0xB1));
|
||||
|
||||
public override string AsarDetailStatusText => !IsAsar
|
||||
? string.Empty
|
||||
: (IsAsarExtracted ? "📦 app.asar 形式(解凍済み・改造可能)" : "📦 app.asar 形式(圧縮中・起動時またはボタンで解凍可能)");
|
||||
|
||||
private Dictionary<string, bool> _pluginSettings = new(StringComparer.OrdinalIgnoreCase);
|
||||
private ObservableCollection<ModPluginOptionItem> _pluginOptions = [];
|
||||
|
||||
public Dictionary<string, bool> PluginSettings
|
||||
{
|
||||
get => _pluginSettings;
|
||||
set { if (_pluginSettings != value) { _pluginSettings = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public override ObservableCollection<ModPluginOptionItem> PluginOptions
|
||||
{
|
||||
get => _pluginOptions;
|
||||
set { if (_pluginOptions != value) { _pluginOptions = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// プリンセスシナジー専用: HP常時MAX(プラグイン "AlwaysMaxHp")の有効状態。
|
||||
/// PluginSettings に直接マッピングされ、既存の改造適用パイプラインで反映されます。
|
||||
/// </summary>
|
||||
public bool PrincessAlwaysMaxHp
|
||||
{
|
||||
get => IsPluginEnabled("AlwaysMaxHp", fallbackVal: false);
|
||||
set => SetPrincessPluginSetting("AlwaysMaxHp", value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// プリンセスシナジー専用: MP常時MAX(プラグイン "AlwaysMaxMp")の有効状態。
|
||||
/// </summary>
|
||||
public bool PrincessAlwaysMaxMp
|
||||
{
|
||||
get => IsPluginEnabled("AlwaysMaxMp", fallbackVal: false);
|
||||
set => SetPrincessPluginSetting("AlwaysMaxMp", value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// プラグイン設定を更新し、関連プロパティの変更通知を発行します。
|
||||
/// </summary>
|
||||
private void SetPrincessPluginSetting(string pluginId, bool value)
|
||||
{
|
||||
if (_pluginSettings.TryGetValue(pluginId, out var cur) && cur == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_pluginSettings[pluginId] = value;
|
||||
OnPropertyChanged(pluginId == "AlwaysMaxHp" ? nameof(PrincessAlwaysMaxHp) : nameof(PrincessAlwaysMaxMp));
|
||||
// 連動して独自の改造設定であることを示す
|
||||
HasCustomApplyMod = true;
|
||||
}
|
||||
|
||||
public bool IsPluginEnabled(string pluginId, Dictionary<string, bool>? defaultSettings = null, bool fallbackVal = true)
|
||||
{
|
||||
if (_pluginSettings.TryGetValue(pluginId, out var val))
|
||||
{
|
||||
return val;
|
||||
}
|
||||
|
||||
if (pluginId is "BattleTurnRecoverHp" or "BattleTurnRecoverMp" or "BattleTurnRecoverTp")
|
||||
{
|
||||
if (_pluginSettings.TryGetValue("BattleTurnRecover", out var legacyVal))
|
||||
{
|
||||
return legacyVal;
|
||||
}
|
||||
}
|
||||
|
||||
if (defaultSettings != null && defaultSettings.TryGetValue(pluginId, out var defVal))
|
||||
{
|
||||
return defVal;
|
||||
}
|
||||
|
||||
if (pluginId is "BattleTurnRecoverHp" or "BattleTurnRecoverMp" or "BattleTurnRecoverTp")
|
||||
{
|
||||
if (defaultSettings != null && defaultSettings.TryGetValue("BattleTurnRecover", out var legacyDefVal))
|
||||
{
|
||||
return legacyDefVal;
|
||||
}
|
||||
}
|
||||
|
||||
return fallbackVal;
|
||||
}
|
||||
|
||||
public static readonly ModPluginDefinition[] DefaultTyranoPlugins =
|
||||
[
|
||||
new() { Id = "TyranoUnlockAllCg", Name = "🔓 全CG・全回想の全開放", Description = "システム変数(sf)のCG・回想フラグを全開放し、最初からCG・シーン鑑賞を可能にします。" },
|
||||
new() { Id = "TyranoFastMessage", Name = "⚡ メッセージ超高速化・演出ウェイト短縮", Description = "文字送り速度を最大化し、[wait]演出の停止時間を短縮して快適にスキップ可能にします。" },
|
||||
new() { Id = "TyranoDevTools", Name = "🛠 開発者ツール (F12) の有効化", Description = "F12キーでブラウザ・アプリの開発者ツールコンソールを開けるようにします。" },
|
||||
new() { Id = "TyranoCheatMenu", Name = "🎛 画面上変数(f)チートエディタ表示", Description = "画面右上にボタンを配置し、ゲーム内変数・フラグの閲覧と直接書き換えができるメニューを表示します。" }
|
||||
];
|
||||
|
||||
/// <summary>ツクールVX / VX Ace用スクリプト改造定義一覧</summary>
|
||||
public static readonly ModPluginDefinition[] DefaultRgssPlugins =
|
||||
[
|
||||
new() { Id = "RgssDashSpeedUp", Name = "⚡ 移動速度高速化&常時オートダッシュ", Description = "キャラクターの移動速度を高速化し、Shiftキーを押さなくても常時ダッシュ状態にします。" },
|
||||
new() { Id = "RgssItemGainMax", Name = "🎁 アイテム入手時 99個固定化", Description = "宝箱・イベント・戦闘等で通常アイテムを入手した際、入手個数を99個にします。" },
|
||||
new() { Id = "RgssItemNoConsume", Name = "♾️ アイテム消費なし", Description = "アイテムを使用しても所持個数を減少しないようにします。" },
|
||||
new() { Id = "RgssGoldGainMax", Name = "💰 獲得ゴールド最大化 (999,999G)", Description = "戦闘勝利時の獲得ゴールドを999,999Gにします。" },
|
||||
new() { Id = "RgssExpGainMax", Name = "📈 獲得経験値最大化 (999,999Exp)", Description = "戦闘勝利時の獲得経験値を999,999Expにします。" },
|
||||
new() { Id = "RgssBattleTurnRecoverHp", Name = "💖 ターン開始時 全回復 (HP)", Description = "戦闘中の毎ターン開始時にパーティ全員のHPを全回復します。" },
|
||||
new() { Id = "RgssBattleTurnRecoverMp", Name = "🔷 ターン開始時 全回復 (MP)", Description = "戦闘中の毎ターン開始時にパーティ全員のMPを全回復します。" },
|
||||
new() { Id = "RgssBattleTurnRecoverTp", Name = "⚡ ターン開始時 全回復 (TP)", Description = "戦闘中の毎ターン開始時にパーティ全員のTPを最大(100)にします。(VX Ace)" },
|
||||
new() { Id = "RgssMessageInstant", Name = "⏩ メッセージ瞬間表示・高速スキップ", Description = "会話ウィンドウの文字送りウェイトをカットし、瞬間表示します。" },
|
||||
new() { Id = "RgssCommandMemory", Name = "🧠 コマンド位置記憶 (ツクールMV風)", Description = "メニュー画面や戦闘中のアクターコマンドのカーソル選択位置を記憶して次回遷移時に復元します。" }
|
||||
];
|
||||
|
||||
/// <summary>SRPG Studio用スクリプト改造定義一覧</summary>
|
||||
public static readonly ModPluginDefinition[] DefaultSrpgPlugins =
|
||||
[
|
||||
new() { Id = "SrpgExpBoost", Name = "📈 獲得経験値最大化 (即LvUP / 100Exp固定)", Description = "戦闘やアイテム使用時の獲得経験値を最大(100Exp)にして毎回即座にレベルアップします。" },
|
||||
new() { Id = "SrpgMaxGold", Name = "💰 所持金最大化 (999,999G)", Description = "自軍ターン開始時および戦闘勝利時に所持金を常に最大(999,999G)に設定します。" },
|
||||
new() { Id = "SrpgInfDurability", Name = "♾️ 武器・アイテム耐久度無限", Description = "武器やアイテムを使用しても耐久度が減少しないようにします。" },
|
||||
new() { Id = "SrpgTurnRecoverHp", Name = "💖 自軍ターン開始時 全味方HP全回復", Description = "プレイヤーのターン開始時に生存している全味方ユニットのHPを満タンまで回復します。" },
|
||||
new() { Id = "SrpgMoveBoost", Name = "👟 味方移動力大幅強化 (+5)", Description = "自軍味方ユニットの基本移動力を+5加算し、広大なマップでも自在に行動できるようにします。" },
|
||||
new() { Id = "SrpgItemAllDrop", Name = "🎁 敵撃破時アイテム100%ドロップ", Description = "敵ユニットが所持しているドロップ可能アイテムのドロップ率を100%にします。" }
|
||||
];
|
||||
|
||||
public void SyncPluginOptions(IEnumerable<ModPluginDefinition> availablePlugins, Dictionary<string, bool>? defaultSettings = null)
|
||||
{
|
||||
_pluginOptions.Clear();
|
||||
if (EngineType == TkoolEngineType.Wolf)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IEnumerable<ModPluginDefinition> targetDefs;
|
||||
if (EngineType == TkoolEngineType.Tyrano)
|
||||
{
|
||||
targetDefs = DefaultTyranoPlugins;
|
||||
}
|
||||
else if (IsRgss)
|
||||
{
|
||||
targetDefs = DefaultRgssPlugins;
|
||||
}
|
||||
else if (IsSrpgStudio)
|
||||
{
|
||||
targetDefs = DefaultSrpgPlugins;
|
||||
}
|
||||
else
|
||||
{
|
||||
targetDefs = availablePlugins;
|
||||
}
|
||||
|
||||
foreach (var def in targetDefs)
|
||||
{
|
||||
bool isEnabled = IsPluginEnabled(def.Id, defaultSettings, fallbackVal: true);
|
||||
var item = new ModPluginOptionItem
|
||||
{
|
||||
Definition = def,
|
||||
IsEnabled = isEnabled
|
||||
};
|
||||
item.PropertyChanged += (s, e) =>
|
||||
{
|
||||
if (e.PropertyName == nameof(ModPluginOptionItem.IsEnabled))
|
||||
{
|
||||
_pluginSettings[def.Id] = item.IsEnabled;
|
||||
}
|
||||
};
|
||||
_pluginOptions.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public ModPluginOptions ModOptions
|
||||
{
|
||||
get => _modOptions;
|
||||
set { if (_modOptions != value) { _modOptions = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public string EngineDisplayName => EngineType switch
|
||||
{
|
||||
TkoolEngineType.MV => "RPGツクールMV",
|
||||
TkoolEngineType.MZ => "RPGツクールMZ",
|
||||
TkoolEngineType.Tyrano => "ティラノスクリプト",
|
||||
TkoolEngineType.VX => "RPGツクールVX",
|
||||
TkoolEngineType.VXAce => "RPGツクールVX Ace",
|
||||
TkoolEngineType.Wolf => "WOLF RPGエディター",
|
||||
TkoolEngineType.SrpgStudio => "SRPG Studio",
|
||||
_ => "ツクール/ティラノ"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
namespace GameLauncher.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// ゲームエンジンの大分類
|
||||
/// </summary>
|
||||
public enum GameEngineKind
|
||||
{
|
||||
Tkool,
|
||||
Tyrano,
|
||||
Unity,
|
||||
Wolf,
|
||||
SrpgStudio
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// エンジンの種類
|
||||
/// </summary>
|
||||
public enum TkoolEngineType
|
||||
{
|
||||
MV,
|
||||
MZ,
|
||||
Tyrano,
|
||||
VX,
|
||||
VXAce,
|
||||
Wolf,
|
||||
SrpgStudio,
|
||||
Unknown
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unityのビルドバックエンド形式
|
||||
/// </summary>
|
||||
public enum UnityBackendType
|
||||
{
|
||||
Unknown = 0,
|
||||
Mono = 1,
|
||||
IL2CPP = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ゲーム一覧のソート順
|
||||
/// </summary>
|
||||
public enum GameSortOrder
|
||||
{
|
||||
LastLaunchedDesc = 0, // 最終実行 (新しい順)
|
||||
LastLaunchedAsc = 1, // 最終実行 (古い順)
|
||||
FolderLastModifiedDesc = 2, // フォルダ更新日時 (新しい順)
|
||||
FolderLastModifiedAsc = 3, // フォルダ更新日時 (古い順)
|
||||
TitleAsc = 4, // タイトル (昇順)
|
||||
TitleDesc = 5, // タイトル (降順)
|
||||
FolderNameAsc = 6 // フォルダ名 (昇順)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// セーブデータの格納ソース種別
|
||||
/// </summary>
|
||||
public enum SaveSourceType
|
||||
{
|
||||
RegistryPlayerPrefs = 0,
|
||||
LocalLowFile = 1,
|
||||
GameFolderFile = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PlayerPrefs値のデータ型
|
||||
/// </summary>
|
||||
public enum PlayerPrefsType
|
||||
{
|
||||
Int = 0,
|
||||
Float = 1,
|
||||
String = 2,
|
||||
Binary = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// セーブデータコーデック種別
|
||||
/// </summary>
|
||||
public enum SaveCodecType
|
||||
{
|
||||
RawText = 0,
|
||||
Json = 1,
|
||||
EasySave3 = 2,
|
||||
YurisSave = 3,
|
||||
Binary = 4
|
||||
}
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace GameLauncher.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Unityゲームのデータモデル
|
||||
/// </summary>
|
||||
public class UnityGameItem : GameItemBase
|
||||
{
|
||||
private string _dataDirectoryPath = string.Empty;
|
||||
private string _companyName = string.Empty;
|
||||
private string _productName = string.Empty;
|
||||
private UnityBackendType _backendType = UnityBackendType.Unknown;
|
||||
private string _unityVersion = string.Empty;
|
||||
private bool _hasSaveData;
|
||||
|
||||
public override GameEngineKind EngineKind => GameEngineKind.Unity;
|
||||
|
||||
/// <summary>[Game]_Data ディレクトリ絶対パス</summary>
|
||||
public string DataDirectoryPath
|
||||
{
|
||||
get => _dataDirectoryPath;
|
||||
set { if (_dataDirectoryPath != value) { _dataDirectoryPath = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>app.info 由来の会社名/開発者名</summary>
|
||||
public string CompanyName
|
||||
{
|
||||
get => _companyName;
|
||||
set
|
||||
{
|
||||
if (_companyName != value)
|
||||
{
|
||||
_companyName = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(RegistryPath));
|
||||
OnPropertyChanged(nameof(LocalLowPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>app.info 由来の製品名</summary>
|
||||
public string ProductName
|
||||
{
|
||||
get => _productName;
|
||||
set
|
||||
{
|
||||
if (_productName != value)
|
||||
{
|
||||
_productName = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(RegistryPath));
|
||||
OnPropertyChanged(nameof(LocalLowPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsIL2CPP => BackendType == UnityBackendType.IL2CPP;
|
||||
public override bool IsMono => BackendType == UnityBackendType.Mono;
|
||||
|
||||
/// <summary>バックエンド形式 (IL2CPP / Mono)</summary>
|
||||
public UnityBackendType BackendType
|
||||
{
|
||||
get => _backendType;
|
||||
set
|
||||
{
|
||||
if (_backendType != value)
|
||||
{
|
||||
_backendType = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(BackendBadgeText));
|
||||
OnPropertyChanged(nameof(IsIL2CPP));
|
||||
OnPropertyChanged(nameof(IsMono));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Unityバージョン文字列</summary>
|
||||
public override string UnityVersion
|
||||
{
|
||||
get => _unityVersion;
|
||||
set { if (_unityVersion != value) { _unityVersion = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>セーブデータ(レジストリまたはファイル)が検出されたかどうか</summary>
|
||||
public override bool HasSaveData
|
||||
{
|
||||
get => _hasSaveData;
|
||||
set { if (_hasSaveData != value) { _hasSaveData = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// レジストリ (PlayerPrefs) のキーパス
|
||||
/// HKCU\Software\[CompanyName]\[ProductName]
|
||||
/// </summary>
|
||||
public override string RegistryPath
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(CompanyName) || string.IsNullOrEmpty(ProductName))
|
||||
return string.Empty;
|
||||
return $@"Software\{CompanyName}\{ProductName}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LocalLow のセーブデータ保存ディレクトリ
|
||||
/// %USERPROFILE%\AppData\LocalLow\[CompanyName]\[ProductName]
|
||||
/// </summary>
|
||||
public override string LocalLowPath
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(CompanyName) || string.IsNullOrEmpty(ProductName))
|
||||
return string.Empty;
|
||||
|
||||
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
var appData = Path.GetDirectoryName(localAppData);
|
||||
if (string.IsNullOrEmpty(appData)) return string.Empty;
|
||||
|
||||
return Path.Combine(appData, "LocalLow", CompanyName, ProductName);
|
||||
}
|
||||
}
|
||||
|
||||
public override string BackendBadgeText => BackendType switch
|
||||
{
|
||||
UnityBackendType.IL2CPP => "IL2CPP",
|
||||
UnityBackendType.Mono => "Mono",
|
||||
_ => "Unity"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace GameLauncher.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// PlayerPrefs(レジストリ)の1エントリを表すモデル
|
||||
/// </summary>
|
||||
public class PlayerPrefsEntry : INotifyPropertyChanged
|
||||
{
|
||||
private string _rawKey = string.Empty;
|
||||
private string _cleanKey = string.Empty;
|
||||
private PlayerPrefsType _type = PlayerPrefsType.Int;
|
||||
private object? _value;
|
||||
private string _editValue = string.Empty;
|
||||
private bool _isModified;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
/// <summary>レジストリの生キー名(例: ClearedLevel_h1378399435)</summary>
|
||||
public string RawKey
|
||||
{
|
||||
get => _rawKey;
|
||||
set { if (_rawKey != value) { _rawKey = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>Unityのハッシュを除去した整形式キー名(例: ClearedLevel)</summary>
|
||||
public string CleanKey
|
||||
{
|
||||
get => _cleanKey;
|
||||
set { if (_cleanKey != value) { _cleanKey = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
/// <summary>値のデータ型</summary>
|
||||
public PlayerPrefsType Type
|
||||
{
|
||||
get => _type;
|
||||
set { if (_type != value) { _type = value; OnPropertyChanged(); OnPropertyChanged(nameof(TypeDisplay)); } }
|
||||
}
|
||||
|
||||
/// <summary>実際の値(int, float, string, byte[])</summary>
|
||||
public object? Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
if (!Equals(_value, value))
|
||||
{
|
||||
_value = value;
|
||||
OnPropertyChanged();
|
||||
UpdateEditValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>UI表示・編集用の文字列値</summary>
|
||||
public string EditValue
|
||||
{
|
||||
get => _editValue;
|
||||
set
|
||||
{
|
||||
if (_editValue != value)
|
||||
{
|
||||
_editValue = value;
|
||||
_isModified = true;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(IsModified));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>値が変更されたかどうか</summary>
|
||||
public bool IsModified
|
||||
{
|
||||
get => _isModified;
|
||||
set { if (_isModified != value) { _isModified = value; OnPropertyChanged(); } }
|
||||
}
|
||||
|
||||
public string TypeDisplay => Type switch
|
||||
{
|
||||
PlayerPrefsType.Int => "Int (数値)",
|
||||
PlayerPrefsType.Float => "Float (小数)",
|
||||
PlayerPrefsType.String => "String (文字列)",
|
||||
PlayerPrefsType.Binary => "Binary (バイナリ)",
|
||||
_ => "Unknown"
|
||||
};
|
||||
|
||||
private void UpdateEditValue()
|
||||
{
|
||||
if (_value == null)
|
||||
{
|
||||
_editValue = string.Empty;
|
||||
}
|
||||
else if (_value is byte[] bytes)
|
||||
{
|
||||
try
|
||||
{
|
||||
var text = System.Text.Encoding.UTF8.GetString(bytes).TrimEnd('\0');
|
||||
if (text.All(c => !char.IsControl(c) || c == '\r' || c == '\n' || c == '\t'))
|
||||
{
|
||||
_editValue = text;
|
||||
_type = PlayerPrefsType.String;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
if (bytes.Length == 4)
|
||||
{
|
||||
float f = BitConverter.ToSingle(bytes, 0);
|
||||
if (!float.IsNaN(f) && !float.IsInfinity(f))
|
||||
{
|
||||
_editValue = f.ToString("G");
|
||||
_type = PlayerPrefsType.Float;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_editValue = BitConverter.ToString(bytes).Replace("-", " ");
|
||||
}
|
||||
else
|
||||
{
|
||||
_editValue = _value.ToString() ?? string.Empty;
|
||||
}
|
||||
_isModified = false;
|
||||
OnPropertyChanged(nameof(EditValue));
|
||||
OnPropertyChanged(nameof(IsModified));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ディスク上のセーブファイル(LocalLow または ゲームフォルダ内)を表すモデル
|
||||
/// </summary>
|
||||
public class SaveFileEntry
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public string FilePath { get; set; } = string.Empty;
|
||||
public long FileSize { get; set; }
|
||||
public DateTime LastModified { get; set; }
|
||||
public string LocationType { get; set; } = string.Empty; // "LocalLow" または "ゲームフォルダ"
|
||||
public bool IsTextOrJson { get; set; }
|
||||
|
||||
public string FileSizeDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
if (FileSize < 1024) return $"{FileSize} B";
|
||||
if (FileSize < 1024 * 1024) return $"{FileSize / 1024.0:F1} KB";
|
||||
return $"{FileSize / (1024.0 * 1024.0):F2} MB";
|
||||
}
|
||||
}
|
||||
|
||||
public string LastModifiedDisplay => LastModified.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// セーブデータのバックアップ履歴モデル
|
||||
/// </summary>
|
||||
public class SaveBackupEntry
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string BackupPath { get; set; } = string.Empty;
|
||||
public DateTime Timestamp { get; set; }
|
||||
public string BackupType { get; set; } = string.Empty; // "Registry (.reg)" または "ファイル"
|
||||
public string Note { get; set; } = string.Empty;
|
||||
|
||||
public string TimestampDisplay => Timestamp.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user