Beispiel #1
0
 void OnLose(int lvl)
 {
     if (next.InvokeRequired)
     {
         next.Invoke(new Action <int>(OnLose), lvl);
     }
     else
     {
         isFinish = false;
         success resultWindow = new success("败北!");
         resultWindow.Shown      += BlockWindow;
         resultWindow.FormClosed += UnblockWindow;
         resultWindow.OnShow();
         Sound.StopBGM();
         Sound.PlaySE("se_lose");
         timer1.Stop();
         hanziPictureBox1.Enabled = false;
         next.Enabled             = true;
     }
 }
Beispiel #2
0
 void OnFinishLevel(int lvl)
 {
     if (lvl % 10 == 0)
     {
         Sound.PlaySE("se_challenge_finish10hanzi");
     }
     if (next.InvokeRequired)
     {
         next.Invoke(new Action <int>(OnFinishLevel), lvl);
     }
     else
     {
         isFinish = true;
         success resultWindow = new success("完成!");
         resultWindow.Shown      += BlockWindow;
         resultWindow.FormClosed += UnblockWindow;
         resultWindow.OnShow();
         timer1.Stop();
         hanziPictureBox1.Enabled = false;
         next.Enabled             = true;
     }
 }
 void OnLose(int lvl)
 {
     if (next.InvokeRequired)
     {
         next.Invoke(new Action<int>(OnLose), lvl);
     }
     else
     {
         isFinish = false;
         success resultWindow = new success("败北!");
         resultWindow.Shown += BlockWindow;
         resultWindow.FormClosed += UnblockWindow;
         resultWindow.OnShow();
         Sound.StopBGM();
         Sound.PlaySE("se_lose");
         timer1.Stop();
         hanziPictureBox1.Enabled = false;
         next.Enabled = true;
     }
 }
 void OnFinishLevel(int lvl)
 {
     if (lvl % 10 == 0) Sound.PlaySE("se_challenge_finish10hanzi");
     if (next.InvokeRequired)
     {
         next.Invoke(new Action<int>(OnFinishLevel), lvl);
     }
     else
     {
         isFinish = true;
         success resultWindow = new success( "完成!" );
         resultWindow.Shown += BlockWindow;
         resultWindow.FormClosed += UnblockWindow;
         resultWindow.OnShow();
         timer1.Stop();
         hanziPictureBox1.Enabled = false;
         next.Enabled = true;
     }
 }