private void StartButton_Click(object sender, RoutedEventArgs e) { RandomClass.GetList(true, Convert.ToInt32("15")); MainGameWindow obj = new MainGameWindow(0, "15"); obj.Show(); }
public MainGameWindow(int countvalue, string allquestionscount) { InitializeComponent(); List <int> AllNumbers = RandomClass.GetList(false, 0); this.Title = "Кто хочет стать миллионером? | Вопрос " + (countvalue + 1).ToString() + " из " + allquestionscount; localequestionscount = allquestionscount; globalcountnumber = countvalue; thisnumber = AllNumbers[countvalue]; QuestionBlock.Text = SQLiteClass.SQLiteGet("SELECT question FROM Questions WHERE id=" + thisnumber.ToString()); FirstAnswerButton.Content = "A: " + SQLiteClass.SQLiteGet("SELECT first FROM Questions WHERE id=" + thisnumber.ToString()); SecondAnswerButton.Content = "B: " + SQLiteClass.SQLiteGet("SELECT second FROM Questions WHERE id=" + thisnumber.ToString()); ThirdAnswerButton.Content = "C: " + SQLiteClass.SQLiteGet("SELECT third FROM Questions WHERE id=" + thisnumber.ToString()); ForthAnswerButton.Content = "D: " + SQLiteClass.SQLiteGet("SELECT fourth FROM Questions WHERE id=" + thisnumber.ToString()); currentprice = SetPriceButtons(countvalue + 1); }