public MR_posts_newComment Posts_NewComment(string post_id, string content, string objects, string previews) { if (!IsNetworkAvailable) { return(null); } MR_posts_newComment _ret = null; try { _ret = m_service.posts_newComment(SessionToken, m_rt.CurrentGroupID, post_id, content, objects, previews); } catch (Station401Exception _e) { Main.Current.Station401ExceptionHandler(_e.Message); } if (_ret != null) { if (_ret.status == "200") { return(_ret); } } return(null); }
public bool PostComment(WaterMarkRichTextBox textBox, Post post) { if (!Main.Current.CheckNetworkStatus()) { return(false); } if (textBox.Text.Trim().Equals(string.Empty)) { MessageBox.Show(I18n.L.T("DetailView.CommentEmpty"), "Waveface", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } MR_posts_newComment _postsNewComment = Main.Current.RT.REST.Posts_NewComment(post.post_id, textBox.Text, "", ""); if (_postsNewComment != null) { Main.Current.AfterPostComment(post.post_id); } textBox.Text = ""; return(true); }