コード例 #1
0
        private void Form2_FormClosing(object sender, FormClosingEventArgs e)
        {
            izasao = true;
            muzika.Stop();
            if (tGenerator.IsAlive)
            {
                tGenerator.Abort();
            }
            if (tAnimator.IsAlive)
            {
                tAnimator.Abort();
                if (MessageBox.Show("VAS SKOR: " + poeni + "\nPokusati ponovo?", "GAMEOVER", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    Score   s = new Score(username, poeni);
                    Pocetna p = new Pocetna(s);
                    p.MdiParent = this.MdiParent;

                    p.Show();
                    this.Hide();
                }

                else
                {
                    tAnimator.Abort();
                    this.MdiParent.Close();
                    this.Close();
                }
            }
        }
コード例 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Pocetna p = new Pocetna(null);

            p.MdiParent = this;
            p.Height    = this.ClientSize.Height;
            p.Width     = this.ClientSize.Width;
            p.Show();
            p.FormBorderStyle = FormBorderStyle.None;
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            klik.SoundLocation = @"C:\Users\djuri\source\repos\IgricaElvis\button_click.wav";
            klik.Play();
            Pocetna p = new Pocetna(null);

            p.MdiParent = this.MdiParent;
            p.Show();
            this.Close();
        }