This commit is contained in:
Hakoyu 2024-04-01 22:37:23 +08:00
parent 2ecadb4349
commit 54d77018af
41 changed files with 52 additions and 70 deletions

View File

@ -14,7 +14,7 @@ namespace VPet.ModMaker.Models;
/// I18n数据
/// </summary>
[DebuggerDisplay("{ID}, Count = {Datas.Count}")]
public class I18nData : ObservableObjectX<I18nData>
public class I18nData : ObservableObjectX
{
#region ID
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -14,7 +14,7 @@ namespace VPet.ModMaker.Models;
/// <summary>
/// I18n助手
/// </summary>
public class I18nHelper : ObservableObjectX<I18nHelper>
public class I18nHelper : ObservableObjectX
{
/// <summary>
/// 当前数据

View File

@ -14,8 +14,8 @@ namespace VPet.ModMaker.Models;
/// I18n模型
/// </summary>
/// <typeparam name="T">类型</typeparam>
public class I18nModel<T> : ObservableObjectX<I18nModel<T>>
where T : ObservableObjectX<T>, new()
public class I18nModel<T> : ObservableObjectX
where T : ObservableObjectX, new()
{
/// <summary>
/// 当前I18n数据
@ -84,7 +84,7 @@ public class I18nModel<T> : ObservableObjectX<I18nModel<T>>
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Current_PropertyChangedX(I18nHelper sender, PropertyChangedXEventArgs e)
private void Current_PropertyChangedX(object? sender, PropertyChangedXEventArgs e)
{
if (e.PropertyName == nameof(I18nHelper.CultureName))
{

View File

@ -10,7 +10,7 @@ namespace VPet.ModMaker.Models.ModModel;
/// <summary>
/// 动画模型
/// </summary>
public class AnimeModel : ObservableObjectX<AnimeModel>, ICloneable<AnimeModel>
public class AnimeModel : ObservableObjectX, ICloneable<AnimeModel>
{
public AnimeModel() { }

View File

@ -16,7 +16,7 @@ using static VPet_Simulator.Core.IGameSave;
namespace VPet.ModMaker.Models.ModModel;
public class AnimeTypeModel : ObservableObjectX<AnimeTypeModel>
public class AnimeTypeModel : ObservableObjectX
{
public AnimeTypeModel()
{

View File

@ -215,9 +215,7 @@ public class ClickTextModel : I18nModel<I18nClickTextModel>
public ObservableRange<double> Strength { get; } = new(0, int.MaxValue);
}
public class I18nClickTextModel
: ObservableObjectX<I18nClickTextModel>,
ICloneable<I18nClickTextModel>
public class I18nClickTextModel : ObservableObjectX, ICloneable<I18nClickTextModel>
{
#region Text
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -11,9 +11,7 @@ namespace VPet.ModMaker.Models.ModModel;
/// <summary>
/// 食物图像位置模型
/// </summary>
public class FoodAnimeLocationModel
: ObservableObjectX<FoodAnimeLocationModel>,
ICloneable<FoodAnimeLocationModel>
public class FoodAnimeLocationModel : ObservableObjectX, ICloneable<FoodAnimeLocationModel>
{
public FoodAnimeLocationModel() { }

View File

@ -13,7 +13,7 @@ using static VPet_Simulator.Core.IGameSave;
namespace VPet.ModMaker.Models.ModModel;
public class FoodAnimeModel : ObservableObjectX<FoodAnimeModel>, ICloneable<FoodAnimeModel>
public class FoodAnimeModel : ObservableObjectX, ICloneable<FoodAnimeModel>
{
public FoodAnimeModel() { }

View File

@ -15,7 +15,7 @@ using static VPet_Simulator.Core.IGameSave;
namespace VPet.ModMaker.Models.ModModel;
public class FoodAnimeTypeModel : ObservableObjectX<FoodAnimeModel>
public class FoodAnimeTypeModel : ObservableObjectX
{
public FoodAnimeTypeModel() { }

View File

@ -40,10 +40,7 @@ public class FoodModel : I18nModel<I18nFoodModel>
]
);
private void FoodModel_PropertyChangedX(
I18nModel<I18nFoodModel> sender,
PropertyChangedXEventArgs e
)
private void FoodModel_PropertyChangedX(object? sender, PropertyChangedXEventArgs e)
{
if (e.PropertyName is not null && _notifyReferencePrice.Contains(e.PropertyName))
{
@ -324,7 +321,7 @@ public class FoodModel : I18nModel<I18nFoodModel>
}
}
public class I18nFoodModel : ObservableObjectX<I18nFoodModel>, ICloneable<I18nFoodModel>
public class I18nFoodModel : ObservableObjectX, ICloneable<I18nFoodModel>
{
#region Name
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -13,7 +13,7 @@ namespace VPet.ModMaker.Models.ModModel;
/// <summary>
/// 图像模型
/// </summary>
public class ImageModel : ObservableObjectX<ImageModel>, ICloneable<ImageModel>
public class ImageModel : ObservableObjectX, ICloneable<ImageModel>
{
public ImageModel(BitmapImage image, int duration = 100)
{

View File

@ -120,7 +120,7 @@ public class LowTextModel : I18nModel<I18nLowTextModel>
}
}
public class I18nLowTextModel : ObservableObjectX<I18nLowTextModel>, ICloneable<I18nLowTextModel>
public class I18nLowTextModel : ObservableObjectX, ICloneable<I18nLowTextModel>
{
#region Text
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -828,7 +828,7 @@ public class ModInfoModel : I18nModel<I18nModInfoModel>
}
}
public class I18nModInfoModel : ObservableObjectX<I18nModInfoModel>
public class I18nModInfoModel : ObservableObjectX
{
#region Name
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -14,7 +14,7 @@ namespace VPet.ModMaker.Models;
/// <summary>
/// 移动模型
/// </summary>
public class MoveModel : ObservableObjectX<MoveModel>
public class MoveModel : ObservableObjectX
{
public MoveModel() { }

View File

@ -545,7 +545,7 @@ public class PetModel : I18nModel<I18nPetInfoModel>
#endregion
}
public class I18nPetInfoModel : ObservableObjectX<I18nPetInfoModel>, ICloneable<I18nPetInfoModel>
public class I18nPetInfoModel : ObservableObjectX, ICloneable<I18nPetInfoModel>
{
#region Name
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
@ -591,7 +591,7 @@ public class I18nPetInfoModel : ObservableObjectX<I18nPetInfoModel>, ICloneable<
}
public class ObservableMultiStateRectangleLocation
: ObservableObjectX<ObservableMultiStateRectangleLocation>,
: ObservableObjectX,
IEquatable<ObservableMultiStateRectangleLocation>,
ICloneable<ObservableMultiStateRectangleLocation>
{
@ -715,7 +715,7 @@ public class ObservableMultiStateRectangleLocation
}
public class ObservableMultiStatePoint
: ObservableObjectX<ObservableMultiStatePoint>,
: ObservableObjectX,
IEquatable<ObservableMultiStatePoint>,
ICloneable<ObservableMultiStatePoint>
{

View File

@ -213,9 +213,7 @@ public class SelectTextModel : I18nModel<I18nSelectTextModel>
}
}
public class I18nSelectTextModel
: ObservableObjectX<I18nSelectTextModel>,
ICloneable<I18nSelectTextModel>
public class I18nSelectTextModel : ObservableObjectX, ICloneable<I18nSelectTextModel>
{
#region Choose
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -453,7 +453,7 @@ public class WorkModel : I18nModel<I18nWorkModel>
}
}
public class I18nWorkModel : ObservableObjectX<I18nWorkModel>, ICloneable<I18nWorkModel>
public class I18nWorkModel : ObservableObjectX, ICloneable<I18nWorkModel>
{
#region Name
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -27,7 +27,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="HKW.Utils" Version="1.2.5" />
<PackageReference Include="HKW.Utils" Version="1.2.6" />
<PackageReference Include="HKW.WPF" Version="1.0.3" />
<PackageReference Include="Mapster" Version="7.4.0" />
</ItemGroup>

View File

@ -12,7 +12,7 @@ using VPet.ModMaker.Models;
namespace VPet.ModMaker.ViewModels.ModEdit;
public class AddCultureWindowVM : ObservableObjectX<AddCultureWindowVM>
public class AddCultureWindowVM : ObservableObjectX
{
/// <summary>
/// 显示的文化

View File

@ -20,7 +20,7 @@ using static VPet_Simulator.Core.IGameSave;
namespace VPet.ModMaker.ViewModels.ModEdit.AnimeEdit;
public class AnimeEditWindowVM : ObservableObjectX<AnimeEditWindowVM>
public class AnimeEditWindowVM : ObservableObjectX
{
public AnimeEditWindowVM()
{
@ -37,10 +37,7 @@ public class AnimeEditWindowVM : ObservableObjectX<AnimeEditWindowVM>
ClearImageCommand.ExecuteCommand += ClearImageCommand_ExecuteCommand;
}
private void AnimeEditWindowVM_PropertyChangedX(
AnimeEditWindowVM sender,
PropertyChangedXEventArgs e
)
private void AnimeEditWindowVM_PropertyChangedX(object? sender, PropertyChangedXEventArgs e)
{
if (e.PropertyName == nameof(CurrentAnimeModel))
{

View File

@ -17,7 +17,7 @@ using VPet.ModMaker.Views.ModEdit.AnimeEdit;
namespace VPet.ModMaker.ViewModels.ModEdit.AnimeEdit;
public class AnimePageVM : ObservableObjectX<AnimePageVM>
public class AnimePageVM : ObservableObjectX
{
public AnimePageVM()
{
@ -50,7 +50,7 @@ public class AnimePageVM : ObservableObjectX<AnimePageVM>
RemoveCommand.ExecuteCommand += RemoveCommand_ExecuteCommand;
}
private void AnimePageVM_PropertyChangedX(AnimePageVM sender, PropertyChangedXEventArgs e)
private void AnimePageVM_PropertyChangedX(object? sender, PropertyChangedXEventArgs e)
{
if (e.PropertyName == nameof(CurrentPet))
{

View File

@ -19,7 +19,7 @@ using static VPet_Simulator.Core.IGameSave;
namespace VPet.ModMaker.ViewModels.ModEdit.AnimeEdit;
public class FoodAnimeEditWindowVM : ObservableObjectX<FoodAnimeEditWindowVM>
public class FoodAnimeEditWindowVM : ObservableObjectX
{
public FoodAnimeEditWindowVM()
{
@ -52,10 +52,7 @@ public class FoodAnimeEditWindowVM : ObservableObjectX<FoodAnimeEditWindowVM>
ClearFoodLocationCommand.ExecuteCommand += ClearFoodLocationCommand_ExecuteEvent;
}
private void FoodAnimeEditWindowVM_PropertyChangedX(
FoodAnimeEditWindowVM sender,
PropertyChangedXEventArgs e
)
private void FoodAnimeEditWindowVM_PropertyChangedX(object? sender, PropertyChangedXEventArgs e)
{
if (e.PropertyName == nameof(CurrentAnimeModel))
{

View File

@ -12,7 +12,7 @@ using VPet_Simulator.Core;
namespace VPet.ModMaker.ViewModels.ModEdit.AnimeEdit;
public class SelectGraphTypeWindowVM : ObservableObjectX<SelectGraphTypeWindowVM>
public class SelectGraphTypeWindowVM : ObservableObjectX
{
public SelectGraphTypeWindowVM()
{

View File

@ -11,7 +11,7 @@ using VPet_Simulator.Windows.Interface;
namespace VPet.ModMaker.ViewModels.ModEdit.ClickTextEdit;
public class ClickTextEditWindowVM : ObservableObjectX<ClickTextEditWindowVM>
public class ClickTextEditWindowVM : ObservableObjectX
{
public static I18nHelper I18nData => I18nHelper.Current;

View File

@ -13,7 +13,7 @@ using VPet.ModMaker.Views.ModEdit.ClickTextEdit;
namespace VPet.ModMaker.ViewModels.ModEdit.ClickTextEdit;
public class ClickTextPageVM : ObservableObjectX<ClickTextPageVM>
public class ClickTextPageVM : ObservableObjectX
{
public ClickTextPageVM()
{

View File

@ -15,7 +15,7 @@ using VPet_Simulator.Windows.Interface;
namespace VPet.ModMaker.ViewModels.ModEdit.FoodEdit;
public class FoodEditWindowVM : ObservableObjectX<FoodEditWindowVM>
public class FoodEditWindowVM : ObservableObjectX
{
public FoodEditWindowVM()
{
@ -47,7 +47,7 @@ public class FoodEditWindowVM : ObservableObjectX<FoodEditWindowVM>
}
}
private void Food_PropertyChangedX(I18nModel<I18nFoodModel> sender, PropertyChangedXEventArgs e)
private void Food_PropertyChangedX(object? sender, PropertyChangedXEventArgs e)
{
if (e.PropertyName == nameof(FoodModel.ReferencePrice))
{

View File

@ -15,7 +15,7 @@ using VPet.ModMaker.Views.ModEdit.FoodEdit;
namespace VPet.ModMaker.ViewModels.ModEdit.FoodEdit;
public class FoodPageVM : ObservableObjectX<FoodPageVM>
public class FoodPageVM : ObservableObjectX
{
public FoodPageVM()
{

View File

@ -11,7 +11,7 @@ using VPet.ModMaker.Models;
namespace VPet.ModMaker.ViewModels.ModEdit.I18nEdit;
public class I18nEditWindowVM : ObservableObjectX<I18nEditWindowVM> { }
public class I18nEditWindowVM : ObservableObjectX { }
//{
// public I18nEditWindowVM()
// {

View File

@ -11,7 +11,7 @@ using VPet_Simulator.Windows.Interface;
namespace VPet.ModMaker.ViewModels.ModEdit.LowTextEdit;
public class LowTextEditWindowVM : ObservableObjectX<LowTextEditWindowVM>
public class LowTextEditWindowVM : ObservableObjectX
{
public static I18nHelper I18nData => I18nHelper.Current;
#region Value

View File

@ -15,7 +15,7 @@ using VPet.ModMaker.Views.ModEdit.LowTextEdit;
namespace VPet.ModMaker.ViewModels.ModEdit.LowTextEdit;
public class LowTextPageVM : ObservableObjectX<LowTextPageVM>
public class LowTextPageVM : ObservableObjectX
{
public LowTextPageVM()
{

View File

@ -22,7 +22,7 @@ using VPet.ModMaker.Views.ModEdit.I18nEdit;
namespace VPet.ModMaker.ViewModels.ModEdit;
public class ModEditWindowVM : ObservableObjectX<ModEditWindowVM>
public class ModEditWindowVM : ObservableObjectX
{
public ModEditWindowVM(ModEditWindow window)
{

View File

@ -12,7 +12,7 @@ using VPet.ModMaker.Models;
namespace VPet.ModMaker.ViewModels.ModEdit.MoveEdit;
public class MoveEditWindowVM : ObservableObjectX<MoveEditWindowVM>
public class MoveEditWindowVM : ObservableObjectX
{
public MoveEditWindowVM()
{

View File

@ -15,7 +15,7 @@ using VPet.ModMaker.Views.ModEdit.MoveEdit;
namespace VPet.ModMaker.ViewModels.ModEdit.MoveEdit;
public class MovePageVM : ObservableObjectX<MovePageVM>
public class MovePageVM : ObservableObjectX
{
public MovePageVM()
{

View File

@ -13,7 +13,7 @@ using VPet.ModMaker.Models;
namespace VPet.ModMaker.ViewModels.ModEdit.PetEdit;
public class PetEditWindowVM : ObservableObjectX<PetEditWindowVM>
public class PetEditWindowVM : ObservableObjectX
{
public PetEditWindowVM()
{

View File

@ -14,7 +14,7 @@ using VPet.ModMaker.Views.ModEdit.PetEdit;
namespace VPet.ModMaker.ViewModels.ModEdit.PetEdit;
public class PetPageVM : ObservableObjectX<PetPageVM>
public class PetPageVM : ObservableObjectX
{
public PetPageVM()
{

View File

@ -15,7 +15,7 @@ using VPet.ModMaker.Models;
namespace VPet.ModMaker.ViewModels.ModEdit;
public class SaveTranslationModWindowVM : ObservableObjectX<SaveTranslationModWindowVM>
public class SaveTranslationModWindowVM : ObservableObjectX
{
#region Value
#region CheckAll
@ -112,7 +112,7 @@ public class SaveTranslationModWindowVM : ObservableObjectX<SaveTranslationModWi
}
}
public class CheckCultureModel : ObservableObjectX<CheckCultureModel>
public class CheckCultureModel : ObservableObjectX
{
#region IsChecked
[DebuggerBrowsable(DebuggerBrowsableState.Never)]

View File

@ -9,7 +9,7 @@ using VPet.ModMaker.Models;
namespace VPet.ModMaker.ViewModels.ModEdit.SelectTextEdit;
public class SelectTextEditWindowVM : ObservableObjectX<SelectTextEditWindowVM>
public class SelectTextEditWindowVM : ObservableObjectX
{
public static I18nHelper I18nData => I18nHelper.Current;
#region Value

View File

@ -14,7 +14,7 @@ using VPet_Simulator.Windows.Interface;
namespace VPet.ModMaker.ViewModels.ModEdit.SelectTextEdit;
public class SelectTextPageVM : ObservableObjectX<SelectTextPageVM>
public class SelectTextPageVM : ObservableObjectX
{
public SelectTextPageVM()
{

View File

@ -16,7 +16,7 @@ using VPet_Simulator.Windows.Interface;
namespace VPet.ModMaker.ViewModels.ModEdit.WorkEdit;
public class WorkEditWindowVM : ObservableObjectX<WorkEditWindowVM>
public class WorkEditWindowVM : ObservableObjectX
{
public WorkEditWindowVM()
{
@ -27,10 +27,7 @@ public class WorkEditWindowVM : ObservableObjectX<WorkEditWindowVM>
FixOverLoadCommand.ExecuteCommand += FixOverLoadCommand_ExecuteCommand;
}
private void WorkEditWindowVM_PropertyChangedX(
WorkEditWindowVM sender,
PropertyChangedXEventArgs e
)
private void WorkEditWindowVM_PropertyChangedX(object? sender, PropertyChangedXEventArgs e)
{
if (e.PropertyName == nameof(Work))
{

View File

@ -15,7 +15,7 @@ using VPet.ModMaker.Views.ModEdit.WorkEdit;
namespace VPet.ModMaker.ViewModels.ModEdit.WorkEdit;
public class WorkPageVM : ObservableObjectX<WorkPageVM>
public class WorkPageVM : ObservableObjectX
{
public WorkPageVM()
{

View File

@ -23,7 +23,7 @@ using VPet.ModMaker.Views.ModEdit.I18nEdit;
namespace VPet.ModMaker.ViewModels;
public class ModMakerWindowVM : ObservableObjectX<ModMakerWindowVM>
public class ModMakerWindowVM : ObservableObjectX
{
public ModMakerWindowVM(ModMakerWindow window)
{