public GamePage() { InitializeComponent(); keyList = new List<Button>() { C, Cs, D, Ds, E, F, Fs, G, Gs, A, As, B }; mainWindow = App.GetWindow("NavWin") as MainWindow; correctImage = new BitmapImage(new Uri(@"..\..\Correct.png",UriKind.Relative)); falseImage = new BitmapImage(new Uri(@"..\..\False.png", UriKind.Relative)); clearImage = new BitmapImage(new Uri(@"..\..\Clear.png",UriKind.Relative)); // ゲームロジック game = new FuyomiGame(((int)Application.Current.Properties["level"]) + 1); this.qTextBox.Text = game.GameStart(); level = (int)Application.Current.Properties["level"]; missCount = 0; // 問題開始からの経過時間を測る mainWindow.StartTimer(); }