Changeset 561 for branches/eraser6/DefaultPlugins/SettingsForm.cs
- Timestamp:
- 11/14/2008 8:20:48 AM (4 years ago)
- File:
-
- 1 edited
-
branches/eraser6/DefaultPlugins/SettingsForm.cs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/DefaultPlugins/SettingsForm.cs
r510 r561 43 43 44 44 //Load the settings. 45 Dictionary<string, object> settings = DefaultPlugin.Settings; 46 if (settings.ContainsKey("FL16Method")) 47 { 48 Guid fl16Method = (Guid)settings["FL16Method"]; 45 DefaultPluginSettings settings = DefaultPlugin.Settings; 46 if (settings.FL16Method != Guid.Empty) 49 47 foreach (object item in fl16MethodCmb.Items) 50 if (((ErasureMethod)item).GUID == fl16Method)48 if (((ErasureMethod)item).GUID == settings.FL16Method) 51 49 { 52 50 fl16MethodCmb.SelectedItem = item; 53 51 break; 54 52 } 55 }56 53 57 54 if (fl16MethodCmb.SelectedIndex == -1) … … 67 64 } 68 65 69 if (DefaultPlugin.Settings. ContainsKey("EraseCustom"))66 if (DefaultPlugin.Settings.EraseCustom != null) 70 67 { 71 customMethods = (Dictionary<Guid, CustomErasureMethod>) 72 DefaultPlugin.Settings["EraseCustom"]; 68 customMethods = DefaultPlugin.Settings.EraseCustom; 73 69 74 70 //Display the whole set on the list. … … 108 104 { 109 105 CustomErasureMethod method = form.Method; 106 customMethods.Add(method.GUID, method); 110 107 addCustomMethods.Add(method); 111 108 AddMethod(method); … … 136 133 } 137 134 138 DefaultPlugin.Settings ["FL16Method"]= ((ErasureMethod)fl16MethodCmb.SelectedItem).GUID;135 DefaultPlugin.Settings.FL16Method = ((ErasureMethod)fl16MethodCmb.SelectedItem).GUID; 139 136 140 137 //Save the list of custom erasure methods 141 DefaultPlugin.Settings ["EraseCustom"]= customMethods;138 DefaultPlugin.Settings.EraseCustom = customMethods; 142 139 143 140 //Remove the old methods. … … 147 144 //Update the Erasure method manager on the methods 148 145 foreach (CustomErasureMethod method in addCustomMethods) 149 {150 customMethods.Add(method.GUID, method);151 146 ErasureMethodManager.Register(new EraseCustom(method), new object[] { method }); 152 }153 147 154 148 //Close the dialog
Note: See TracChangeset
for help on using the changeset viewer.
