Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SampleDataItem" /> 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 SampleDataItem(string uniqueId, string title, string subtitle, string imagePath, string description, string content, SampleDataCollection group, Type navigationPage)
     : base(uniqueId, title, subtitle, imagePath, description)
 {
     this.content        = content;
     this.group          = group;
     this.navigationPage = navigationPage;
 }
Example #2
0
 public SampleDataItem(string uniqueId, string title, string subtitle, ImageSource imageSource, string description, string content, SampleDataCollection group)
     : base(uniqueId, title, subtitle, imageSource, description)
 {
     this.imageSource    = imageSource;
     this.content        = content;
     this.group          = group;
     this.navigationPage = null;
 }
Example #3
0
        public SampleDataSource()
        {
            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 SampleDataCollection(
                "Group-1",
                "Group Title: 3",
                "Group Subtitle: 3",
                "Assets/lightGray.png",
                "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");

            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-1",
                    "운동목록",              // 해당 아이템의 제목
                    string.Empty,
                    "Images/health.jpg", // 해당 아이템의 이미지 URL
                    "Several types of buttons with custom styles",
                    itemContent,
                    group1,
                    typeof(TrainingList)));     // 해당 아이템의 Pages 컴포넌트 이름
            group1.Items.Add(
                new SampleDataItem(
                    "SideLateralRaise",
                    "사이드레터럴레이즈",
                    string.Empty,
                    "Images/sidelateralraise.png",
                    "SideLateralRaise",
                    itemContent,
                    group1,
                    typeof(SideLateralRaise)));
            group1.Items.Add(
                new SampleDataItem(
                    "Squat",
                    "스쿼트",
                    string.Empty,
                    "Assets/lightGray.png",
                    "CheckBox and RadioButton controls",
                    itemContent,
                    group1,
                    typeof(Squat)));
            group1.Items.Add(
                new SampleDataItem(
                    "DumbbellShoulderPress",
                    "덤벨숄더프레스",
                    string.Empty,
                    "Assets/lightGray.png",
                    "ScrollViewer control hosting a photo, enabling scrolling and zooming.",
                    itemContent,
                    group1,
                    typeof(Squat)));
            this.AllGroups.Add(group1);
        }
Example #4
0
        public SampleDataSource()
        {
            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 SampleDataCollection(
                "Group-1",
                "Group Title: 3",
                "Group Subtitle: 3",
                SampleDataSource.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");

            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-1",
                    "Buttons",
                    string.Empty,
                    SampleDataSource.darkGrayImage,
                    "Several types of buttons with custom styles",
                    itemContent,
                    group1,
                    typeof(ButtonSample)));
            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-2",
                    "CheckBoxes and RadioButtons",
                    string.Empty,
                    SampleDataSource.mediumGrayImage,
                    "CheckBox and RadioButton controls",
                    itemContent,
                    group1,
                    typeof(CheckBoxRadioButtonSample)));
            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-5",
                    "Zoomable Photo",
                    string.Empty,
                    SampleDataSource.lightGrayImage,
                    "ScrollViewer control hosting a photo, enabling scrolling and zooming.",
                    itemContent,
                    group1,
                    typeof(ScrollViewerSample)));
            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-6",
                    "Kinect Pointer Events",
                    string.Empty,
                    SampleDataSource.lightGrayImage,
                    "Example of how to get KinectPointerPoints.",
                    itemContent,
                    group1,
                    typeof(KinectPointerPointSample)));
            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-7",
                    "Engagement and Cursor Settings",
                    "",
                    SampleDataSource.darkGrayImage,
                    "Enables user to switch between engagement models and cursor visuals.",
                    itemContent,
                    group1,
                    typeof(EngagementSettings)));
            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-6",
                    "Item Title: 6",
                    "Item Subtitle: 6",
                    SampleDataSource.darkGrayImage,
                    "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
                    itemContent,
                    group1));
            group1.Items.Add(
                new SampleDataItem(
                    "Group-1-Item-7",
                    "Item Title: 7",
                    "Item Subtitle: 7",
                    SampleDataSource.mediumGrayImage,
                    "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
                    itemContent,
                    group1));

            this.AllGroups.Add(group1);
        }
        public SampleDataSource()
        {
            SampleDataSource.darkGrayImage = new Uri("Assets/DarkGray.png", UriKind.Relative);
            SampleDataSource.mediumGrayImage = new Uri("Assets/mediumGray.png", UriKind.Relative);
            SampleDataSource.lightGrayImage = new Uri("Assets/lightGray.png", UriKind.Relative);
            SampleDataSource.zoomablePhoto = new Uri("Images/fireworks.jpg", UriKind.Relative);

            //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 picDir = @"C:\Users\Jacob\Documents\Victoria Fourth Year\swen 422\group project\dev\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\wallpapers\";
            String folderDir = @"C:\Users\Jacob\Documents\Victoria Fourth Year\swen 422\group project\dev\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\Documents\";
            String vidDir = @"C:\Users\Jacob\Documents\Victoria Fourth Year\swen 422\group project\dev\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Videos\";
            String vidLTDir = @"C:\Users\Jacob\Documents\Victoria Fourth Year\swen 422\group project\dev\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\videoLiveTiles\";
            //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 folderDi = new DirectoryInfo(folderDir);
            DirectoryInfo picDi = new DirectoryInfo(picDir);
            DirectoryInfo vidDi = new DirectoryInfo(vidDir);
            DirectoryInfo vidLTDi = new DirectoryInfo(vidLTDir);

            //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\CrystalJ\Documents\Uni\2015\SWEN422\Swen422-Project\MenuSystem\PatsCode\ControlsBasics-WPF\Images\");

            //DirectoryInfo di = new DirectoryInfo(directory1);

            FileInfo[] files = di.GetFiles("*.*");
            FileInfo[] folderFiles = folderDi.GetFiles("*.*");
            FileInfo[] picFiles = picDi.GetFiles("*.*");
            FileInfo[] vidFiles = vidDi.GetFiles("*.*");
            FileInfo[] vidLTFiles = vidLTDi.GetFiles("*.*");

            Uri[] imageUris = new Uri[files.Length];
            Uri[] folderUris = new Uri[folderFiles.Length];
            Uri[] picUris = new Uri[picFiles.Length];
            Uri[] vidUris = new Uri[vidFiles.Length];
            Uri[] vidLTUris = new Uri[vidLTFiles.Length];

            setUpUris(files, imageUris, directory);
            setUpUris(folderFiles, folderUris, directory);
            setUpUris(picFiles, picUris, directory);
            setUpUris(vidFiles, vidUris, directory);
            setUpUris(vidLTFiles, vidLTUris, directory);

            Console.WriteLine(SampleDataSource.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 SampleDataCollection(
                    "Group-1",
                    "Group Title: 3",
                    "Group Subtitle: 3",
                    SampleDataSource.mediumGrayImage,
                    null,
                    "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");

            group1.Items.Add(
                    new SampleDataItem(
                        "Group-1-Item-2",
                        "Videos",
                        string.Empty,
                        SampleDataSource.mediumGrayImage,
                        new Uri("Images/icons/MainTitleIcons-03.png", UriKind.Relative),
                        "CheckBox and RadioButton controls",
                        itemContent,
                        group1,
                        true,
                        vidLTUris,
                        typeof(Pages.VideosType),
                        0,
                        vidFiles));
            group1.Items.Add(
                    new SampleDataItem(
                        "Group-1-Item-5",
                        "Photos",
                        string.Empty,
                        zoomablePhoto,
                        new Uri("Images/icons/MainTitleIcons-02.png", UriKind.Relative),
                        "ScrollViewer control hosting a photo, enabling scrolling and zooming.",
                        itemContent,
                        group1,
                        true,
                        picUris,
                        typeof(Pages.PicturesType),
                        1666,
                        picFiles));
            group1.Items.Add(
                    new SampleDataItem(
                        "Group-1-Item-6",
                        "Folder",
                        string.Empty,
                        SampleDataSource.mediumGrayImage,
                        null,
                        "Example of how to get KinectPointerPoints.",
                        itemContent,
                        group1,
                        true,
                        folderUris,
                        typeof(ScrollViewerSample),
                        3333,
                        folderFiles));
            group1.Items.Add(
                    new SampleDataItem(
                        "Group-1-Item-6",
                        "Slides",
                        "Testing the live tiles",
                        new Uri("Images/Backgrounds/slideTile.png", UriKind.Relative),
                        new Uri("Images/icons/MainTitleIcons-06.png", UriKind.Relative),
                        "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
                        itemContent,
                        group1,
                        typeof(ButtonSample)));
            group1.Items.Add(
                    new SampleDataItem(
                        "Group-1-Item-7",
                        "Surgeon Sim",
                        "Item Subtitle: 7",
                        new Uri("Images/Backgrounds/surgeonSim.png", UriKind.Relative),
                        new Uri("Images/icons/MainTitleIcons-04.png", UriKind.Relative),
                        "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
                        itemContent,
                        group1,
                        typeof(ScrollViewerSample)));
            this.AllGroups.Add(group1);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SampleDataItem" /> 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 SampleDataItem(string uniqueId, string title, string subtitle, Uri imagePath, Uri iconPath, string description, string content, SampleDataCollection group, Type navigationPage)
     : base(uniqueId, title, subtitle, imagePath, iconPath, description)
 {
     this.content = content;
     this.group = group;
     this.navigationPage = navigationPage;
 }
        public SampleDataItem(string uniqueId, string title, string subtitle, Uri imagePath, Uri iconPath, string description, string content, SampleDataCollection group, Boolean isLiveTile, Uri[] imagePaths, Type navigationPage, int initialWait, FileInfo[] files)
            : base(uniqueId, title, subtitle, imagePath, iconPath, description)
        {
            this.content = content;
            this.group = group;
            this.navigationPage = null;
            this.isLiveTile = isLiveTile;
            this.imageUris = imagePaths;
            this.imagesLength = imagePaths.Length;
            this.navigationPage = navigationPage;
            this.initialWait = initialWait;
            this.files = files;

            this.Image = new BitmapImage(this.imageUris[liveTile]);
            this.Image1 = new BitmapImage(this.imageUris[liveTile+1]);

            this.Subtitle = this.files[liveTile].Name;
            this.Subtitle1 = this.files[liveTile+1].Name;

            if (this.isLiveTile)
            {
                //start the timer and do stuff
                System.Windows.Forms.Timer tmrNextImage = new System.Windows.Forms.Timer();
                tmrNextImage.Interval = 20;
                tmrNextImage.Tick += new EventHandler(tmrNextImage_Tick);
                tmrNextImage.Start();
               // System.Console.WriteLine("Live tile = " + liveTile);
            }
        }
Example #8
0
        public SampleDataSource(string type, string query)
        {
            Database db = new Database();

            imgList = new List <ImageSource>();

            if (type.Equals("Track"))
            {
                imgTrack = new List <ImageTrack>();
                values   = new List <int>();
            }

            switch (type)
            {
            case "List":
                imgList = db.getImage(query);
                break;

            case "Track":
                imgTrack = db.getImageTrack(query);
                break;

            default:
                return;
            }

            if (type.Equals("Track"))
            {
                foreach (ImageTrack track in imgTrack)
                {
                    imgList.Add(track.getImg());
                    Console.WriteLine("트랙 분해 완료, 값 : {0}", track.getId());
                    values.Add(track.getId());
                }
            }

            dataGroup = new SampleDataCollection(
                "Group-1",
                "Group Title: 3",
                "Group Subtitle: 3",

                imgList.First(),
                "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");

            int idx = 1;

            foreach (ImageSource imgSource in imgList)
            {
                //  string postureid = i.ToString();
                dataGroup.Items.Add(
                    new SampleDataItem(
                        idx++.ToString(),
                        "Buttons",
                        string.Empty,
                        imgSource,
                        "Several types of buttons with custom styles",
                        itemContent,
                        dataGroup,
                        typeof(ButtonSample))
                    );
                Console.WriteLine("데이터그룹에 하나 저장");
            }
        }