Esempio n. 1
0
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            Holder hold = (Holder)this.RootVisual;

            hold.Navigate(new StartPage());
            e.Handled = true;
        }
        private void btnCatgory_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            switch (strCategory)
            {
            case "Basic Math":
                holder.Navigate(new BasicMath());
                break;

            case "Advance Math":
                holder.Navigate(new AdvMath());
                break;

            case "Every Day Math":
                holder.Navigate(new EveryDayMath());
                break;
            }
        }
        //void obj_GetEntriesOfHallOfFameCompleted(object sender, GetEntriesOfHallOfFameCompletedEventArgs e)
        //{
        //    if (e.Result != null)
        //    {
        //        if (e.Result.Count > 0)
        //        {
        //            HtmlPage.Window.Alert("Record Inserted Successfully");
        //        }
        //    }
        //}
        private void btnHelp_Click(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show(StaticData.Data);
            //string urlstr = @"background.wmv";
            //media.Source = new Uri(urlstr, UriKind.RelativeOrAbsolute);

            //   media.MediaFailed +=new EventHandler<ExceptionRoutedEventArgs>(media_MediaFailed);
            // media.Play();
            // mediaCry.Play();
            Holder holder = this.Parent as Holder;

            holder.Navigate(new HelpPage("StartPage"));
        }
        //private void cl_GetTopScoreCompleted(object sender, GetTopScoreCompletedEventArgs e)
        //{
        //    MessageBox.Show(e.Result.ToString());
        //}
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //MathPadServicesClient obj = new MathPadServicesClient();
            //obj.GetEntriesOfHallOfFameCompleted += new EventHandler<GetEntriesOfHallOfFameCompletedEventArgs>(obj_GetEntriesOfHallOfFameCompleted);
            //obj.GetEntriesOfHallOfFameAsync();


            //  MessageBox.Show(obj.Message);

            Holder holder = this.Parent as Holder;

            holder.Navigate(new BasicMath());
        }
        private void LoadQuestion()
        {
            Ans1.Style       = (Style)this.Resources["OrangeButton"];
            Ans2.Style       = (Style)this.Resources["OrangeButton"];
            Ans3.Style       = (Style)this.Resources["OrangeButton"];
            Ans4.Style       = (Style)this.Resources["OrangeButton"];
            Ans1.IsEnabled   = true;
            Ans2.IsEnabled   = true;
            Ans3.IsEnabled   = true;
            Ans4.IsEnabled   = true;
            lblScore.Content = "Your score : " + Score.ToString(); //"Level: " + Level.ToString() + "             Your score : " + Score.ToString();
            image1.Source    = null;
            image2.Source    = null;
            image3.Source    = null;
            image4.Source    = null;
            if (quiz.presentQuestion < quiz.questionaire.Count)
            {
                q = quiz.questionaire[quiz.presentQuestion];

                Qns.Text     = q.question;// quiz.questionaire[QnsNo].question;
                Ans1.Content = q.options[0];
                Ans2.Content = q.options[1];
                Ans3.Content = q.options[2];
                Ans4.Content = q.options[3];
                TimeCount.Start();
            }

            if (Score <= 0)
            {
                Holder holder = this.Parent as Holder;
                holder.Navigate(new GameOver(strCategory, strOption, Level, Score, time));
            }
            else
            {
                if (quiz.CorrectAnswered >= 10)
                {
                    if (quiz.presentQuestion == (quiz.questionaire.Count))
                    {
                        CreateQuiz();
                    }
                }
                else if (quiz.presentQuestion == (quiz.questionaire.Count - 2))
                {
                    CreateQuiz();
                }
                else
                {
                    ;
                }
            }
        }
Esempio n. 6
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            switch (strPage)
            {
            case "StartPage":
                holder.Navigate(new StartPage());
                break;

            case "EveryDayMath":
                holder.Navigate(new EveryDayMath());
                break;

            case "BasicMath":
                holder.Navigate(new BasicMath());
                break;

            case "AdvMath":
                holder.Navigate(new AdvMath());
                break;
            }
        }
        private void CreateQuiz()
        {
            // Level = ;


            if ((Level + 1) > 10)
            {
                Holder holder = this.Parent as Holder;
                holder.Navigate(new GameOver(strCategory, strOption, 10, Score, time));
            }
            else
            {
                Holder holder = this.Parent as Holder;
                holder.Navigate(new Level(btnCategory.Content.ToString(), strOption, Level + 1, Score, time));
            }
        }
Esempio n. 8
0
        private void btnHelp_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new HelpPage("EveryDayMath"));
        }
        private void Button_Click_9(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Level("Advance Math", "Rounding", 1, 500, 0));
        }
Esempio n. 10
0
        private void Button_Click_6(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Level("Advance Math", "SimpleInterest", 1, 500, 0));
        }
Esempio n. 11
0
        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Level("Every Day Math", "SalesTaxWithPrice", 1, 500, 0));
        }
Esempio n. 12
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new HallofFame());
        }
Esempio n. 13
0
        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new QuizPage(strCategory, strOption, intLevel, intScore, intTime));
        }
Esempio n. 14
0
        private void btnAddition_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Level("Every Day Math", "SalesTax", 1, 500, 0));
        }
        private void btnEvDayMath_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new EveryDayMath());
        }
Esempio n. 16
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Scoreboard());
        }
        private void Button_Click_6(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Level("Basic Math", "Division", 1, 500, 0));
        }
Esempio n. 18
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new StartPage());
        }
Esempio n. 19
0
        private void btnAddition_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Level("Advance Math", "Exponents", 1, 500, 0));
        }
Esempio n. 20
0
        private void Button_Click_7(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            holder.Navigate(new Level("Every Day Math", "Tips", 1, 500, 0));
        }
Esempio n. 21
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Holder holder = this.Parent as Holder;

            switch (strPage)
            {
            case "Addition":
                holder.Navigate(new Level("Basic Math", "Addition", 1, 500, 0));
                break;

            case "Multiplication":
                holder.Navigate(new Level("Basic Math", "Multiplication", 1, 500, 0));
                break;

            case "Subtraction":
                holder.Navigate(new Level("Basic Math", "Subtraction", 1, 500, 0));
                break;

            case "Division":
                holder.Navigate(new Level("Basic Math", "Division", 1, 500, 0));
                break;

            case "Time":
                holder.Navigate(new Level("Advance Math", "Time", 1, 500, 0));
                break;

            case "Percentage":
                holder.Navigate(new Level("Advance Math", "Percentage", 1, 500, 0));
                break;

            case "SimpleInterest":
                holder.Navigate(new Level("Basic Math", "SimpleInterest", 1, 500, 0));
                break;

            case "Discount":
                holder.Navigate(new Level("Advance Math", "Discount", 1, 500, 0));
                break;

            case "Currency":
                holder.Navigate(new Level("Advance Math", "Currency", 1, 500, 0));
                break;

            case "Rounding":
                holder.Navigate(new Level("Advance Math", "Rounding", 1, 500, 0));
                break;

            case "Fractions":
                holder.Navigate(new Level("Advance Math", "Fractions", 1, 500, 0));
                break;

            case "SalesTax":
                holder.Navigate(new Level("Every Day Math", "SalesTax", 1, 500, 0));
                break;

            case "SalesTaxWithPrice":
                holder.Navigate(new Level("Every Day Math", "SalesTaxWithPrice", 1, 500, 0));
                break;

            case "Commission":
                holder.Navigate(new Level("Every Day Math", "Commission", 1, 500, 0));
                break;

            case "Shipping":
                holder.Navigate(new Level("Every Day Math", "Shipping", 1, 500, 0));
                break;

            case "Tips":
                holder.Navigate(new Level("Every Day Math", "Tips", 1, 500, 0));
                break;

            case "Exponents":
                holder.Navigate(new Level("Every Day Math", "Exponents", 1, 500, 0));
                break;
            }
        }