添加项目文件。

This commit is contained in:
GG Z
2026-02-23 14:58:05 +08:00
parent ce96926220
commit 771d780d6c
342 changed files with 33470 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
namespace Utils.Basis
{
using System.ComponentModel;
public abstract class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected bool Set<T>(ref T field, T newValue = default(T), [System.Runtime.CompilerServices.CallerMemberName] string propertyName = null)
{
if (System.Collections.Generic.EqualityComparer<T>.Default.Equals(field, newValue))
{
return false;
}
field = newValue;
OnPropertyChanged(propertyName);
return true;
}
public virtual void OnPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}