コード例 #1
0
 private void Register_Button_Click(object sender, EventArgs e)
 {
     if (!User_box.Text.Equals("") && !Pass_box.Text.Equals(""))
     {
         if (Adatbazis.RegisterCheck(User_box.Text) == 0)
         {
             Adatbazis.InsertInto_Player(User_box.Text, Pass_box.Text);
             Adatbazis.InsertInto_Loot(User_box.Text);
             User_box.Clear();
             Pass_box.Clear();
         }
         else
         {
             string message = "Van már ilyen felhasználónév!";
             string caption = "Form Closing";
             MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         string message = "Nem töltött ki egy mezőt";
         string caption = "Form Closing";
         MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #2
0
        private void Pick_up_loot_Click(object sender, EventArgs e)
        {
            Login form = new Login();

            Adatbazis.Update(Adatbazis.Select_Player_Id(form.User_box.Text), tapasztalatipont);
            this.Hide();
            InGame.ActiveForm.Hide();
            Basic form2 = new Basic();

            form2.ShowDialog();
        }
コード例 #3
0
 private void Login_Button_Click(object sender, EventArgs e)
 {
     if (Adatbazis.Select(User_box.Text, Pass_box.Text) == 0)
     {
         string message = "Invalid vagy!";
         string caption = "Form Closing";
         MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         Basic form = new Basic();
         this.Hide();
         form.ShowDialog();
     }
 }
コード例 #4
0
        private void Basic_Load(object sender, EventArgs e)
        {
            Login form = new Login();
            int   i    = Adatbazis.Select_Player_Id(form.User_box.Text);

            p = new Player(form.User_box.Text,
                           Adatbazis.Select_Player_Id(form.User_box.Text),
                           Adatbazis.Select_Player_Arany(i),
                           Adatbazis.Select_Player_Tapasztalati_Pont(i),
                           Adatbazis.Select_Player_Jogosultsag(i),
                           Adatbazis.Select_Player_Palya(i)
                           );
            Arany.Text += p.arany;
            Loot form2 = new Loot();

            Szint.Value       = form2.tapasztalatipont;
            Player_info.Text += p.username;
        }
コード例 #5
0
 private void Form1_Load(object sender, EventArgs e)
 {
     Adatbazis.Adatbazisletrehozas();
 }