Exemplo n.º 1
0
        void button1_Click(object sender, EventArgs e)
        {
            Skor.BilgileriAl(textBox1.Text, dakika, saniye);
            Skor.Sirala();
            Skor.Kaydet();


            NesneTut.Close();
        }
Exemplo n.º 2
0
        private void timer1_Tick(object sender, EventArgs e)
        {//topun karakter kismi,характеристика мяча,где куда и как будет вести себя.
            if (top.Location.X <= 0)
            {
                top.hiz_X *= -1;
            }

            if (top.Location.X + top.Width >= this.Width - 10)
            {
                top.hiz_X *= -1;
            }

            if (top.Location.Y <= 59)
            {
                top.hiz_Y *= -1;
            }

            if (top.Location.X + top.Width / 2 >= raket.Location.X && top.Location.X + top.Width / 2 <= raket.Location.X + raket.Width && top.Location.Y + top.Height >= this.Height - 70)
            {
                top.hiz_Y *= -1;
                top.hiz_X += top.hiz_X / 10;
                top.hiz_Y += top.hiz_Y / 10;
                SystemSounds.Beep.Play();
            }

            else if (top.Location.Y + top.Height >= this.Height - 60)
            {
                timer1.Stop();
                label3.Visible = true;
                timer2.Stop();
                Cursor.Show();
                top.Visible  = false;
                Click_sayisi = 0;
                top.hiz_X    = 3;
                top.hiz_Y    = -3;
                SystemSounds.Hand.Play();
                //oyun bitis kismi,конец игры,характеристики ее

                ykr_skr.dakika = Dakika;
                ykr_skr.saniye = Saniye;

                if (Skor.BilgileriAl("12345", Dakika, Saniye))
                {
                    ykr_skr.FormAc();
                }

                Dakika = 0;
                Saniye = 0;
            }

            top.Location = new System.Drawing.Point(top.Location.X + (int)top.hiz_X, top.Location.Y + (int)top.hiz_Y);//sürekli yeni konuma çiziliyor
        }
Exemplo n.º 3
0
 public Form1()
 {
     Y_SkorlariGoster = new YuksekSkorlariGoster();
     skor             = new Skor();
     ykr_skr          = new Y_Skor();
     InitializeComponent();
     MouseMove      += Form1_MouseMove;
     KeyDown        += Form1_KeyDown;
     timer1.Interval = 1;
     timer2.Interval = 1000;
     MouseDown      += Form1_MouseDown;
     top.Visible     = false;
     //Oyun karakteri,характеристики игры
 }
Exemplo n.º 4
0
        public void FormuAc()
        {
            InitializeComponent();
            Skor.Oku();



            label1.Text = Skor.kisiler[0].ad;
            label2.Text = Skor.kisiler[1].ad;
            label3.Text = Skor.kisiler[2].ad;
            label4.Text = Skor.kisiler[3].ad;
            label5.Text = Skor.kisiler[4].ad;

            label10.Text = string.Format("{0:00}:{1:00}", Skor.kisiler[0].dakika, Skor.kisiler[0].saniye);
            label9.Text  = string.Format("{0:00}:{1:00}", Skor.kisiler[1].dakika, Skor.kisiler[1].saniye);
            label8.Text  = string.Format("{0:00}:{1:00}", Skor.kisiler[2].dakika, Skor.kisiler[2].saniye);
            label7.Text  = string.Format("{0:00}:{1:00}", Skor.kisiler[3].dakika, Skor.kisiler[3].saniye);
            label6.Text  = string.Format("{0:00}:{1:00}", Skor.kisiler[4].dakika, Skor.kisiler[4].saniye);

            NesneTut.Show();
        }