Пример #1
0
        void gameWindow_Closed(object sender, EventArgs e)
        {
            TutorialGameWindow gameWindow = sender as TutorialGameWindow;

            if (gameWindow != null)
            {
                var score = Current.Instance.Scores.Where(x => x.EarthwatcherId == Current.Instance.Earthwatcher.Id && x.Action == "TrueColorGame").FirstOrDefault();
                if (score != null)
                {
                    if (score.Points < gameWindow.points)
                    {
                        UpdatePoints("TrueColorGame", gameWindow.points);
                    }
                }
                else
                {
                    AddPoints("TrueColorGame", gameWindow.points);
                }
            }
        }
Пример #2
0
        void tutorialMenuWindow_Closed(object sender, EventArgs e)
        {
            var tutorialMenuWindow = sender as TutorialMenuWindow;

            if (tutorialMenuWindow != null && !string.IsNullOrEmpty(tutorialMenuWindow.SelectedOption))
            {
                if (tutorialMenuWindow.SelectedOption.Equals("Button2"))
                {
                    Current.Instance.Tutorial2Started = true;
                    tutorialWindow         = new TutorialWindow();
                    tutorialWindow.Closed += tutorialWindow_Closed;
                    tutorialWindow.Show();
                }

                if (tutorialMenuWindow.SelectedOption.Equals("Button3"))
                {
                    TutorialGameWindow gameWindow = new TutorialGameWindow();
                    gameWindow.Closed += gameWindow_Closed;
                    gameWindow.Show();
                }
            }
        }