예제 #1
0
 private void AddAccountButton_Click(object sender, EventArgs e)
 {
     AccountForm newAccount = new AccountForm("");
     if (newAccount.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         BlueVex2.Properties.Settings.Default.Accounts.Add(newAccount.Username + "," + newAccount.Password + "," + newAccount.CharSlot + "," + newAccount.Master + "," + newAccount.Realm);
         PopulateAccountsListView();
     }
 }
예제 #2
0
 private void EditAccountButton_Click(object sender, EventArgs e)
 {
     if (this.AccountsListView.SelectedItems.Count > 0)
     {
         string itemString = this.AccountsListView.SelectedItems[0].Text + "," + this.AccountsListView.SelectedItems[0].SubItems[1].Text + "," + this.AccountsListView.SelectedItems[0].SubItems[2].Text + "," + this.AccountsListView.SelectedItems[0].SubItems[3].Text + "," + this.AccountsListView.SelectedItems[0].SubItems[4].Text;
         AccountForm newAccount = new AccountForm(itemString);
         if (newAccount.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             BlueVex2.Properties.Settings.Default.Accounts.Remove(itemString);
             BlueVex2.Properties.Settings.Default.Accounts.Add(newAccount.Username + "," + newAccount.Password + "," + newAccount.CharSlot + "," + newAccount.Master + "," + newAccount.Realm);
             PopulateAccountsListView();
         }
     }
 }