Пример #1
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
                );
        }
Пример #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
            );
        }