Ignore:
Timestamp:
4/28/2010 8:52:58 AM (5 years ago)
Author:
lowjoel
Message:

Revised code to deal with settings. This version uses native types where possible to increase portability and ease of registry editing. It also deals with defaults.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.DefaultPlugins/Plugin.cs

    r1802 r1983  
    111111            get 
    112112            { 
    113                 return settings["FL16Method"] == null ? Guid.Empty : 
    114                     (Guid)settings["FL16Method"]; 
     113                return settings.GetValue<Guid>("FL16Method"); 
    115114            } 
    116115            set 
    117116            { 
    118                 settings["FL16Method"] = value; 
     117                settings.SetValue("FL16Method", value); 
    119118            } 
    120119        } 
     
    127126            get 
    128127            { 
    129                 return (Dictionary<Guid, CustomErasureMethod>)settings["EraseCustom"]; 
     128                return settings.GetValue<Dictionary<Guid, CustomErasureMethod>>("EraseCustom"); 
    130129            } 
    131130            set 
    132131            { 
    133                 settings["EraseCustom"] = value; 
     132                settings.SetValue("EraseCustom", value); 
    134133            } 
    135134        } 
Note: See TracChangeset for help on using the changeset viewer.