Exemplo n.º 1
0
 public void Save(string key, string value)
 {
     lock (locker) {
         var editor = DefaultPrefs.Edit();
         if (String.IsNullOrEmpty(key) == false)
         {
             editor.PutString(key, value);
             editor.Apply();
         }
     }
 }
Exemplo n.º 2
0
 public void Save(Dictionary <string, string> values)
 {
     lock (locker) {
         if (values != null)
         {
             var editor = DefaultPrefs.Edit();
             foreach (var item in values)
             {
                 if (String.IsNullOrEmpty(item.Key) == false)
                 {
                     editor.PutString(item.Key, item.Value);
                 }
             }
             editor.Apply();
         }
     }
 }
Exemplo n.º 3
0
 public string Get(string key)
 {
     lock (locker) {
         return(DefaultPrefs.GetString(key, ""));
     }
 }