Ejemplo n.º 1
0
 public void SaveSettings()
 {
     Settings.SelectedAccentName = this.SelectedAccent.Name;
     Settings.SelectedThemeName  = this.SelectedTheme.Name;
     Settings.OnTop = this.OnTop;
     SettingsLogic.SaveSettings(this.Settings);
 }
Ejemplo n.º 2
0
        public static Settings GetSettings()
        {
            if (!File.Exists(SettingsPath))
            {
                return(SettingsLogic.GetDefaultSettings());
            }

            using (FileStream stream = new FileStream(SettingsPath, FileMode.OpenOrCreate))
            {
                var serializer = new XmlSerializer(typeof(Settings));
                return(serializer.Deserialize(stream) as Settings);
            }
        }
Ejemplo n.º 3
0
 private void LoadSettings()
 {
     this.Settings = SettingsLogic.GetSettings();
 }