Ignore:
Timestamp:
11/14/2008 8:20:48 AM (4 years ago)
Author:
lowjoel
Message:

Part one to fixing #32: replace the Dictionary object with the Settings object for plugin settings; The old Settings class is now the SettingsManager? class.
Also, since we are now using a generic Object, I've implemented a few helper class (XXSettings) classes to allow for the concrete setting + type to be retrieved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/MainForm.cs

    r513 r561  
    305305            get 
    306306            { 
    307                 Dictionary<string, object> settings = 
    308                     ManagerLibrary.Instance.Settings.PluginSettings; 
    309                 return settings.ContainsKey("HideWhenMinimised") ? 
    310                     (bool)settings["HideWhenMinimised"] : true; 
     307                Manager.Settings settings = 
     308                    ManagerLibrary.Instance.SettingsManager.ModuleSettings; 
     309                return settings["HideWhenMinimised"] == null ? true : 
     310                    (bool)settings["HideWhenMinimised"]; 
    311311            } 
    312312 
    313313            set 
    314314            { 
    315                 Dictionary<string, object> settings = 
    316                     ManagerLibrary.Instance.Settings.PluginSettings; 
     315                Manager.Settings settings = 
     316                    ManagerLibrary.Instance.SettingsManager.ModuleSettings; 
    317317                settings["HideWhenMinimised"] = hideWhenMinimiseToolStripMenuItem.Checked; 
    318                 ManagerLibrary.Instance.Settings.SetSettings(settings); 
    319318            } 
    320319        } 
Note: See TracChangeset for help on using the changeset viewer.