コード例 #1
0
        private void addAccountsBtn_Click(object sender, EventArgs e)
        {
            if (newUserNameInput.Text.Length == 0 || QueueTypeInput.Text.Length == 0)
            {
                MessageBox.Show("Username and Q type cannot be empty!!!");
            }

            else
            {
                if (QueueTypeInput.SelectedIndex == -1 && SelectChampionInput.SelectedIndex == -1)
                {
                    FileHandlers.AccountsTxt(newUserNameInput.Text, newPasswordInput.Text);
                }
                else if (SelectChampionInput.SelectedIndex == -1)
                {
                    FileHandlers.AccountsTxt(newUserNameInput.Text, newPasswordInput.Text, QueueTypeInput.SelectedItem.ToString());
                }
                else
                {
                    FileHandlers.AccountsTxt(newUserNameInput.Text, newPasswordInput.Text, QueueTypeInput.SelectedItem.ToString(), SelectChampionInput.SelectedItem.ToString());
                }
                start();

                //queueLoop();
            }
        }
コード例 #2
0
 private void addAccountsBtn_Click(object sender, EventArgs e)
 {
     if (newUserNameInput.Text.Length == 0 || newPasswordInput.Text.Length == 0)
     {
         MessageBox.Show("Username and Password cannot be empty!!!");
     }
     else
     {
         FileHandlers.AccountsTxt(newUserNameInput.Text, newPasswordInput.Text, QueueTypeInput.SelectedItem.ToString());
         Print("Thay đổi tài khoản thành công !");
         var content = newUserNameInput.Text + "|" + newPasswordInput.Text + "|" + QueueTypeInput.SelectedItem.ToString();
         Print(content);
         Program.loadAccounts();
         update_acc();
     }
 }