private void button19_Click(object sender, EventArgs e)
        {
            MainBoard dominik2 = new MainBoard(textBox2.Text);

            dominik2.Show();
            Visible = false;
        }
示例#2
0
 private void BtnLogin_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(TxtUsername.Text) || string.IsNullOrEmpty(TxtPassword.Text))
     {
         MessageBox.Show("Boş xana buraxmayın");
         return;
     }
     if (!db.Users.Any(u => u.Username == TxtUsername.Text && u.Password == TxtPassword.Text))
     {
         MessageBox.Show("İstifadəçi adı və ya şifrə düzgün deyil!");
         PicLogin.Image = Resources.enter;
         return;
     }
     else
     {
         User      User = db.Users.First(u => u.Username == TxtUsername.Text);
         MainBoard form = new MainBoard(User);
         form.Show();
         this.Hide();
     }
 }
示例#3
0
        private void button1_Click(object sender, EventArgs e) // START
        {
            try
            {
                int.Parse(TB1.Text);
                int.Parse(TB2.Text);
                int.Parse(TB3.Text);
                int.Parse(TB4.Text);
                int.Parse(TB5.Text);
                int.Parse(TB6.Text);
                int.Parse(TB7.Text);
                int.Parse(TB8.Text);
                int.Parse(TB9.Text);
                int.Parse(TB10.Text);
                int.Parse(TB11.Text);
                int.Parse(TB12.Text);
                int.Parse(TB13.Text);
                int.Parse(TB14.Text);
                int.Parse(TB15.Text);
                int.Parse(TB16.Text);
                int.Parse(TB17.Text);
                int.Parse(TB18.Text);
                int.Parse(TB19.Text);
                int.Parse(TB20.Text);
                int.Parse(TB21.Text);
                int.Parse(TB22.Text);
                int.Parse(TB23.Text);
                int.Parse(TB24.Text);
                int.Parse(TB25.Text);
                int.Parse(TB26.Text);
            }

            catch
            {
                MessageBox.Show("BŁĄD - wpisane wartości muszą być liczbą");
                ActiveControl.Text = "0";
                return;
            }



            /* bool zmTry1 = true;
             * bool zmTry2 = true;
             * bool zmTry3 = true;
             * bool zmTry4 = true;
             * bool zmTry5 = true;
             * bool zmTry6 = true;
             * bool zmTry7 = true;
             * bool zmTry8 = true;
             * bool zmTry9 = true;
             * bool zmTry10 = true;
             * bool zmTry11 = true;
             * bool zmTry12 = true;
             * bool zmTry13 = true;
             * bool zmTry14 = true;
             * bool zmTry15 = true;
             * bool zmTry16 = true;
             * bool zmTry17 = true;
             * bool zmTry18 = true;
             * bool zmTry19 = true;
             * bool zmTry20 = true;
             * bool zmTry21 = true;
             * bool zmTry22 = true;
             * bool zmTry23 = true;
             * bool zmTry24 = true;
             * bool zmTry25 = true;
             * bool zmTry26 = true;
             *
             *
             *
             * bool.TryParse(TB1.Text, out zmTry1);
             * bool.TryParse(TB2.Text, out zmTry2);
             * bool.TryParse(TB3.Text, out zmTry3);
             * bool.TryParse(TB4.Text, out zmTry4);
             * bool.TryParse(TB5.Text, out zmTry5);
             * bool.TryParse(TB6.Text, out zmTry6);
             * bool.TryParse(TB7.Text, out zmTry7);
             * bool.TryParse(TB8.Text, out zmTry8);
             * bool.TryParse(TB9.Text, out zmTry9);
             * bool.TryParse(TB10.Text, out zmTry10);
             * bool.TryParse(TB11.Text, out zmTry11);
             * bool.TryParse(TB12.Text, out zmTry12);
             * bool.TryParse(TB13.Text, out zmTry13);
             * bool.TryParse(TB14.Text, out zmTry14);
             * bool.TryParse(TB15.Text, out zmTry15);
             * bool.TryParse(TB16.Text, out zmTry16);
             * bool.TryParse(TB17.Text, out zmTry17);
             * bool.TryParse(TB18.Text, out zmTry18);
             * bool.TryParse(TB19.Text, out zmTry19);
             * bool.TryParse(TB20.Text, out zmTry20);
             * bool.TryParse(TB21.Text, out zmTry21);
             * bool.TryParse(TB22.Text, out zmTry22);
             * bool.TryParse(TB23.Text, out zmTry23);
             * bool.TryParse(TB24.Text, out zmTry24);
             * bool.TryParse(TB25.Text, out zmTry25);
             * bool.TryParse(TB26.Text, out zmTry26);
             *
             * if (((zmTry1 && zmTry2 && zmTry3 && zmTry4 && zmTry5 && zmTry6 && zmTry7 && zmTry8 && zmTry9 && zmTry10 && zmTry11 && zmTry12 && zmTry13 && zmTry14 && zmTry15 && zmTry16 && zmTry17 && zmTry18 && zmTry19 && zmTry20 && zmTry21 && zmTry22 && zmTry23 && zmTry24 && zmTry25 && zmTry26) == true))
             * {
             *   MessageBox.Show("BŁĄD - wpisane wartości nie są liczbami całkowitymi");
             * }
             * else
             * {
             */

            Properties.Settings.Default["ZM1"]  = TB1.Text;
            Properties.Settings.Default["ZM2"]  = TB2.Text;
            Properties.Settings.Default["ZM3"]  = TB3.Text;
            Properties.Settings.Default["ZM4"]  = TB4.Text;
            Properties.Settings.Default["ZM5"]  = TB5.Text;
            Properties.Settings.Default["ZM6"]  = TB6.Text;
            Properties.Settings.Default["ZM7"]  = TB7.Text;
            Properties.Settings.Default["ZM8"]  = TB8.Text;
            Properties.Settings.Default["ZM9"]  = TB9.Text;
            Properties.Settings.Default["ZM10"] = TB10.Text;
            Properties.Settings.Default["ZM11"] = TB11.Text;
            Properties.Settings.Default["ZM12"] = TB12.Text;
            Properties.Settings.Default["ZM13"] = TB13.Text;
            Properties.Settings.Default["ZM14"] = TB14.Text;
            Properties.Settings.Default["ZM15"] = TB15.Text;
            Properties.Settings.Default["ZM16"] = TB16.Text;
            Properties.Settings.Default["ZM17"] = TB17.Text;
            Properties.Settings.Default["ZM18"] = TB18.Text;
            Properties.Settings.Default["ZM19"] = TB19.Text;
            Properties.Settings.Default["ZM20"] = TB20.Text;
            Properties.Settings.Default["ZM21"] = TB21.Text;
            Properties.Settings.Default["ZM22"] = TB22.Text;
            Properties.Settings.Default["ZM23"] = TB23.Text;
            Properties.Settings.Default["ZM24"] = TB24.Text;
            Properties.Settings.Default["ZM25"] = TB25.Text;
            Properties.Settings.Default["ZM26"] = TB26.Text;


            Properties.Settings.Default.Save();


            Hide();
            MainBoard dominik2 = new MainBoard("TEST");

            dominik2.Show();
            Visible = false;
        }