async private void paper_Click(object sender, EventArgs e) //ออกกระดาษ****************************** { Rock.Hide(); Scissors.Hide(); SpeakerCute1(@"C:\Users\BungK\source\repos\Rock-Paper-Scissors Game\Music\Sound\pop.wav"); PictureEnablefalse(); await Time2second(); paper.Visible = true; if (paper.Visible == true) { AT1.HideSync(paper); this.PlayerC.Load("C:\\Users\\BungK\\source\\repos\\Rock-Paper-Scissors Game\\Picture\\กระดาษ.png"); SpeakerCute1(@"C:\Users\BungK\source\repos\Rock-Paper-Scissors Game\Music\Sound\pop.wav"); await Time1second(); await BOTCLOADING(); await CountDownStart(); PG = "Paper"; //ระบบ RandomNumber RandomNumber(); //ระบบ RandomNumber //ตัวตัดสิน Zone ************************ Calculator(); //ตัวตัดสิน Zone ************************ Replay(); } }
async Task AnimatioClose() //Delay Close Animation { if (PictureMain.Visible == true) { Console.Beep(); AT1.HideSync(PictureMain); await Task.Delay(2000); PictureMain.Visible = false; PictureMain.Hide(); } }