Beispiel #1
0
 private void button5_Click(object sender, EventArgs e)
 {
     label3.Visible = true;
     foreach (User user in added)
     {
         UsersSheet.AddNewUser(UsersSheet.GetService(UsersSheet.GetSheetCredentials()), UsersSheet.SpreadsheetId, user);
     }
     label3.Visible = false;
 }
Beispiel #2
0
 public Form3()
 {
     InitializeComponent();
     users = UsersSheet.GetUsers();
     foreach (User user in users)
     {
         listBox1.Items.Add(user.Index + " " + user.Nickname);
     }
 }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            label3.Visible = true;
            List <User>   users = UsersSheet.GetUsers();
            List <string> nodes = new List <string>();

            foreach (User user in users)
            {
                nodes.Add(user.Nickname + ":" + user.Password);
            }
            label3.Visible = false;
            if (!nodes.Contains(textBox2.Text + ":" + textBox1.Text))
            {
                MessageBox.Show("Неверное имя пользователя или пароль", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            user = users[nodes.IndexOf(textBox2.Text + ":" + textBox1.Text)];
            this.DialogResult = DialogResult.OK;
            this.Close();
        }