public PersistentCollection(string settingName) { _settingName = settingName; if (GetSavedCollection() == null) { Settings.Default[_settingName] = new List <T>(); ArgsAndSettings.SaveSettings(); } }
public void Remove(T ele) { var collection = GetSavedCollection(); if (collection.Contains(ele)) { var index = collection.IndexOf(ele); collection.RemoveAt(index); ArgsAndSettings.SaveSettings(); NotifyRemoved(ele, index); } }
public Setting(T initialValue, Action <T> setter) : base(x => { setter(x); ArgsAndSettings.SaveSettings(); }, initialValue) { }
public void Add(T ele) { GetSavedCollection().Add(ele); ArgsAndSettings.SaveSettings(); NotifyAdded(ele); }