Exemple #1
0
        /// <summary>
        /// 加载数据后隐藏loading状态,显示相关信息
        /// </summary>
        private void AfterLoaded(Status status)
        {

            CurrentStatus = status;
            this.DataContext = CurrentStatus;
            Dispatcher.BeginInvoke(() => { progressBar.IsIndeterminate = false; });
        }
Exemple #2
0
 private void SelectStatus(Status status)
 {
     Dispatcher.BeginInvoke(
         () =>
         NavigationService.Navigate(new Uri(
                                        String.Format("/DetailPage.xaml?{0}={1}", Const.StatusID, status.Id),
                                        UriKind.Relative)));
 }
Exemple #3
0
 /// <summary>
 /// 加载回调
 /// </summary>
 /// <param name="rs"></param>
 private void GetStatusCallback(Status rs)
 {
     Dispatcher.BeginInvoke(() =>
     {
         _status = rs;
         TweetDetailLayoutRoot.DataContext = rs;
         if (AfterLoadedCallback != null)
         {
             AfterLoadedCallback(rs);
         }
     });
 }
Exemple #4
0
 /// <summary>
 /// 控件弹出菜单服务
 /// </summary>
 /// <param name="t"></param>
 /// <param name="act"></param>
 private void MenuItemClick(Status t, EMenuItemAction act)
 {
     if (act == EMenuItemAction.Reply)
     {
         Isolated.Set(IsolatedHelper.TargetTweetKey, t);
         NavigationService.Navigate(
             new Uri(
                 string.Format("/Tweet/Add.xaml?{0}={1}", AppSetting.AddTweetTypeParameterKey,
                               EAddTweetType.Reply.GetHashCode()), UriKind.Relative));
     }
     else if (act == EMenuItemAction.ReAdd)
     {
         Isolated.Set(IsolatedHelper.TargetTweetKey, t);
         NavigationService.Navigate(
             new Uri(
                 string.Format("/Tweet/Add.xaml?{0}={1}", AppSetting.AddTweetTypeParameterKey,
                               EAddTweetType.ReAdd.GetHashCode()), UriKind.Relative));
     }
     else if (act == EMenuItemAction.Favorite)
     {
         //Dal.Tweet.Instance.AddFavorite(t.Id,
         //                               (rs) =>
         //                               {
         //                                   (new MessageBoxHelper()).Show("收藏" + (rs ? "成功" : "失败"), "提示",
         //                                                                 LayoutRoot);
         //                               });
     }
     else if (act == EMenuItemAction.Comment)
     {
         Isolated.Set(IsolatedHelper.TargetTweetKey, t);
         NavigationService.Navigate(
             new Uri(
                 string.Format("/Tweet/Add.xaml?{0}={1}", AppSetting.AddTweetTypeParameterKey,
                               EAddTweetType.Comment.GetHashCode()), UriKind.Relative));
     }
 }
Exemple #5
0
 /// <summary>
 /// 选中微博,跳转到详细页
 /// </summary>
 /// <param name="t"></param>
 private void SelectTweet(Status t)
 {
     if (t != null)
     {
         Deployment.Current.Dispatcher.BeginInvoke(
             () =>
             NavigationService.Navigate(
                 new Uri(string.Format("/Tweet/Detail.xaml?{0}={1}", AppSetting.TweetIdParameterKey, t.Id),
                         UriKind.Relative)));
     }
 }
Exemple #6
0
 private void SendCallback(Status status)
 {
 }