コード例 #1
0
 private void bu_medic_Click(object sender, EventArgs e)
 {
     if (Educlass.health > 0)
     {
         Educlass.health--;
         Medical(life);
         lab_medic.Text = Convert.ToString(Educlass.health);
     }
     else
     {
         bu_medic.Enabled = false;
     }
     Educlass.SavedData(connectku, Educlass.proname);
 }
コード例 #2
0
 private void bu_next_Click(object sender, EventArgs e)
 {
     if (Educlass.Next > 0)
     {
         Educlass.Next--;
         BeriSoal();
         lab_next.Text = Convert.ToString(Educlass.Next);
     }
     else
     {
         bu_next.Enabled = false;
     }
     Educlass.SavedData(connectku, Educlass.proname);
 }
コード例 #3
0
 private void LoadForm(Form frm)
 {
     if (gameload == true)
     {
         gameload = false;
         //SAVE DATA SAAT FORM DIGANTI
     }
     frm.TopLevel        = false;
     frm.FormBorderStyle = FormBorderStyle.None;
     frm.WindowState     = FormWindowState.Maximized;
     frm.Dock            = DockStyle.Fill;
     lopan.Controls.Add(frm);
     frm.Show();
     Educlass.SavedData(connectku, Educlass.proname);
 }
コード例 #4
0
 private void bu_freeze_Click(object sender, EventArgs e)
 {
     if (Educlass.Friz > 0)
     {
         Educlass.Friz--;
         tmr_freeze.Start();
         bu_freeze.Enabled = false;
         lab_freeze.Text   = Convert.ToString(Educlass.Friz);
     }
     else
     {
         bu_freeze.Enabled = false;
         tmr_freeze.Dispose();
     }
     Educlass.SavedData(connectku, Educlass.proname);
 }
コード例 #5
0
 private void txtjawab_TextChanged(object sender, EventArgs e)
 {
     if (txtjawab.Text == Jawaban)
     {
         BeriSoal();
         txtjawab.Clear();
         pbar.Value     = pbar.Maximum;//Reset progressbar
         score         += 2;
         lab_score.Text = Convert.ToString(score);
         if (lab_challange.Text != "No Challange Yet.. Keep Focus !!")
         {
             Educlass.uang += timechallange * 2;
             lab_money.Text = Convert.ToString(Educlass.uang);
             Educlass.SavedData(connectku, Educlass.proname);
         }
         Challange();
     }
 }
コード例 #6
0
        private void Beliapa(string barang, int harga)
        {
            if (Educlass.uang < harga)
            {
                labshop.Text = "UANG TIDAK CUKUP";
            }
            else
            {
                switch (barang)
                {
                case "freeze":
                    Educlass.Friz++;
                    labshop.Text  = "Total Freeze :" + Educlass.Friz;
                    Educlass.uang = Educlass.uang - harga;
                    break;

                case "hint":
                    Educlass.hint++;
                    labshop.Text  = "Total Hint :" + Educlass.hint;
                    Educlass.uang = Educlass.uang - harga;
                    break;

                case "skip":
                    Educlass.Next++;
                    labshop.Text  = "Total Skip :" + Educlass.Next;
                    Educlass.uang = Educlass.uang - harga;
                    break;

                case "heal":
                    Educlass.health++;
                    labshop.Text  = "Total Heal :" + Educlass.health;
                    Educlass.uang = Educlass.uang - harga;
                    break;
                }
            }
            lab_money.Text = Convert.ToString(Educlass.uang);
            Educlass.SavedData(connectku, Educlass.proname);
        }