Add property changed filtering events to Configuration

This commit is contained in:
Michael Bucari-Tovo 2023-01-06 22:56:00 -07:00
parent 5c73beff4b
commit 4725fe36d1
10 changed files with 397 additions and 194 deletions

View file

@ -59,14 +59,13 @@ namespace LibationWinForms
Configuration.Instance.PropertyChanged += Configuration_PropertyChanged;
}
private void Configuration_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
[PropertyChangeFilter(nameof(Configuration.AutoScan))]
private void Configuration_PropertyChanged(object sender, PropertyChangedEventArgsEx e)
{
if (e.PropertyName == nameof(Configuration.Instance.AutoScan))
{
// when autoscan setting is changed, update menu checkbox and run autoscan
updateAutoScanLibraryToolStripMenuItem(sender, e);
startAutoScan(sender, e);
}
// when autoscan setting is changed, update menu checkbox and run autoscan
updateAutoScanLibraryToolStripMenuItem(sender, e);
startAutoScan(sender, e);
}
private List<(string AccountId, string LocaleName)> preSaveDefaultAccounts;