Example #1
0
 private void BtnSifirla_Click(object sender, EventArgs e)
 {
     Timer1.Stop();
     Timer1.Dispose();
     LBLSure.Text = @"00:00:00";
     MtbSaat.Text = "";
 }
 public void getnextquestion()
 {
     try
     {
         if (count == ds.Tables[0].Rows.Count)
         {
             Label3.Visible = true;
         }
         else
         {
             Label1.Text = ds.Tables[0].Rows[count][0].ToString();
             count++;
         }
     }
     catch (Exception ex)
     {
         Label3.Visible = true;
         Timer1.Dispose();
         Button1.Enabled = false;
         Label4.Visible  = true;
         Label4.Text     = right.ToString();
         Label5.Visible  = true;
         Label6.Visible  = true; Label7.Visible = true;
         Label7.Text     = ds.Tables[0].Rows.Count.ToString();
     }
 }
        /// <summary>
        /// Aktualizacja labelki z czasem.
        /// </summary>
        protected void Timer1_Tick(object sender, EventArgs e)
        {
            int czas = int.Parse(ViewState["CZAS"].ToString());

            LabelTime.Text = czas.ToString();
            czas--;
            ViewState["CZAS"] = czas;

            if (czas < 0)
            {
                Timer1.Dispose();

                Response.Redirect("~/Default.aspx");
            }
        }
Example #4
0
        /// <summary>
        /// Al doilea buton 'inapoi' care duce controlul jocului de la jocul efectiv la meniul unde se poate alege nivelul jocului
        /// </summary>
        /// <param name="sender">Obiectul sender standard asociat unei proceduri-eveniment</param>
        /// <param name="e">Variabila de tip EventArgs standard asociata unei proceduri-eveniment</param>
        public void secondBack(object sender, EventArgs e)
        {
            nrSecunde = 0;
            timpi     = 0;
            Timer1.Stop();
            cronometruEticheta.Text = "00:00:00";
            Timer1.Dispose();
            btn1.Visible    = true;
            medium1.Visible = true;
            hard1.Visible   = true;
            back.Visible    = true;
            Button1.Visible = false;
            Button2.Visible = false;
            Button3.Visible = false;
            Button4.Visible = false;
            Button5.Visible = false;

            cronometruEticheta.Visible = false;
            scorEticheta.Visible       = false;
            backsecond.Visible         = false;
            InitializeazaJoc();
        }