Ejemplo n.º 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if ((e.Parameter as Rephoto) != null)
            {
                this.item2       = e.Parameter as Rephoto;
                this.DataContext = item2;
            }
            else
            {
                this.DataContext = App.ZoomLoc.LastSelectedOldPic;
            }
            // Register the current page as a share source.
            this.dataTransferManager = DataTransferManager.GetForCurrentView();
            this.dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager, DataRequestedEventArgs>(this.onDataRequested);

            base.OnNavigatedTo(e);
        }
Ejemplo n.º 2
0
        public void parseJson(string response)
        {
            JsonObject root = JsonObject.Parse(response);

            IJsonValue json;
            IJsonValue json2;

            if (root.TryGetValue("result", out json))
            {
                var oldPhoto = json.GetObject();
                if (oldPhoto.TryGetValue("rephotos", out json2))
                {
                    JsonArray array = json2.GetArray();
                    foreach (var item in array)
                    {
                        var a = new Rephoto(item.GetObject());
                        this.RePhotos.Add(a);
                    }
                }
            }
        }