Beispiel #1
0
        private async void PostPage_Loaded(object sender, RoutedEventArgs e)
        {
            var res = await PostAPI.GetPostById(GeneralBlackboard.TryGetValue <int>(BlackBoardValues.EPostData), AppPersistent.UserToken);

            if (res.error)
            {
                DialogManager.ShowDialog("F U C K", res.message);
            }

            m_PostData = res.data[0];

            if (m_PostData != null)
            {
                wdgComment.PostID = m_PostData.id;
                m_PosterId        = m_PostData.owner_id;
                //wdgPost.CurrentPostData = post;
                //wdgPost.PostText = post.text;
                //wdgPost.ImageURL = post.attachments[0].photo.photo_medium;
                txtPost.Text          = m_PostData.text;
                imgPost.Source        = new BitmapImage(new Uri(m_PostData.attachments[0].photo.photo_medium, UriKind.Absolute));
                lblPosterName.Content = m_PostData.owner_name;
                //lblPosterName.IsEnabled = post.author_watch == 1 ? false : true;
                lblDate.Content = UnixTimeStampToDateTime(m_PostData.date).ToString();
                UpdateComments(m_PostData.id);
            }
        }
Beispiel #2
0
        private async void UpdateTimer_Tick(object sender, EventArgs e)
        {
            var res = await PostAPI.GetPostById(GeneralBlackboard.TryGetValue <int>(BlackBoardValues.EPostData), AppPersistent.UserToken);

            if (res.error)
            {
                DialogManager.ShowDialog("F U C K", res.message);
            }

            m_PostData = res.data[0];

            if (m_PostData != null)
            {
                UpdateComments(m_PostData.id);
            }
        }
 private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     m_UserInfo  = GeneralBlackboard.TryGetValue <ProfileData>(BlackBoardValues.EProfileData);
     DataContext = m_UserInfo;
 }