Esempio n. 1
0
        private void clearPreferences(object sender, Android.Support.V7.Preferences.Preference.PreferenceClickEventArgs e)
        {
            var prefs = PreferenceManager.SharedPreferences;
            ISharedPreferencesEditor editor = prefs.Edit();

            editor.Clear();
            editor.Apply();
            Acr.UserDialogs.UserDialogs.Instance.ShowSuccess("Preferences cleared!");
        }
Esempio n. 2
0
 private void LogOutPref_PreferenceClick(object sender, Android.Support.V7.Preferences.Preference.PreferenceClickEventArgs e)
 {
     new AlertDialog.Builder(Activity)
     .SetTitle(StringResources.settings_logout_dialog_title)
     .SetMessage(StringResources.settings_logout_dialog_message)
     .SetNegativeButton(StringResources.common_comms_cancel, (a, b) => { })
     .SetPositiveButton(StringResources.settings_logout_dialog_confirm, (a, b) => { ((MainActivity)Activity).LogOut(); })
     .Show();
 }
Esempio n. 3
0
        private void ViewOnPreferenceClick(object sender, Android.Support.V7.Preferences.Preference.PreferenceClickEventArgs args)
        {
            if (_command == null)
            {
                return;
            }

            if (!_command.CanExecute(null))
            {
                return;
            }

            _command.Execute(null);
        }