Exemple #1
0
        void IDualityBackend.Shutdown()
        {
            if (sharedPrefs != null)
            {
                ((IPreferencesBackend)this).Commit();

                sharedPrefs.Dispose();
                sharedPrefs = null;
            }
        }
Exemple #2
0
        public void ResetUserID(object sender, EventArgs e)
        {
            App.GetUser = String.Empty;
            App.userID  = String.Empty;
            ISharedPreferences       pref   = GetSharedPreferences("MEI_UserPreferences", FileCreationMode.Private);
            ISharedPreferencesEditor editor = pref.Edit();

            editor.PutString("MEI_UserID", String.Empty);
            editor.PutString("MEI_AllDomainData", String.Empty);
            editor.PutString("MEI_UserData", String.Empty);
            editor.Clear();
            editor.Apply();
            pref.Dispose();
        }
Exemple #3
0
 public void Save()
 {
     //Commit changes and dispose
     if (_editor != null)
     {
         _editor.Commit();
         _editor.Dispose();
         _editor = null;
     }
     if (_preferences != null)
     {
         _preferences.Dispose();
         _preferences = null;
     }
 }
 public void Dispose()
 {
     _pref?.Dispose();
     _editor?.Dispose();
 }
 public new void Dispose( )
 {
     base.Dispose( );
     localStateDatabase.Dispose( );
 }