Changeset 561 for branches/eraser6/DefaultPlugins/Plugin.cs
- Timestamp:
- 11/14/2008 8:20:48 AM (4 years ago)
- File:
-
- 1 edited
-
branches/eraser6/DefaultPlugins/Plugin.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/DefaultPlugins/Plugin.cs
r510 r561 35 35 public void Initialize(Host host) 36 36 { 37 //Get the settings dictionary 38 Settings = Manager.ManagerLibrary.Instance.Settings.PluginSettings; 37 Settings = new DefaultPluginSettings(); 39 38 40 39 //Then register the erasure methods et al. … … 69 68 public void Dispose() 70 69 { 71 Manager.ManagerLibrary.Instance.Settings.SetSettings(Settings);72 70 } 73 71 … … 96 94 /// The dictionary holding settings for this plugin. 97 95 /// </summary> 98 public static Dictionary<string, object> Settings = null; 96 internal static DefaultPluginSettings Settings = null; 97 } 98 99 /// <summary> 100 /// A concrete class to manage the settings for this plugin. 101 /// </summary> 102 internal class DefaultPluginSettings 103 { 104 public DefaultPluginSettings() 105 { 106 settings = Manager.ManagerLibrary.Instance.SettingsManager.ModuleSettings; 107 } 108 109 /// <summary> 110 /// The First/last 16 kilobyte erasure method. 111 /// </summary> 112 public Guid FL16Method 113 { 114 get 115 { 116 return settings["FL16Method"] == null ? Guid.Empty : 117 (Guid)settings["FL16Method"]; 118 } 119 set 120 { 121 settings["FL16Method"] = value; 122 } 123 } 124 125 /// <summary> 126 /// The set of custom erasure methods. 127 /// </summary> 128 public Dictionary<Guid, CustomErasureMethod> EraseCustom 129 { 130 get 131 { 132 return (Dictionary<Guid, CustomErasureMethod>)settings["EraseCustom"]; 133 } 134 set 135 { 136 settings["EraseCustom"] = value; 137 } 138 } 139 140 /// <summary> 141 /// The data store for our settings. 142 /// </summary> 143 Settings settings; 99 144 } 100 145 }
Note: See TracChangeset
for help on using the changeset viewer.
