/// <summary>
 /// Initializes a new instance of the <see cref="FolderDataItem" /> class.
 /// </summary>
 /// <param name="uniqueId">The unique id of this item.</param>
 /// <param name="title">The title of this item.</param>
 /// <param name="subtitle">The subtitle of this item.</param>
 /// <param name="imagePath">A relative path of the image for this item.</param>
 /// <param name="description">A description of this item.</param>
 /// <param name="content">The content of this item.</param>
 /// <param name="group">The group of this item.</param>
 /// <param name="navigationPage">What page should launch when clicking this item.</param>
 public FolderDataItem(string uniqueId, FileInfo fileInfo, string subtitle, Uri imagePath, string description, string content, FolderDataCollection group, Type navigationPage)
     : base(uniqueId, fileInfo.Name, subtitle, imagePath, description)
 {
     this.content = content;
     this.group = group;
     this.navigationPage = navigationPage;
     this.fileInfo = fileInfo;
 }
        public FolderDataSource()
        {
            FolderDataSource.darkGrayImage = new Uri("Assets/DarkGray.png", UriKind.Relative);
            FolderDataSource.mediumGrayImage = new Uri("Assets/mediumGray.png", UriKind.Relative);
            FolderDataSource.lightGrayImage = new Uri("Assets/lightGray.png", UriKind.Relative);
            FolderDataSource.zoomablePhoto = new Uri("Images/fireworks.jpg", UriKind.Relative);

            Console.WriteLine(FolderDataSource.darkGrayImage);

            Uri zoomablePhoto1 = new Uri("Images/fireworks.jpg", UriKind.Relative);

            string itemContent = string.Format(
                                        CultureInfo.CurrentCulture,
                                        "Item Content: {0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}",
                                        "Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat");

            var group1 = new FolderDataCollection(
                    "Group-1",
                    "Group Title: 3",
                    "Group Subtitle: 3",
                    FolderDataSource.mediumGrayImage,
                    "Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante");

            //String directory1 = @"C:\Users\Jacob\Desktop\New folder (2)";

            String directory = @"C:\Users\Jacob\Documents\Victoria Fourth Year\swen 422\group project\dev\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\";
            //String directory = @"C:\Users\CrystalJ\Documents\Uni\2015\SWEN422\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\";
            //String directory = @"C:\Users\Marcel\Documents\Victoria\SWEN 422\Project\Git\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\";

            //DirectoryInfo di = new System.IO.DirectoryInfo(@"C:\Users\CrystalJ\Documents\Uni\2015\SWEN422\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\");/// For testing, need different directory for images

            //DirectoryInfo di = new DirectoryInfo(@"C:\Users\Jacob\Documents\Victoria Fourth Year\swen 422\group project\dev\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\");/// For testing, need different directory for images
            //DirectoryInfo di = new DirectoryInfo(@"C:\Users\Marcel\Documents\Victoria\SWEN 422\Project\Git\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images"); //Marcel
            DirectoryInfo di = new DirectoryInfo(@"C:\Users\Jacob\Documents\Victoria Fourth Year\swen 422\group project\dev\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\Documents\");
            //DirectoryInfo di = new DirectoryInfo(directory1);

            FileInfo[] files = di.GetFiles("*.*");
            var test = files[0].Extension;

            Uri[] imageUris = new Uri[files.Length];
            for (int i = 0; i < files.Length; i++)
            {
                Boolean addIt = true;
                if (files[i].Extension.Equals(".png") || files[i].Extension.Equals(".jpg")) {
                    //imageUris[i] = new Uri(files[i].DirectoryName + "\\" + files[i].ToString(), UriKind.Absolute);

                    imageUris[i] = new Uri(directory + @"GridIcons\photoGrid.png", UriKind.Absolute);
                } else if (files[i].Extension.Equals(".xlsx"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\excelGrid.png", UriKind.Absolute);
                }
                else if (files[i].Extension.Equals(".mp3"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\musicGrid.png", UriKind.Absolute);
                }
                else if (files[i].Extension.Equals(".pdf"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\pdfGrid.png", UriKind.Absolute);
                }
                else if (files[i].Extension.Equals(".psd"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\photoshopGrid.png", UriKind.Absolute);
                }
                else if (files[i].Extension.Equals(".txt"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\textGrid.png", UriKind.Absolute);
                }
                else if (files[i].Extension.Equals(".mp4"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\videoGrid.png", UriKind.Absolute);
                }
                else if (files[i].Extension.Equals(".docx"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\wordGrid.png", UriKind.Absolute);
                }
                else if (files[i].Extension.Equals(".zip"))
                {
                    imageUris[i] = new Uri(directory + @"GridIcons\zipGrid.png", UriKind.Absolute);
                }
                else
                {
                    //imageUris[i] = new Uri(directory + @"GridIcons\folderGrid.png", UriKind.Absolute);
                    addIt = false;
                }

                if (addIt)
                {
                    if (files[i].Extension.Equals(".png") || files[i].Extension.Equals(".jpg"))
                    {
                        group1.Items.Add(
                                new FolderDataItem(
                                    "Group-1-Item-2",
                                    files[i],
                                    string.Empty,
                                    imageUris[i],
                                    "CheckBox and RadioButton controls",
                                    itemContent,
                                    group1,
                                    typeof(Pages.PicturesType)));
                    }
                    else if (files[i].Extension.Equals(".txt"))
                    {
                        group1.Items.Add(
                                new FolderDataItem(
                                    "Group-1-Item-2",
                                    files[i],
                                    string.Empty,
                                    imageUris[i],
                                    "CheckBox and RadioButton controls",
                                    itemContent,
                                    group1,
                                    typeof(Pages.TxtType)));
                    }
                    else
                    {
                        group1.Items.Add(
                                new FolderDataItem(
                                    "Group-1-Item-2",
                                    files[i],
                                    string.Empty,
                                    imageUris[i],
                                    "CheckBox and RadioButton controls",
                                    itemContent,
                                    group1));
                    }
                }
            }

            this.AllGroups.Add(group1);
        }
        public FolderDataItem(string uniqueId, FileInfo fileInfo, string subtitle, Uri imagePath, string description, string content, FolderDataCollection group, Boolean isLiveTile, Uri[] imagePaths)
            : base(uniqueId, fileInfo.Name, subtitle, imagePath, description)
        {
            this.content = content;
            this.group = group;
            this.navigationPage = null;
            this.isLiveTile = isLiveTile;
            this.imageUris = imagePaths;
            this.imagesLength = imagePaths.Length;
            this.fileInfo = fileInfo;

            if (this.isLiveTile)
            {
                //start the timer and do stuff
                System.Windows.Forms.Timer tmrNextImage = new System.Windows.Forms.Timer();
                tmrNextImage.Interval = 2000;
                tmrNextImage.Tick += new EventHandler(tmrNextImage_Tick);
                tmrNextImage.Start();
               // System.Console.WriteLine("Live tile = " + liveTile);
            }
        }