From 5388dea95fdd5ff35668bdd97c10e23c84189b54 Mon Sep 17 00:00:00 2001 From: k0t9i Date: Tue, 31 Jan 2023 19:09:07 +0400 Subject: [PATCH] refactor: rename NotifyPropertyChanged to ObservableObject --- Client/Application/ViewModels/CreatureListViewModel.cs | 2 +- Client/Application/ViewModels/DropListViewModel.cs | 2 +- Client/Application/ViewModels/HeroSummaryInfoViewModel.cs | 2 +- Client/Application/ViewModels/MainViewModel.cs | 2 +- .../Common/{NotifyPropertyChanged.cs => ObservableObject.cs} | 2 +- Client/Domain/Entities/Drop.cs | 2 +- Client/Domain/Entities/Hero.cs | 2 +- Client/Domain/Entities/NPC.cs | 2 +- Client/Domain/Entities/Player.cs | 2 +- Client/Domain/ValueObjects/ExperienceInfo.cs | 2 +- Client/Domain/ValueObjects/FullName.cs | 2 +- Client/Domain/ValueObjects/InventoryInfo.cs | 2 +- Client/Domain/ValueObjects/Phenotype.cs | 2 +- Client/Domain/ValueObjects/Transform.cs | 2 +- Client/Domain/ValueObjects/Vector3.cs | 2 +- Client/Domain/ValueObjects/VitalStats.cs | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) rename Client/Domain/Common/{NotifyPropertyChanged.cs => ObservableObject.cs} (89%) diff --git a/Client/Application/ViewModels/CreatureListViewModel.cs b/Client/Application/ViewModels/CreatureListViewModel.cs index ed7f47c..78d1a31 100644 --- a/Client/Application/ViewModels/CreatureListViewModel.cs +++ b/Client/Application/ViewModels/CreatureListViewModel.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace Client.Application.ViewModels { - public class CreatureListViewModel : NotifyPropertyChanged + public class CreatureListViewModel : ObservableObject { public uint Id => creature.Id; diff --git a/Client/Application/ViewModels/DropListViewModel.cs b/Client/Application/ViewModels/DropListViewModel.cs index 4aab5f5..26a8293 100644 --- a/Client/Application/ViewModels/DropListViewModel.cs +++ b/Client/Application/ViewModels/DropListViewModel.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace Client.Application.ViewModels { - public class DropListViewModel : NotifyPropertyChanged + public class DropListViewModel : ObservableObject { public uint Id { diff --git a/Client/Application/ViewModels/HeroSummaryInfoViewModel.cs b/Client/Application/ViewModels/HeroSummaryInfoViewModel.cs index a23411a..a272af9 100644 --- a/Client/Application/ViewModels/HeroSummaryInfoViewModel.cs +++ b/Client/Application/ViewModels/HeroSummaryInfoViewModel.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace Client.Application.ViewModels { - public class HeroSummaryInfoViewModel : NotifyPropertyChanged + public class HeroSummaryInfoViewModel : ObservableObject { public bool IsVisible { get diff --git a/Client/Application/ViewModels/MainViewModel.cs b/Client/Application/ViewModels/MainViewModel.cs index 348b8c4..996271a 100644 --- a/Client/Application/ViewModels/MainViewModel.cs +++ b/Client/Application/ViewModels/MainViewModel.cs @@ -18,7 +18,7 @@ using System.Windows.Media; namespace Client.Application.ViewModels { public class MainViewModel : - NotifyPropertyChanged, + ObservableObject, EventHandlerInterface, EventHandlerInterface, EventHandlerInterface, diff --git a/Client/Domain/Common/NotifyPropertyChanged.cs b/Client/Domain/Common/ObservableObject.cs similarity index 89% rename from Client/Domain/Common/NotifyPropertyChanged.cs rename to Client/Domain/Common/ObservableObject.cs index d40b1d9..7375292 100644 --- a/Client/Domain/Common/NotifyPropertyChanged.cs +++ b/Client/Domain/Common/ObservableObject.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace Client.Domain.Common { - public class NotifyPropertyChanged : INotifyPropertyChanged + public class ObservableObject : INotifyPropertyChanged { public event PropertyChangedEventHandler? PropertyChanged; public void OnPropertyChanged([CallerMemberName] string prop = "") diff --git a/Client/Domain/Entities/Drop.cs b/Client/Domain/Entities/Drop.cs index 842c3f9..20543cb 100644 --- a/Client/Domain/Entities/Drop.cs +++ b/Client/Domain/Entities/Drop.cs @@ -3,7 +3,7 @@ using Client.Domain.ValueObjects; namespace Client.Domain.Entities { - public class Drop : NotifyPropertyChanged, EntityInterface + public class Drop : ObservableObject, EntityInterface { private uint id; private Transform transform; diff --git a/Client/Domain/Entities/Hero.cs b/Client/Domain/Entities/Hero.cs index bcc80d4..35c301f 100644 --- a/Client/Domain/Entities/Hero.cs +++ b/Client/Domain/Entities/Hero.cs @@ -5,7 +5,7 @@ using System.Diagnostics; namespace Client.Domain.Entities { - public class Hero : NotifyPropertyChanged, EntityInterface, CreatureInterface + public class Hero : ObservableObject, EntityInterface, CreatureInterface { private FullName fullName; private Phenotype phenotype; diff --git a/Client/Domain/Entities/NPC.cs b/Client/Domain/Entities/NPC.cs index 32fcb69..691dad6 100644 --- a/Client/Domain/Entities/NPC.cs +++ b/Client/Domain/Entities/NPC.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; namespace Client.Domain.Entities { - public class NPC : NotifyPropertyChanged, EntityInterface, CreatureInterface + public class NPC : ObservableObject, EntityInterface, CreatureInterface { public uint Id { get; set; } public Transform Transform { get; set; } diff --git a/Client/Domain/Entities/Player.cs b/Client/Domain/Entities/Player.cs index 52e54df..d600eff 100644 --- a/Client/Domain/Entities/Player.cs +++ b/Client/Domain/Entities/Player.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; namespace Client.Domain.Entities { - public class Player : NotifyPropertyChanged, EntityInterface, CreatureInterface + public class Player : ObservableObject, EntityInterface, CreatureInterface { private FullName fullName; private Phenotype phenotype; diff --git a/Client/Domain/ValueObjects/ExperienceInfo.cs b/Client/Domain/ValueObjects/ExperienceInfo.cs index 43927e6..7b17a23 100644 --- a/Client/Domain/ValueObjects/ExperienceInfo.cs +++ b/Client/Domain/ValueObjects/ExperienceInfo.cs @@ -2,7 +2,7 @@ namespace Client.Domain.ValueObjects { - public class ExperienceInfo : NotifyPropertyChanged + public class ExperienceInfo : ObservableObject { private uint level; private uint exp; diff --git a/Client/Domain/ValueObjects/FullName.cs b/Client/Domain/ValueObjects/FullName.cs index 5ed4aa3..5bd6818 100644 --- a/Client/Domain/ValueObjects/FullName.cs +++ b/Client/Domain/ValueObjects/FullName.cs @@ -2,7 +2,7 @@ namespace Client.Domain.ValueObjects { - public class FullName : NotifyPropertyChanged + public class FullName : ObservableObject { private string nickname; private string title; diff --git a/Client/Domain/ValueObjects/InventoryInfo.cs b/Client/Domain/ValueObjects/InventoryInfo.cs index a8a9d8c..0328c90 100644 --- a/Client/Domain/ValueObjects/InventoryInfo.cs +++ b/Client/Domain/ValueObjects/InventoryInfo.cs @@ -2,7 +2,7 @@ namespace Client.Domain.ValueObjects { - public class InventoryInfo : NotifyPropertyChanged + public class InventoryInfo : ObservableObject { private uint maxWeight; private uint weight; diff --git a/Client/Domain/ValueObjects/Phenotype.cs b/Client/Domain/ValueObjects/Phenotype.cs index f676f70..bc2d3a4 100644 --- a/Client/Domain/ValueObjects/Phenotype.cs +++ b/Client/Domain/ValueObjects/Phenotype.cs @@ -3,7 +3,7 @@ using Client.Domain.Enums; namespace Client.Domain.ValueObjects { - public class Phenotype : NotifyPropertyChanged + public class Phenotype : ObservableObject { private RaceEnum race; private bool isMale; diff --git a/Client/Domain/ValueObjects/Transform.cs b/Client/Domain/ValueObjects/Transform.cs index babce0e..4380e42 100644 --- a/Client/Domain/ValueObjects/Transform.cs +++ b/Client/Domain/ValueObjects/Transform.cs @@ -2,7 +2,7 @@ namespace Client.Domain.ValueObjects { - public class Transform : NotifyPropertyChanged + public class Transform : ObservableObject { private Vector3 position; private Vector3 rotation; diff --git a/Client/Domain/ValueObjects/Vector3.cs b/Client/Domain/ValueObjects/Vector3.cs index 7f1a70b..700649e 100644 --- a/Client/Domain/ValueObjects/Vector3.cs +++ b/Client/Domain/ValueObjects/Vector3.cs @@ -3,7 +3,7 @@ using System; namespace Client.Domain.ValueObjects { - public class Vector3 : NotifyPropertyChanged + public class Vector3 : ObservableObject { private float x; private float y; diff --git a/Client/Domain/ValueObjects/VitalStats.cs b/Client/Domain/ValueObjects/VitalStats.cs index 70381d3..2c1a5b1 100644 --- a/Client/Domain/ValueObjects/VitalStats.cs +++ b/Client/Domain/ValueObjects/VitalStats.cs @@ -2,7 +2,7 @@ namespace Client.Domain.ValueObjects { - public class VitalStats : NotifyPropertyChanged + public class VitalStats : ObservableObject { private uint hp; private uint maxHp;