Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Length > 1 & textBox2.Text.Length > 1)
     {
         group = textBox1.Text;
         user  = textBox2.Text;
         user  = char.ToUpper(user[0]) + user.Substring(1);
         string token = Requests.POST("auth", group, user);
         if (token == "False")
         {
             label4.Visible = true;
         }
         else
         {
             GlobalVars.clientToken = token;
             GetTest GetTestForm = new GetTest();
             Hide();
             GetTestForm.Show();
         }
     }
 }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Length != 0 & textBox2.Text.Length != 0)
     {
         group = textBox1.Text;
         foreach (var i in textBox2.Text) //делаем первые буквы инициалов заглавными
         {
             if (shit)
             {
                 user = user + i.ToString().ToUpper();
                 shit = false;
             }
             else
             {
                 user = user + i.ToString().ToLower();
             }
             if (i == 32)
             {
                 shit = true;
             }
             //label4.Visible = true;
             //label4.Text = user;
         }
         string token = Requests.POST("http://sprut-2.ddns.net:8080/", "auth", textBox1.Text + "," + textBox2.Text + "," + textBox3.Text);
         if (!(token == "False"))
         {
             GetTest GetTestForm = new GetTest();
             Hide();
             GetTestForm.Show();
         }
         else
         {
             label4.Visible = true;
         }
     }
 }