I've added an IPreferences interface to Do.Addins. Plugins can get their own
managed preferences object using GetPreferences (string unique_name):
IPreferences prefs = Do.Addins.Util.GetPreferences ("my-plugin-name");
prefs ["folder"] = "~/Desktop";
string saved_something = prefs ["something"];
// also supports bools, ints, maybe more:
bool advanced_mode = prefs.Get<bool> ("advanced_mode", false);
// Wrap prefences Get/Set with properties:
int RefreshRate {
get { return prefs.Get<int> ("RefreshRate", 10); }
set { prefs.Set<int> ("RefreshRate", value); }
}
Do handles the rest.
David
_______________________________________________
Mailing list: https://launchpad.net/~do-plugins
Post to : [email protected]
Unsubscribe : https://launchpad.net/people/+me/+editemails
More help : https://help.launchpad.net/ListHelp