示例#1
0
        private void UpdateComment(uint start, uint end)
        {
            var commentRequest = new GetRatingMotionInfoStoreRequest(MotionID, start, end);

            commentRequest.ProcessSuccessfully += (reply) =>
            {
                foreach (var comment in reply.rating_info.ratingInfoMotion)
                {
                    RatingInfo comment1 = comment;
                    Dispatcher.BeginInvoke((Action) delegate
                    {
                        var item = new CommentItem(comment1);
                        ReviewStackPanel.Children.Add(item);
                        numberOfComment++;
                        //for (int i = 0; i < 20; i++)
                        //{
                        //    var item = new CommentItem(comment1);
                        //    ReviewStackPanel.Children.Add(item);
                        //    numberOfComment++;
                        //    Console.WriteLine(numberOfComment);
                        //}
                    });
                }
                //Console.WriteLine(ReviewStackPanel.Children.Count);
            };
            commentRequest.ProcessError += (reply, msg) => Debug.Assert(false, msg);
            GlobalVariables.StoreWorker.ForceAddRequest(commentRequest);
        }
示例#2
0
 private void UpdateComment(uint start, uint end)
 {
     var commentRequest = new GetRatingMotionInfoStoreRequest(MotionID, start, end);
     commentRequest.ProcessSuccessfully += (reply) =>
     {
         foreach (var comment in reply.rating_info.ratingInfoMotion)
         {
             RatingInfo comment1 = comment;
             Dispatcher.BeginInvoke((Action)delegate
             {
                 var item = new CommentItem(comment1);
                 ReviewStackPanel.Children.Add(item);
                 numberOfComment++;
                 //for (int i = 0; i < 20; i++)
                 //{
                 //    var item = new CommentItem(comment1);
                 //    ReviewStackPanel.Children.Add(item);
                 //    numberOfComment++;
                 //    Console.WriteLine(numberOfComment);
                 //}
             });
         }
         //Console.WriteLine(ReviewStackPanel.Children.Count);
     };
     commentRequest.ProcessError += (reply, msg) => Debug.Assert(false, msg);
     GlobalVariables.StoreWorker.ForceAddRequest(commentRequest);
 }