Beispiel #1
0
        public SkyDrivePhoto(ICloudFolder parent, IDictionary <string, object> objectDictionary)
            : base(parent, objectDictionary)
        {
            this.TagsCount           = Dictionary.tags_count;
            this.TagsEnabled         = Dictionary.tags_enabled;
            this.IsEmbeddable        = Dictionary.is_embeddable;
            this.PictureLocation     = Dictionary.picture;
            this.WhenTaken           = DynamicExtension.ToDateTime(Dictionary.when_taken);
            this.Height              = Dictionary.height;
            this.Width               = Dictionary.width;
            this.CameraMake          = Dictionary.camera_make;
            this.CameraModel         = Dictionary.camera_model;
            this.FocalRatio          = Dictionary.focal_ration;
            this.FocalLength         = Dictionary.focal_length;
            this.ExposureNumerator   = Dictionary.exposure_numerator;
            this.ExposureDenominator = Dictionary.exposure_denominator;
            this.PhotographyLocation = Dictionary.location ?? "Location Unavailable.";
            this.Photos              = new Dictionary <PhotoType, PhotoCard>(Dictionary.images.Count);
            foreach (dynamic photo in Dictionary.images)
            {
                var card = new PhotoCard();
                card.Height    = photo.height;
                card.Width     = photo.width;
                card.PhotoType = (PhotoType)Enum.Parse(typeof(PhotoType), photo.type, true);
                card.DownloadSourceLocation = photo.source;
                if (this.Photos.ContainsKey(card.PhotoType))
                {
                    this.Photos.Remove(card.PhotoType);
                }

                this.Photos.Add(card.PhotoType, card);
            }
        }
Beispiel #2
0
        public static void ShufflePhotoCards(List <PhotoCard> list)
        {
            int n = list.Count;

            while (n > 1)
            {
                n--;
                int       k     = rng.Next(n + 1);
                PhotoCard value = list[k];
                list[k] = list[n];
                list[n] = value;
            }
        }
Beispiel #3
0
 public PhotoCardDetailViewModel(PhotoCard card, Bundle bundle)
 {
     _photoCard = card;
     _bundle    = bundle;
 }
Beispiel #4
0
 public PhotoCardDetailViewModel(Bundle bundle)
 {
     _photoCard          = new PhotoCard();
     _bundle             = bundle;
     _photoCard.BundleId = _bundle.Id;
 }
Beispiel #5
0
 private void SetQuestion()
 {
     currentQuestion = _questions.Pop();
     OnPropertyChanged("Information");
     UserAnswer = "";
 }