Ejemplo n.º 1
0
        public void ShowMiddleScreen(AchievementKind kind)
        {
            //SHOW THE MIDDLE SCREEN AND ALIGN IT
            MiddleScreen middleScreen = new MiddleScreen(kind);

            middleScreen.Show();
            middleScreen.Top  = Top;
            middleScreen.Left = Left;
            Close();
        }
Ejemplo n.º 2
0
        //CONSTRUCTOR
        public Achievements(AchievementKind kind)
        {
            InitializeComponent();

            this.kind = kind;

            LstBooks.Items.Clear();
            int completedCount = 0;

            //POPULATE THE ACHIEVEMENTS LIST BOX
            foreach (var item in AchievementList.GetAchievementsList())
            {
                //IF THE KIND MATCHES THE CONTEXT, ADD IT TO THE LISTBOX
                if (kind.Equals(item.kind))
                {
                    LstBooks.Items.Add(AchievementItem.GenerateAchievementItem(item));
                    if (item.progress >= 100)
                    {
                        completedCount++;
                    }
                }
            }

            //SMALL TEXT AT THE BOTTOM OF THE ACHIEVEMENTS SCREEN
            //INDICATES HOW MANY ACHIEVEMENTS HAVE BEEN COMPLETED
            TxtCompletedCount.Inlines.Add("You have completed ");
            TxtCompletedCount.Inlines.Add(new Run(completedCount.ToString())
            {
                FontSize = 24, Foreground = FindResource("PrimaryHueMidBrush") as Brush
            });
            TxtCompletedCount.Inlines.Add(" out of ");
            TxtCompletedCount.Inlines.Add(new Run(LstBooks.Items.Count.ToString())
            {
                FontSize = 24, Foreground = FindResource("PrimaryHueMidBrush") as Brush
            });
            TxtCompletedCount.Inlines.Add(" achievements");
        }
Ejemplo n.º 3
0
        public MiddleScreen(AchievementKind kind)
        {
            InitializeComponent();

            this.kind = kind;

            //SEND THE BINDING VARIABLES TO THE USER INSTANCE
            DataContext = User.GetInstance();

            if (kind == AchievementKind.AreaIdentification)
            {
                //ADD THE FOLLOWING TO THE TUTORIAL LINKEDLIST
                tutorialLinkedList.Add("Welcome to IDENTIFYING AREAS!");
                tutorialLinkedList.Add("In this task, you will have to match the coloumns!");
                tutorialLinkedList.Add("You will either need to match CALL NUMBERS to DESCRIPTION\nor DESCRIPTION to CALL NUMBERS");

                string node = "The following is all CALL NUMBERS and their matching DESCRIPTIONS.\nLearn them well.\n\n";

                foreach (var item in AreaIdentificationTest.dictionary)
                {
                    node += item.Key + " => " + item.Value + "\n";
                }

                tutorialLinkedList.Add(node);
                tutorialLinkedList.Add("Simply select the correct corresponding answer from each dropdown");
                tutorialLinkedList.Add("There are achievements you can earn by doing well in tests");
                tutorialLinkedList.Add("Good luck!");
            }
            else if (kind == AchievementKind.BookReplace)
            {
                //ADD THE FOLLOWING TO THE TUTORIAL LINKEDLIST
                tutorialLinkedList.Add("Welcome to REPLACING BOOKS!");
                tutorialLinkedList.Add("In this task, you will have to reorder books in a list\nby CALL NUMBER");
                tutorialLinkedList.Add("CALL NUMBERS are ordered firstly by number, then by letter");
                tutorialLinkedList.Add("Ordering CALL NUMBERS in this way is called the\nDewey Decimal Classification system");
                tutorialLinkedList.Add("Simply drag and drop the items in the list to reorder them");
                tutorialLinkedList.Add("There are achievements you can earn by doing well in tests");
                tutorialLinkedList.Add("Good luck!");
            }
            else
            {
                //ADD THE FOLLOWING TO THE TUTORIAL LINKEDLIST
                tutorialLinkedList.Add("Welcome to FINDING CALL NUMBERS!");
                tutorialLinkedList.Add("In this task, you will have to choose the right answer");
                tutorialLinkedList.Add("A third level CALL NUMBER will be displayed, along with 4 possible level one answers");
                tutorialLinkedList.Add("You must pick the correct level that the question belongs to");
                tutorialLinkedList.Add("This will be repeated until you have to pick the CALL NUMBER for the question itself");
                tutorialLinkedList.Add("Getting a wrong answer anywhere along the way will automatically end the test");
                tutorialLinkedList.Add("There are achievements you can earn by doing well in tests");
                tutorialLinkedList.Add("Good luck!");
            }

            //IF THE USER HAS SHOW TUTORIALS CHECKED
            if (User.ShowTutorials)
            {
                //SHOW THE TUTORIAL DIALOG
                tutorialLinkedList.Current = tutorialLinkedList.Head;
                TutorialDialog.IsOpen      = true;
                TxtTutorial.Text           = tutorialLinkedList.Current.Data;
            }
        }