public CoursesSubpage(DetailPage dp)
        {
            InitializeComponent();
            CourseItems = new Dictionary<string, string[]>();

            detailPage = dp;
            LoadCourseData();
            GenerateButtons();
        }
        public FacultySubpage(DetailPage dp)
        {
            InitializeComponent();
            FacultyItems = new Dictionary<string, string[]>();
            FacultyQR = new Dictionary<string, ImageBrush>();

            detailPage = dp;
            LoadFacultyData();
            GenerateButtons();

            // Create the QR code builder.
            qrEncoder = new BarcodeEncoder();
        }
        public OverviewSubpage(DetailPage dp)
        {
            InitializeComponent();
            detailPage = dp;
            loadData();

            // Code to prepare the carousel.
            switch (dp.Identifier)
            {
                case "SE":
                    addImage("SE_0.png", 280, 210);
                    addImage("SE_2.png", 210, 250);
                    addImage("SE_5.jpg", 250, 200);
                    addImage("SE_3.png", 220, 270);
                    addImage("SE_1.png", 260, 230);
                    addImage("SE_6.png", 200, 160);
                    addImage("SE_4.jpg", 270, 190);
                    addImage("SE_8.jpg", 240, 350);
                    // repeated if time replace with new
                    addImage("SE_0.png", 280, 210);
                    addImage("SE_2.png", 210, 250);
                    addImage("SE_5.jpg", 250, 200);
                    addImage("SE_3.png", 220, 270);
                    addImage("SE_1.png", 260, 230);
                    addImage("SE_6.png", 200, 160);
                    addImage("SE_4.jpg", 270, 190);
                    addImage("SE_8.jpg", 240, 350);
                    break;

                case "EEE":
                    addImage("EEE_1.png", 250, 350);
                    addImage("EEE_2.png", 280, 280);
                    addImage("EEE_3.jpg", 250, 300);
                    addImage("EEE_6.png", 300, 250);
                    addImage("EEE_4.jpg", 200, 250);
                    addImage("EEE_5.png", 270, 200);
                    // at the moment repeated, need more pictures
                    addImage("EEE_1.png", 250, 350);
                    addImage("EEE_2.png", 280, 280);
                    addImage("EEE_3.jpg", 250, 300);
                    addImage("EEE_6.png", 300, 250);
                    addImage("EEE_4.jpg", 200, 250);
                    addImage("EEE_5.png", 270, 200);
                    break;

                case "CSE":
                    addImage("CS_0.png", 160, 300);
                    addImage("CS_2.png", 250, 200);
                    addImage("CS_1.png", 210, 250);
                    addImage("CS_6.png", 240, 190);
                    addImage("CS_3.png", 220, 230);
                    addImage("CS_4.png", 260, 290);
                    addImage("CS_5.png", 200, 250);
                    // repeat
                    addImage("CS_0.png", 160, 300);
                    addImage("CS_2.png", 250, 200);
                    addImage("CS_1.png", 210, 250);
                    addImage("CS_6.png", 240, 190);
                    addImage("CS_3.png", 220, 230);
                    addImage("CS_4.png", 260, 290);
                    addImage("CS_5.png", 200, 250);
                    break;
            }

            PictureViewer.Children.Clear();

            foreach (BitmapImage img in pictureList["General"])
            {
                Rectangle rect = new Rectangle();
                rect.Height = img.Height;
                rect.Width = img.Width;
                rect.Margin = new Thickness(2);

                rect.Fill = new ImageBrush(img);
                PictureViewer.Children.Add(rect);
            }

            Paragraph p = new Paragraph(new Run("General"));
            p.FontSize = 36;
            p.Foreground = new SolidColorBrush(Color.FromRgb(255, 255, 255));

            Paragraph content = new Paragraph(new Run(infoList["General"]));
            content.FontSize = 24;
            content.Foreground = new SolidColorBrush(Color.FromRgb(255, 255, 255));

            overviewContent.Blocks.Add(p);
            overviewContent.Blocks.Add(content);
        }