Наследование: ObservableObject
Пример #1
0
        public void LoadFromStream(Stream stream)
        {
            var serializer = new XmlSerializer(typeof(UserSettings));
              var settings = serializer.Deserialize(stream) as UserSettings;

              if (settings == null)
            settings = new UserSettings();

              Settings = settings;
        }
Пример #2
0
 public static UserSettings CreateDefaults()
 {
     var settings = new UserSettings();
       settings.ResetDefaults();
       return settings;
 }
Пример #3
0
        void OnSettingChanging(UserSettings settings, string propertyName)
        {
            if (settings == null)
            throw new ArgumentNullException("settings");

              if (propertyName == null)
            throw new ArgumentNullException("propertyName");

              var handler = this.SettingChanging;

              if (handler != null)
            handler(settings, new PropertyChangingEventArgs(propertyName));
        }