public static void endgame() { number = "0"; textnumber = "0"; textData = new List <Text>(); texts = new List <Text>(); Userinfo.delete(); Context mContext = Application.Context; Intent i = new Intent(mContext, typeof(Main)); mContext.StartActivity(i); }
public void Klik(object o, EventArgs ea) { Button B = (Button)o; string a = B.Text; foreach (String s in answers) { if (a == s.Substring(1, s.Length - 1)) { Userinfo.Opslaan(q.getQuestion, a); GameBase.nextquestion(s.Substring(0, 1)); } } }
public static void startText() { texts = Userinfo.userText(textData); List <Text> bv = new List <Text>(); if (texts.Count == 0) { startInfoPage(); } else { Context mContext = Application.Context; Intent i = new Intent(mContext, typeof(TextPage)); i.PutExtra("start", textnumber); mContext.StartActivity(i); } }
public void Confirm(object o, EventArgs ea) { Userinfo.Checkopslaan(check); GameBase.nextquestion((int.Parse(nummer) + 1).ToString()); }
public void kliknext(object o, EventArgs ea) { bool error = false; int loc = 0; for (int p = 0; p < q.getAnswer.Count; p++) { String s = ""; for (int l = 0; l < 5; l++) { if (buttons[(p * 5) + l].Checked == true) { s = s + "1"; } else { s = s + "0"; } } Char[] b = s.ToCharArray(); int tel = 0; for (int v = 0; v < b.Length; v++) { if (b[v] == '1') { tel = tel + 1; } } if (tel == 0) { error = true; loc = p; } } if (error == true) { } else { String answ = ""; for (int it = 0; it < buttons.Count; it++) { if (buttons[it].Checked == true) { answ = answ + "1"; } else { answ = answ + "0"; } } List <String> results = new List <string>(); Char[] ans = answ.ToCharArray(); int hoe = 0; for (int a = 0; a < answers.Count; a++) { int bt = a * 5; int et = ((a + 1) * 5); for (int d = bt; d < et; d++) { if (ans[d] == '1') { hoe = d; } } int po = 0; po = hoe / 5; hoe = hoe - (po * 5); results.Add(hoe + "|" + answers[a].Substring(1, (answers[a].Length - 1))); } Userinfo.agreeopslaan(results); GameBase.nextquestion((int.Parse(nummer) + 1).ToString()); } }