Example #1
0
 private void Form3_FormClosing_1(object sender, FormClosingEventArgs e)
 {
     timer1.Stop();
     if (txt2.Text != 0.ToString())
     {
         pn1.Visible = false;
         DialogResult result = MessageBox.Show("Save Game ?", "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             //ghifile
             ctn();
             BO.Ghimang("continutes.txt", continues);
             Environment.Exit(1);
         }
     }
     else
     {
         FormInfo f4 = new FormInfo();
         f4.Location = new Point(this.Location.X + (this.Width - f4.Width), this.Location.Y + (this.Height - f4.Height));
         int time = int.Parse(lb1.Text) * 60 + int.Parse(lb3.Text);
         f4.Time = time;
         f4.ShowDialog();
     }
 }