private void CheckAnswer(int number) { string answerresult = SQLiteClass.SQLiteGet("SELECT answer FROM Questions WHERE id=" + thisnumber.ToString()); if (number.ToString() == answerresult) { MessageBox.Show("Вы выбрали правильный ответ!"); if ((globalcountnumber + 1) == System.Convert.ToInt32(localequestionscount)) { ResultWindow o = new ResultWindow(localequestionscount); o.Show(); } else { MainGameWindow newobj = new MainGameWindow(globalcountnumber + 1, localequestionscount); newobj.Show(); } Close(); } else { LoseWindow obj = new LoseWindow(globalcountnumber, currentprice); obj.Show(); Close(); } }
private void StartButton_Click(object sender, RoutedEventArgs e) { RandomClass.GetList(true, Convert.ToInt32("15")); MainGameWindow obj = new MainGameWindow(0, "15"); obj.Show(); }