private void _NicoLiveCommentClient_CommentPosted(object sender, CommentPostedEventArgs e) { _UIScheduler.Schedule(() => { if (e.ChatResult == ChatResult.InvalidPostkey) { _PostKey = null; } PostCommentResult?.Invoke(this, e.ChatResult == ChatResult.Success); }); }
private async void _NicoLiveCommentClient_CommentPosted(object sender, CommentPostedEventArgs e) { await HohoemaApp.UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (e.ChatResult == ChatResult.InvalidPostkey) { _PostKey = null; } PostCommentResult?.Invoke(this, e.ChatResult == ChatResult.Success); }); }
public async Task PostComment(string message, string command, TimeSpan elapsedTime) { if (!CanPostComment) { PostCommentResult?.Invoke(this, false); return; } if (_NicoLiveCommentClient != null) { var userId = PlayerStatusResponse.User.Id; _LastCommentText = message; await _NicoLiveCommentClient.PostComment(message, userId, command, elapsedTime); } }
public async Task PostComment(string message, string command, TimeSpan elapsedTime) { if (!CanPostComment) { PostCommentResult?.Invoke(this, false); return; } if (_NicoLiveCommentClient != null) { _LastCommentText = message; await UpdatePostKey(); if (_PostKey == null) { throw new Exception("failed post comment, postkey update failed, " + LiveId); } _NicoLiveCommentClient.PostComment(message, command, _PostKey, elapsedTime); } }
private async void _NicoLiveCommentReciever_CommentPosted(bool isSuccess, PostChat chat) { Debug.WriteLine("コメント投稿結果:+" + isSuccess); await HohoemaApp.UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { PostCommentResult?.Invoke(this, isSuccess); if (isSuccess) { _LiveComments.Add(new Chat() { User_id = chat.UserId, Vpos = chat.Vpos, No = "", Mail = chat.Mail, Text = chat.Comment, Anonymity = (chat.Mail?.Contains("184") ?? false) ? "true" : null }); } }); }