Example #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.finalPage = ((LetsLearn.FinalScore)(target));
                return;

            case 2:
                this.fUserLbl = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.fUserAgeLbl = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.fCAnsLbl = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.fIncAnsLbl = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.fCompTimeLbl = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.Home = ((System.Windows.Controls.Button)(target));

            #line 36 "..\..\FinalScore.xaml"
                this.Home.Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.fSImage = ((System.Windows.Controls.Image)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #2
0
        /// <summary>
        /// All of the information that is submitted on submit click / enter is sent here
        /// </summary>
        public void infoDump()
        {
            if (playCount == 9)
            {
                try
                {
                    userAns = (Int32.Parse(gameQAnsBox.Text));
                }
                catch (Exception)
                {
                    ansErrorLbl.Content = "Must enter a number";
                    return;
                }

                ansErrorLbl.Content = "";



                gameCLS.checkMath(userAns);
                setT();
                FinalScore fs = new FinalScore(userCLS, gameCLS);
                MyTimer.Stop();



                this.Hide();
                fs.ShowDialog();
                this.Close();
            }
            else
            {
                try
                {
                    userAns = (Int32.Parse(gameQAnsBox.Text));
                }
                catch (Exception)
                {
                    ansErrorLbl.Content = "Must enter a number";
                    return;
                }

                ansErrorLbl.Content = "";



                gameCLS.checkMath(userAns);

                if (gameCLS.correctAnswer)
                {
                    ansLbl.Content = "CORRECT";
                }
                else
                {
                    ansLbl.Content = "INCORRECT";
                }


                gameQAnsBox.Text = "";

                playCount++;
                gameGen();
            }
        }