Exemplo n.º 1
0
        private void Set(object value, [CallerMemberName] string key = "")
        {
            if (!settings.Contains(key))
            {
                settings.Add(key, value);
            }
            else
            {
                settings[key] = value;
            }

            settings.Save();
            NotifyHelper.OnPropertyChanged(key, this, PropertyChanged);
        }
Exemplo n.º 2
0
 private void SetProperty <T>(ref T field, T value, [CallerMemberName] string propertyName = "")
 {
     NotifyHelper.SetProperty(ref field, value, propertyName, this, PropertyChanged);
 }