Example #1
0
        private void DeleteApi(object parameter)
        {
            var key = parameter as ApiKeyDefinition;

            ApiKeys.Remove(key ?? SelectedApiKey);

            Update();
        }
Example #2
0
        private void DeleteApi(object parameter)
        {
            var key = parameter as ApiKeyDefinition;

            ApiKeys.Remove(key ?? SelectedApiKey);

            ApiKeys = new ObservableCollection <ApiKeyDefinition>(ApiKeys);
            OnPropertyChanged(() => ApiKeys);
        }
Example #3
0
 /// <summary>
 /// Will remove a key from the system. It will NOT be automatically removed from the config file. You must do that manually.
 /// </summary>
 /// <param name="key"></param>
 public void RemoveKey(string key)
 {
     lock (ApiKeys)
     {
         if (ApiKeys.Contains(key))
         {
             ApiKeys.Remove(key);
         }
     }
 }
Example #4
0
 public async Task RemoveApiKeyAsync(ExtendedUser user, ExtendedApiKey apiKey)
 {
     ApiKeys.Remove(apiKey);
     user.ApiKeys.Remove(apiKey);
 }