private void onAddCharacter(object sender, RoutedEventArgs e)
        {
            AddAPIKeyDlg dlg = new AddAPIKeyDlg();

             dlg.ShowDialog();

             if (dlg.DialogResult == true)
             {
            apiKeyViewModel newKey = dlg.Kvm;

            foreach (apiKeyViewModel vm in Keys)
            {
               if (newKey.ID == vm.ID && newKey.vCode == vm.vCode)
               {
                  MessageBox.Show("Duplicate API Key.");
                  return;
               }
            }

            Keys.Add(newKey);
            SaveKeys();
             }
        }
        private void onEditCharacter(object sender, RoutedEventArgs e)
        {
            if (_keyList.SelectedItem == null)
            return;

             apiKeyViewModel copy = AppTemplate.Utilities.Serializer.DeepCopy<apiKeyViewModel>(_keyList.SelectedItem);
             AddAPIKeyDlg dlg = new AddAPIKeyDlg(copy);

             dlg.ShowDialog();
             if (dlg.DialogResult == true)
             {
            copy.Refresh();

            keys_[_keyList.SelectedIndex] = dlg.Kvm;
            SaveKeys();
             }
        }