/// <summary> /// Fired when the comment box is done opening. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CommentBox_OnBoxOpened(object sender, CommentBoxOnOpenedArgs e) { OnOpenCommentBox openBoxContext = (OnOpenCommentBox)e.Context; if (openBoxContext != null) { // Replace the context e.Context = openBoxContext.Context; openBoxContext.CommentBoxOpened(sender, e); } }
/// <summary> /// Fired when content has been submitted in the comment box. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CommentBox_OnCommentSubmitted(object sender, OnCommentSubmittedArgs e) { OnOpenCommentBox openBoxContext = (OnOpenCommentBox)e.Context; if (openBoxContext != null) { // Replace the context e.Context = openBoxContext.Context; bool wasActionSuccessful = openBoxContext.CommentBoxSubmitted(sender, e); // Hide the box if good if (wasActionSuccessful) { ui_commentBox.HideBox(true); } else { ui_commentBox.HideLoadingOverlay(); } } }
/// <summary> /// Fired when a panel wasn't us to open the comment box. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FlipViewPostPanel_OnOpenCommentBox(object sender, OnOpenCommentBox e) { // Show the box with this data and the argument as the context. ShowCommentBox(e.RedditId, e.EditText, e); }