Ejemplo n.º 1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter != null)
     {
         dreaming = (DreamingModel)e.Parameter;
    
         this.flipview.ItemsSource = dreaming.image;
        
     }
 }
Ejemplo n.º 2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter!= null && e.Parameter is DreamingModel)
     {
         dreaming = (DreamingModel)e.Parameter;
         postGrid.DataContext = dreaming;
         LoadComment(dreaming._id);
     }
     else if (e.Parameter != null && e.Parameter is UserModel)
     {
         UserModel user = e.Parameter as UserModel;
         LoadPost(user.day);
         LoadComment(user.day);
     }
    
    
 }
Ejemplo n.º 3
0
 async void LoadPost(string id)
 {
     string response = await HttpGet.HttpGets(Config.apiDreamingOne + id);
     if (response != null)
     {
         try
         {
             DataContractJsonSerializer ds = new DataContractJsonSerializer(typeof(DreamingModel));
             MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(response));
             dreaming = ds.ReadObject(ms) as DreamingModel;
             postGrid.DataContext = dreaming;
         }
         catch (Exception ex)
         {
             Debug.WriteLine(ex.Message.ToString());
         }
     }
 }