機能追加: Bakin・NW.jsエンジンおよびセーブ編集対応、ES3パスワード解決機能とRPGツクールMZ修正サービスの追加
This commit is contained in:
1 parent
f50976a6c0
commit
152abae1f8
33 files changed
+11356
-175
No files matched your search
@@ -15,6 +15,7 @@ namespace GameLauncher.Models
|
||||
private string _editValue = string.Empty;
|
||||
private bool _isModified;
|
||||
private string _description = string.Empty;
|
||||
private ValueKind _kind = ValueKind.Unknown;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
@@ -76,5 +77,76 @@ namespace GameLauncher.Models
|
||||
|
||||
/// <summary>内部保持用の生データや元データ(再エンコード用)</summary>
|
||||
public object? RawData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 真偽値として編集できる項目かどうか。
|
||||
/// </summary>
|
||||
public bool IsBool => this._kind == ValueKind.Boolean;
|
||||
|
||||
/// <summary>
|
||||
/// 数値(整数・小数)として編集できる項目かどうか。
|
||||
/// </summary>
|
||||
public bool IsNumeric => this._kind is ValueKind.Integer or ValueKind.Float or ValueKind.Enum;
|
||||
|
||||
/// <summary>
|
||||
/// 文字列などテキスト入力で編集する項目かどうか。
|
||||
/// </summary>
|
||||
public bool IsStringLike => !this.IsBool && !this.IsNumeric;
|
||||
|
||||
/// <summary>
|
||||
/// 真偽値エディタ(チェックボックス)用の値。
|
||||
/// 設定すると <see cref="EditValue"/> も "true"/"false" に同期します。
|
||||
/// </summary>
|
||||
public bool BoolValue
|
||||
{
|
||||
get => bool.TryParse(this._editValue, out var parsed) && parsed;
|
||||
set => this.EditValue = value ? "true" : "false";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 値の種別。設定すると型別エディタの表示切り替えに反映されます。
|
||||
/// </summary>
|
||||
public ValueKind Kind
|
||||
{
|
||||
get => this._kind;
|
||||
set
|
||||
{
|
||||
if (this._kind != value)
|
||||
{
|
||||
this._kind = value;
|
||||
this.OnPropertyChanged();
|
||||
this.OnPropertyChanged(nameof(this.IsBool));
|
||||
this.OnPropertyChanged(nameof(this.IsNumeric));
|
||||
this.OnPropertyChanged(nameof(this.IsStringLike));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 値の種別(型別エディタの切り替え用)。
|
||||
/// </summary>
|
||||
public enum ValueKind
|
||||
{
|
||||
/// <summary>不明・未判定。</summary>
|
||||
Unknown,
|
||||
|
||||
/// <summary>真偽値。</summary>
|
||||
Boolean,
|
||||
|
||||
/// <summary>整数。</summary>
|
||||
Integer,
|
||||
|
||||
/// <summary>浮動小数。</summary>
|
||||
Float,
|
||||
|
||||
/// <summary>文字列。</summary>
|
||||
String,
|
||||
|
||||
/// <summary>列挙体。</summary>
|
||||
Enum,
|
||||
|
||||
/// <summary>配列・辞書・オブジェクトなど複合型。</summary>
|
||||
Complex
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user