private void ClickBtn_Click(object sender, EventArgs e) { HelloLbl.Text = "Go Eagle Sports Team!"; Mainfrm.ActiveForm.Text = "Go Eagle Sports Team!"; ExitBtn.Dispose(); ClickBtn.Enabled = false; }
public IEnumerator PopBtn() { yield return(new WaitForSeconds(2)); startBtn.SetActive(true); AIBtn.SetActive(true); ExitBtn.SetActive(true); }
void Start() { foreach (var Cat in Category) { Cat.SetActive(false); PlayBtn.SetActive(true); ExitBtn.SetActive(true); } }
private void ToggleButtons(bool onOff) { ExitBtn.SetActive(onOff); DefinitionsBtn.SetActive(onOff); BestiaryBtn.SetActive(onOff); PlayerBtn.SetActive(onOff); SquadronBtn.SetActive(onOff); AbilitiesBtn.SetActive(onOff); }
public void OnPlayClick() { //Show Categories foreach (var Cat in Category) { Cat.SetActive(true); //Disable Play Buttton PlayBtn.SetActive(false); ExitBtn.SetActive(false); } }
// Use this for initialization void Start() { Instance = this; Input.multiTouchEnabled = true; isStarted = false; isOver = true; isAI = false; startBtn.SetActive(true); AIBtn.SetActive(true); ExitBtn.SetActive(true); //Sound.Instance.playBg(); }
public void PushStartBtn() { Sound.Instance.stopBg(); Sound.Instance.stopWin(); isStarted = true; startBtn.SetActive(false); AIBtn.SetActive(false); ExitBtn.SetActive(false); Instantiate(counter); Sound.Instance.playCountdown(); BlueSide.Instance.Initial(); RedSide.Instance.Initial(); StartCoroutine(Initial()); }
//Logout Button private void LockBtn_Click(object sender, EventArgs e) {//Hiding all Ui elements UserLabel.Hide(); UserBtn.Hide(); DetectBtn.Hide(); TrainBtn.Hide(); LockBtn.Hide(); ExitBtn.Hide(); mark2.Hide(); LoginPanel.Show(); LoginPanel.Dock = DockStyle.Fill; LoginPanel.BringToFront(); NameBox.Text = ""; PassBox.Text = ""; }
//Submit Button private async void SigninBtn_Click(object sender, EventArgs e) { //Check if Id and password are not empty if (NameBox.Text != "" && PassBox.Text != "") { //If Login Case if (SigninBtn.ButtonText == "Login") { //DOLOGIN : by Sending user and pw to reader Class of data base SignInResult resutl = LoginSys.SignIn(NameBox.Text, PassBox.Text); if (resutl.LoggedIn) { //If Login Operation Successfull , Show the Ui LoginPanel.Dock = DockStyle.None; LoginPanel.Hide(); LoginPanel.SendToBack(); UserLabel.Show(); UserBtn.Show(); DetectBtn.Show(); TrainBtn.Show(); LockBtn.Show(); ExitBtn.Show(); mark2.Show(); UserLabel.Text = resutl.UserData.Name.ToUpperInvariant(); DetectionPanel.Show(); } else { label3.Text = resutl.Reason; } } else { //If Registration Senario : Sending User and pw to Writer Class bool suResult = await LoginSys.SignUp(NameBox.Text, PassBox.Text, "", 0); if (suResult) { label3.Text = "Registration Done Sucessfully"; } } } }
//hides the main menu void hideMenu() { ClassicBtn.Hide(); ExitBtn.Hide(); HelpBtn.Hide(); TimeBtn.Hide(); multiplayerBtn.Hide(); menuBack.Hide(); HomeTLbl.Hide(); boardHomeBtn.Show(); TitleLbl.Show(); if (gameMode == 2) { P1ScoreLbl.Show(); P2ScoreLbl.Show(); turnLbl.Show(); } }
//shows the main menu void showMenu() { ClassicBtn.Invoke(new Action(() => ClassicBtn.Show())); ExitBtn.Invoke(new Action(() => ExitBtn.Show())); HelpBtn.Invoke(new Action(() => HelpBtn.Show())); multiplayerBtn.Invoke(new Action(() => multiplayerBtn.Show())); TimeBtn.Invoke(new Action(() => TimeBtn.Show())); menuBack.Invoke(new Action(() => menuBack.Show())); HomeTLbl.Invoke(new Action(() => HomeTLbl.Show())); boardHomeBtn.Invoke(new Action(() => boardHomeBtn.Hide())); CountdownLbl.Invoke(new Action(() => CountdownLbl.Hide())); TitleLbl.Invoke(new Action(() => TitleLbl.Hide())); if (gameMode == 2) { P1ScoreLbl.Invoke(new Action(() => P1ScoreLbl.Hide())); P2ScoreLbl.Invoke(new Action(() => P2ScoreLbl.Hide())); turnLbl.Invoke(new Action(() => turnLbl.Hide())); } }
private void timer2_Tick(object sender, EventArgs e) { // 检查UUID是否一致 String localUUID = Utility.getUUID(); SqlDataAdapter da = new SqlDataAdapter("select * from users where 用户ID='" + mySystem.Parameter.userID + "'", Parameter.connUser); SqlCommandBuilder cb = new SqlCommandBuilder(da); DataTable dt = new DataTable("user"); da.Fill(dt); if (dt.Rows.Count >= 1) { String remoteUUID = dt.Rows[0]["token"].ToString(); if (remoteUUID == "") { dt.Rows[0]["token"] = localUUID; } else if (localUUID != remoteUUID) { timer2.Stop(); MessageBox.Show("该账号已在别处登陆,您已下线", "下线提醒", MessageBoxButtons.OK); ExitBtn.PerformClick(); } } }
public virtual void Draw(Vector2 OFFSET) { if (MobDowns.Current < 42 && MobTops.Current < 42 && MobLefts.Current < 42 && MobRights.Current < 42) { backGround.Draw(OFFSET); mainChar.Draw(OFFSET); // power #region power.Draw(OFFSET); if (powerCycle >= 500) { power01.Draw(OFFSET); } if (powerCycle >= 700) { power02.Draw(OFFSET); } if (powerCycle >= 900) { power03.Draw(OFFSET); } if (powerCycle >= 1100) { power04.Draw(OFFSET); } if (powerCycle == 1300) { flat = true; } if (flat) { if (powerCycle >= 1300) { powerfull01.Draw(OFFSET); } if (powerCycle >= 1320) { powerfull02.Draw(OFFSET); } if (powerCycle >= 1340) { powerfull03.Draw(OFFSET); } if (powerCycle >= 1360) { powerfull04.Draw(OFFSET); isPower = true; powerCycle = 1320; } } if (GameGlobals.gameTimePassed % 1670 == 0 && powerCycle > 1300) { isPower = false; powerCycle = 0; } if (GameGlobals.gameTimePassed % 1700 == 0 && powerCycle > 1300) { flat = false; } #endregion // draw Mobs MobTops.Draw(OFFSET); TopBar.Draw(new Vector2(MobTops.pos.X - 70, MobTops.pos.Y - 160)); if (GameGlobals.gameTimePassed >= 1000) { MobDowns.Draw(OFFSET); DownBar.Draw(new Vector2(MobDowns.pos.X - 100, MobDowns.pos.Y - 200)); if (GameGlobals.gameTimePassed >= 1500) { MobLefts.Draw(OFFSET); LeftBar.Draw(new Vector2(MobLefts.pos.X - 70, MobLefts.pos.Y - 190)); } if (GameGlobals.gameTimePassed >= 2200) { MobRights.Draw(OFFSET); RightBar.Draw(new Vector2(MobRights.pos.X - 70, MobRights.pos.Y - 165)); } } //draw projectile for (int i = 0; i < Projectile2Ds.Count; i++) { Projectile2Ds[i].Draw(OFFSET); } if (isPower) { for (int i = 0; i < projectile2DforMainChars.Count; i++) { projectile2DforMainChars[i].Draw(OFFSET); } } } else { //GameGlobals.score = GameGlobals.score + 5; if (textCycle >= 0) { backGroundEndGame.Draw(OFFSET); textCycle++; } if (textCycle >= 25) { GameOver01.Draw(OFFSET); textCycle++; } if (textCycle >= 50) { GameOver02.Draw(OFFSET); textCycle++; } if (textCycle >= 75) { GameOver03.Draw(OFFSET); textCycle++; } if (textCycle >= 90) { textCycle = 0; } ResetBtn.Draw(OFFSET); ExitBtn.Draw(OFFSET); if (GameGlobals.score != 0) { E0 = GameGlobals.score % 10; GameGlobals.score = GameGlobals.score / 10; E1 = GameGlobals.score % 10; GameGlobals.score = GameGlobals.score / 10; E2 = GameGlobals.score % 10; GameGlobals.score = GameGlobals.score / 10; E3 = GameGlobals.score % 10; GameGlobals.score = GameGlobals.score / 10; } if (E0 == 5) { scoreE00.Draw(OFFSET); } if (E0 == 0) { scoreE00.Draw(OFFSET); } if (E1 == 0) { scoreE10.Draw(OFFSET); } if (E1 == 1) { scoreE11.Draw(OFFSET); } if (E1 == 2) { scoreE12.Draw(OFFSET); } if (E1 == 3) { scoreE13.Draw(OFFSET); } if (E1 == 4) { scoreE14.Draw(OFFSET); } if (E1 == 5) { scoreE15.Draw(OFFSET); } if (E1 == 6) { scoreE16.Draw(OFFSET); } if (E1 == 7) { scoreE17.Draw(OFFSET); } if (E1 == 8) { scoreE18.Draw(OFFSET); } if (E1 == 9) { scoreE19.Draw(OFFSET); } if (E2 == 0) { scoreE20.Draw(OFFSET); } if (E2 == 1) { scoreE21.Draw(OFFSET); } if (E2 == 2) { scoreE22.Draw(OFFSET); } if (E2 == 3) { scoreE23.Draw(OFFSET); } if (E2 == 4) { scoreE24.Draw(OFFSET); } if (E2 == 5) { scoreE25.Draw(OFFSET); } if (E2 == 6) { scoreE26.Draw(OFFSET); } if (E2 == 7) { scoreE27.Draw(OFFSET); } if (E2 == 8) { scoreE28.Draw(OFFSET); } if (E2 == 9) { scoreE29.Draw(OFFSET); } //ResetScript.Draw(OFFSET); //ExitScript.Draw(OFFSET); //if (GameGlobals.score % 10 == 0) score00.Draw(OFFSET); else score05.Draw(OFFSET); } Globals.spriteBatch.DrawString(tester, GameGlobals.score.ToString(), new Vector2(1000, 1000), Color.Red, 0, OFFSET, 2, new SpriteEffects(), 0); // countscore #region if (GameGlobals.score != 0 && MobDowns.Current < 42 && MobTops.Current < 42 && MobLefts.Current < 42 && MobRights.Current < 42) { if (GameGlobals.score % 5 == 0) { score05.Draw(OFFSET); } if (GameGlobals.score % 10 == 0) { score00.Draw(OFFSET); } if (GameGlobals.score >= 10) { score01.Draw(OFFSET); } if (GameGlobals.score >= 20) { score02.Draw(OFFSET); } if (GameGlobals.score >= 30) { score03.Draw(OFFSET); } if (GameGlobals.score >= 40) { score04.Draw(OFFSET); } if (GameGlobals.score >= 50) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 60) { score06.Draw(OFFSET); } if (GameGlobals.score >= 70) { score07.Draw(OFFSET); } if (GameGlobals.score >= 80) { score08.Draw(OFFSET); } if (GameGlobals.score >= 90) { score09.Draw(OFFSET); } if (GameGlobals.score >= 100) { score013rd.Draw(OFFSET); if (GameGlobals.score < 110) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 110) { score01.Draw(OFFSET); } if (GameGlobals.score >= 120) { score02.Draw(OFFSET); } if (GameGlobals.score >= 130) { score03.Draw(OFFSET); } if (GameGlobals.score >= 140) { score04.Draw(OFFSET); } if (GameGlobals.score >= 150) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 160) { score06.Draw(OFFSET); } if (GameGlobals.score >= 170) { score07.Draw(OFFSET); } if (GameGlobals.score >= 180) { score08.Draw(OFFSET); } if (GameGlobals.score >= 190) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 200) { score023rd.Draw(OFFSET); if (GameGlobals.score < 210) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 210) { score01.Draw(OFFSET); } if (GameGlobals.score >= 220) { score02.Draw(OFFSET); } if (GameGlobals.score >= 230) { score03.Draw(OFFSET); } if (GameGlobals.score >= 240) { score04.Draw(OFFSET); } if (GameGlobals.score >= 250) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 260) { score06.Draw(OFFSET); } if (GameGlobals.score >= 270) { score07.Draw(OFFSET); } if (GameGlobals.score >= 280) { score08.Draw(OFFSET); } if (GameGlobals.score >= 290) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 300) { score033rd.Draw(OFFSET); if (GameGlobals.score < 310) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 310) { score01.Draw(OFFSET); } if (GameGlobals.score >= 320) { score02.Draw(OFFSET); } if (GameGlobals.score >= 330) { score03.Draw(OFFSET); } if (GameGlobals.score >= 340) { score04.Draw(OFFSET); } if (GameGlobals.score >= 350) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 360) { score06.Draw(OFFSET); } if (GameGlobals.score >= 370) { score07.Draw(OFFSET); } if (GameGlobals.score >= 380) { score08.Draw(OFFSET); } if (GameGlobals.score >= 390) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 400) { score043rd.Draw(OFFSET); if (GameGlobals.score < 410) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 410) { score01.Draw(OFFSET); } if (GameGlobals.score >= 420) { score02.Draw(OFFSET); } if (GameGlobals.score >= 430) { score03.Draw(OFFSET); } if (GameGlobals.score >= 440) { score04.Draw(OFFSET); } if (GameGlobals.score >= 450) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 460) { score06.Draw(OFFSET); } if (GameGlobals.score >= 470) { score07.Draw(OFFSET); } if (GameGlobals.score >= 480) { score08.Draw(OFFSET); } if (GameGlobals.score >= 490) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 500) { score053rd.Draw(OFFSET); if (GameGlobals.score < 510) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 510) { score01.Draw(OFFSET); } if (GameGlobals.score >= 520) { score02.Draw(OFFSET); } if (GameGlobals.score >= 530) { score03.Draw(OFFSET); } if (GameGlobals.score >= 540) { score04.Draw(OFFSET); } if (GameGlobals.score >= 550) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 560) { score06.Draw(OFFSET); } if (GameGlobals.score >= 570) { score07.Draw(OFFSET); } if (GameGlobals.score >= 580) { score08.Draw(OFFSET); } if (GameGlobals.score >= 590) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 600) { score063rd.Draw(OFFSET); if (GameGlobals.score < 610) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 610) { score01.Draw(OFFSET); } if (GameGlobals.score >= 620) { score02.Draw(OFFSET); } if (GameGlobals.score >= 630) { score03.Draw(OFFSET); } if (GameGlobals.score >= 640) { score04.Draw(OFFSET); } if (GameGlobals.score >= 650) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 660) { score06.Draw(OFFSET); } if (GameGlobals.score >= 670) { score07.Draw(OFFSET); } if (GameGlobals.score >= 680) { score08.Draw(OFFSET); } if (GameGlobals.score >= 690) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 700) { score073rd.Draw(OFFSET); if (GameGlobals.score < 710) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 710) { score01.Draw(OFFSET); } if (GameGlobals.score >= 720) { score02.Draw(OFFSET); } if (GameGlobals.score >= 730) { score03.Draw(OFFSET); } if (GameGlobals.score >= 740) { score04.Draw(OFFSET); } if (GameGlobals.score >= 750) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 760) { score06.Draw(OFFSET); } if (GameGlobals.score >= 770) { score07.Draw(OFFSET); } if (GameGlobals.score >= 780) { score08.Draw(OFFSET); } if (GameGlobals.score >= 790) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 800) { score083rd.Draw(OFFSET); if (GameGlobals.score < 810) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 810) { score01.Draw(OFFSET); } if (GameGlobals.score >= 820) { score02.Draw(OFFSET); } if (GameGlobals.score >= 830) { score03.Draw(OFFSET); } if (GameGlobals.score >= 840) { score04.Draw(OFFSET); } if (GameGlobals.score >= 850) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 860) { score06.Draw(OFFSET); } if (GameGlobals.score >= 870) { score07.Draw(OFFSET); } if (GameGlobals.score >= 880) { score08.Draw(OFFSET); } if (GameGlobals.score >= 890) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 900) { score093rd.Draw(OFFSET); if (GameGlobals.score < 910) { score002nd.Draw(OFFSET); } if (GameGlobals.score >= 910) { score01.Draw(OFFSET); } if (GameGlobals.score >= 920) { score02.Draw(OFFSET); } if (GameGlobals.score >= 930) { score03.Draw(OFFSET); } if (GameGlobals.score >= 940) { score04.Draw(OFFSET); } if (GameGlobals.score >= 950) { score052nd.Draw(OFFSET); } if (GameGlobals.score >= 960) { score06.Draw(OFFSET); } if (GameGlobals.score >= 970) { score07.Draw(OFFSET); } if (GameGlobals.score >= 980) { score08.Draw(OFFSET); } if (GameGlobals.score >= 990) { score09.Draw(OFFSET); } } if (GameGlobals.score >= 1000) { if (GameGlobals.score < 1010) { score002nd.Draw(OFFSET); } if (GameGlobals.score < 1100) { score003rd.Draw(OFFSET); } score014th.Draw(OFFSET); } } #endregion }
private void AcntList_FormClosed(object sender, FormClosedEventArgs e) { ExitBtn.PerformClick(); }
private void exitToolStripMenuItem_Click(object sender, EventArgs e) { ExitBtn.PerformClick(); }