Ejemplo n.º 1
0
 private void ReplyButton_Click(object sender, RoutedEventArgs e)
 {
     if (sender is HyperlinkButton button)
     {
         if (button.Tag is WordPressPCL.Models.CommentThreaded comment)
         {
             ViewModel.CommentReply = comment;
             CommentInput.Focus(FocusState.Pointer);
         }
     }
 }
Ejemplo n.º 2
0
        private async void SubmitComment()
        {
            string Data;

            CommentInput.Document.GetText(Windows.UI.Text.TextGetOptions.None, out Data);
            Data = Data.Trim();

            if (string.IsNullOrEmpty(Data))
            {
                CommentInput.Focus(FocusState.Keyboard);
                return;
            }

            if (!Member.IsLoggedIn)
            {
                Dialogs.Login LoginBox = new Dialogs.Login(Member);
                await Popups.ShowDialog(LoginBox);

                if (!Member.IsLoggedIn)
                {
                    return;
                }
            }

            if (Crypt != null)
            {
                Data = Crypt.Encrypt(Data);
            }

            new RuntimeCache()
            {
                EN_UI_Thead = true
            }.POST(
                Shared.ShRequest.Server
                , Shared.ShRequest.Comment(CCTarget, CCId, Data, Crypt != null)
                , CommentSuccess
                , CommentFailed
                , false
                );
        }