//GameOver wird nach dem drücken einer belibigen Taste, nach dem Ende des Spiels ausgeführt private void GameOver() { Score = 0; Hits = 0; Stage = 1; LabelScore.Text = Score.ToString(); LabelStage.Text = Stage.ToString(); Lives = 3; Label2.Hide(); Label5.Hide(); Over = false; Live1.Show(); Live2.Show(); Live3.Show(); MonstersDelete(); MonstersNew(); Random.Start(); MonstersMove.Start(); Bullets.Start(); MonstersAttack.Start(); }
protected override void OnDisappearing() { base.OnDisappearing(); Label1.RemoveAllGestureRecognizers(); Label2.RemoveAllGestureRecognizers(); Label3.RemoveAllGestureRecognizers(); Label4.RemoveAllGestureRecognizers(); Label5.RemoveAllGestureRecognizers(); Label6.RemoveAllGestureRecognizers(); }
protected void Page_Load(object sender, EventArgs e) { birimlerstore.DataSource = BldSvc.birimal(); birimlerstore.DataBind(); grupstore.DataSource = BldSvc.grupal(); grupstore.DataBind(); if (AktifKullanici != null) { ximgCap.Hide(); xtxtCap.Hide(); KurumStore.DataSource = BldSvc.kurumno(AktifKullanici); KurumStore.DataBind(); e_mail.Hide(); Konu.Hide(); tel.Hide(); Label2.Hide(); Label3.Hide(); BasvuruNo.Hide(); } else { Tarih.Hide(); Kurumlar.Hide(); basvuru.Hide(); Label5.Hide(); Label4.Hide(); Sonuc.Hide(); BasvuruNo.Hide(); } var kurumId = GetKurumId(); if (kurumId == 0) { // Response.Write("Olmaz öyle"); return; } var kurum = BldSvc.GetKurumById(kurumId); if (kurum == null) { // Response.Write("Kurum null "); return; } lblKurumAdi.Text = kurum.Adi; // var user = (dto_kullanicilar)Session["kullanici"]; //var kurumid = user.KurumId; }
void FixGesturesUsingXaml() { //the following is only necessary until Xamarin give us a hook into this I've filed a bugzilla about it //https://bugzilla.xamarin.com/show_bug.cgi?id=30467 //if you don't want to write the following lines of code, then MAKE YOUR VOICE HEARD ON THAT BUG PLEASE! :) Label1.ProcessGestureRecognizers(); Label2.ProcessGestureRecognizers(); Label3.ProcessGestureRecognizers(); Label4.ProcessGestureRecognizers(); Label5.ProcessGestureRecognizers(); Label6.ProcessGestureRecognizers(); }
//Ende, führt wiederholt die Aktionen der GameOver-Funktin aus, zudem öffnet sie die HighScore-Liste private void End() { MonstersDelete(); if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) { Connections c = new Connections(); c.InsertData(Score, Stage, Hits); } else { new NetworkFail().Show(this); } Over = true; Live3.Hide(); Live2.Hide(); Live1.Hide(); Label5.Show(); Bullets.Stop(); MonstersMove.Stop(); Random.Stop(); MonstersAttack.Stop(); GameOver(); }
private void LoadData(String Filename) { String CurLine; // 存讀取器抓到的字串 int Section = 0; // 設定變數存狀態,預設為0 String[] Piecewise; // 存字串陣列 StreamReader TaskCSV = new StreamReader(Filename); // 用資料流讀取器抓資料 //-------讀檔,要做檢查跳出的判斷式-------// while ((CurLine = TaskCSV.ReadLine()) != null) { int fileEnd = 0; if (CurLine.ToUpper().Contains("DATA_TIME")) // 先將字串矩陣轉大寫,在檢查裡面是否包含特定字串 //if (CurLine.ToUpper().Contains("NUM1")) // 先將字串矩陣轉大寫,在檢查裡面是否包含特定字串 { Section = 1; // Section = 1,這行要跳過 } else if (CurLine.ToUpper().Contains("0")) { Section = 2; // Section = 2,數值資料的部分 } switch (Section) { case 1: Piecewise = CurLine.Trim().Split(','); ItemsNumbers = Piecewise.Length; break; case 2: Piecewise = CurLine.Trim().Split(','); //------判斷是否讀到空字串了------------// if (Piecewise[0] == "" || Piecewise[0] == string.Empty || Piecewise[0] == null) { fileEnd = 1; break; } else //解析字串內容並存進矩陣 { for (int j = 0; j < ItemsNumbers; j++) { //------把各項數值放進對應的List裡------// if (j == 0) { Index.Add(Convert.ToDouble(Piecewise[j])); } else if (j == 1) { DataTime.Add(Convert.ToDouble(Piecewise[j])); } else if (j == 5) { Gap.Add(Convert.ToDouble(Piecewise[j])); } else if (j == 6) { Feed.Add(Convert.ToDouble(Piecewise[j])); } else if (j == 7) { Hipwr.Add(Convert.ToDouble(Piecewise[j])); } else if (j == 8) { WaterR.Add(Convert.ToDouble(Piecewise[j])); } //else if (j == 9) Label3.Add(Convert.ToDouble(Piecewise[j])); else if (j == 10) { Label4.Add(Convert.ToDouble(Piecewise[j])); } else if (j == 11) { Label5.Add(Convert.ToDouble(Piecewise[j])); } /* * if (j == 0) Gap.Add(Convert.ToDouble(Piecewise[j])); * else if (j == 1) Feed.Add(Convert.ToDouble(Piecewise[j])); * else if (j == 2) Hipwr.Add(Convert.ToDouble(Piecewise[j])); * else if (j == 3) WaterR.Add(Convert.ToDouble(Piecewise[j])); * else if (j == 4) Label5.Add(Convert.ToDouble(Piecewise[j])); */ } } break; } if (fileEnd == 1) { break; } } }