コード例 #1
0
        void DoCreateLOCommentCommand()
        {
            var comment = new LOComment {
                lo_id = CurrentLOIDSelected, user_id = UserID, text = NewLOComment, created_at = DateTime.UtcNow, updated_at = DateTime.UtcNow
            };
            var comment_with_username = new lo_comment_with_username {
                text = NewLOComment, username = SessionService.GetUsername(), created_at = DateTime.UtcNow, updated_at = DateTime.Now, name = UserFirstName + " " + UserLastName
            };

            LOCommentsList.Add(new lo_comment_with_username_wrapper {
                lo_comment = comment_with_username, userImage = UserImage
            });

            _mLearningService.CreateObject <LOComment>(comment, com => com.id);

            NewLOComment = "";

            ForceTableUpdate();
        }
コード例 #2
0
 async Task UpdateLOCommentImages(int index)
 {
     await _comment_image_manager.TryLoadByteVector <lo_comment_with_username_wrapper>(index, LOCommentsList.ToList()
                                                                                       , (pos, bytes) =>
     {
         if (pos < LOCommentsList.Count)
         {
             LOCommentsList[pos].userImage = bytes;
         }
     }
                                                                                       , (locomment) =>
     {
         return(locomment.lo_comment.image_url);
     });
 }