mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Status text and password box border colors are updated according to database status Update composite key in Settings work Some code cleanup
29 lines
819 B
C#
29 lines
819 B
C#
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace ModernKeePass.Common
|
|
{
|
|
public class NotifyPropertyChangedBase : INotifyPropertyChanged
|
|
{
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
protected void OnPropertyChanged(string propertyName = "")
|
|
{
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
}
|
|
|
|
protected bool SetProperty<T>(ref T property, T value, [CallerMemberName] string propertyName = "")
|
|
{
|
|
if (EqualityComparer<T>.Default.Equals(property, value))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
property = value;
|
|
OnPropertyChanged(propertyName);
|
|
return true;
|
|
}
|
|
}
|
|
}
|