예제 #1
0
 private void FirstCommentBtn_Click(object sender, RoutedEventArgs e)
 {
     if (CommentListView.Items.Count > 0)
     {
         CommentListView.ScrollIntoView(CommentListView.Items[0]);
     }
 }
예제 #2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (!string.IsNullOrEmpty(ViewModelBase.CurrentStoryId))
     {
         CommentListView.SetRefresh(true);
     }
 }
예제 #3
0
 private void CommentPage_Loaded(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(ViewModelBase.CurrentStoryId))
     {
         CommentListView.SetRefresh(true);
     }
 }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var list = commentBal.Admin_GetAllComments();

            CommentListView.DataSource = list;
            CommentListView.DataBind();
        }
예제 #5
0
        private async void RefreshCommentList()
        {
            VM.IsRefreshing = true;
            await VM.RequestComments(false);

            CommentListView.SetRefresh(false);
            VM.IsRefreshing = false;
        }
예제 #6
0
        private void LastCommentBtn_Click(object sender, RoutedEventArgs e)
        {
            var itemIndex = CommentListView.Items.Count - 1;

            if (itemIndex > 0)
            {
                CommentListView.ScrollIntoView(CommentListView.Items[itemIndex]);
            }
        }
예제 #7
0
        protected void Delete_Command(object sender, CommandEventArgs e)
        {
            int Id = int.Parse((string)e.CommandArgument);

            commentBal.Admin_DeleteComment(Id);

            var list = commentBal.Admin_GetAllComments();

            CommentListView.DataSource = list;
            CommentListView.DataBind();
        }
예제 #8
0
        private async void LoadMoreComments()
        {
            if (_isLoadComplete)
            {
                CommentListView.FinishLoadingMore();
                return;
            }

            var preCount = VM.CurrentCommentCount;
            await VM.RequestComments(true);

            CommentListView.FinishLoadingMore();
            _isLoadComplete = preCount == VM.CurrentCommentCount;
        }
예제 #9
0
        private async void LoadMoreComments()
        {
            if (_isLoadComplete || VM.IsRefreshing)
            {
                CommentListView.FinishLoadingMore();
                return;
            }

            var preCount = VM.TotalCount;
            await VM.RequestComments(true);

            CommentListView.FinishLoadingMore();
            _isLoadComplete = preCount == VM.TotalCount;
        }
예제 #10
0
        private async void SendComment()
        {
            if (!AuthorizationHelper.IsLogin)
            {
                PopupMessage.DisplayMessageInRes("NeedLogin");
                return;
            }

            if (string.IsNullOrEmpty(VM.CommentContent))
            {
                return;
            }

            await VM.SendComment();

            VM.CommentContent = "";
            CommentListView.SetRefresh(true);
        }
예제 #11
0
 private void CommentListView_Refreshing(object sender, EventArgs e)
 {
     LoadComments(postId);
     CommentListView.EndRefresh();
 }
예제 #12
0
 public CommentListPage()
 {
     BindingContext = new CommentListView();
     InitializeComponent();
 }
예제 #13
0
        private async void RefreshCommentList()
        {
            await VM.RequestComments(false);

            CommentListView.SetRefresh(false);
        }
예제 #14
0
        private async void LoadMoreComments()
        {
            await VM.RequestComments(true);

            CommentListView.FinishLoadingMore();
        }