Observable properties och RelayCommands införda

This commit is contained in:
2025-10-14 21:57:37 +02:00
parent b4d6c6d530
commit 21eb0d5498
17 changed files with 87 additions and 302 deletions

View File

@ -1,29 +0,0 @@
using System.ComponentModel;
namespace Common.Library;
public abstract class CommonBase : INotifyPropertyChanged
{
#region Constructor
protected CommonBase()
{
Init();
}
#endregion
#region Init Method
public virtual void Init()
{
}
#endregion
#region RaisePropertyChanged Method
public event PropertyChangedEventHandler? PropertyChanged;
public virtual void RaisePropertyChanged(string propertyName)
{
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#endregion
}

View File

@ -1,5 +0,0 @@
namespace Common.Library;
public class EntityBase : CommonBase
{
}

View File

@ -1,14 +0,0 @@
//using GreadyPoang.DataLayer;
namespace Common.Library;
public class ViewModelBase : CommonBase
{
//private readonly LocalDbService _dbService;
//public ViewModelBase(LocalDbService dbService)
//{
// _dbService = dbService;
//}
}

View File

@ -6,19 +6,9 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Remove="BaseClasses\CommonBase.cs" />
<Compile Remove="BaseClasses\EntityBase.cs" />
<Compile Remove="BaseClasses\ViewModelBase.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="BaseClasses\" />
</ItemGroup>
</Project>