private void button1_Click(object sender, EventArgs e) { var login = textBox1.Text; var password = textBox2.Text; VkAccount.AddAccount(login, password); this.Close(); }
public static void AddAccount(string login, string password) { VkAccount account = new VkAccount(); account.Login = login; account.Password = password; account.id = CurrentAvailableID++; Accounts.Add(account); }