Beispiel #1
0
        private async void ExecuteSendMessage()
        {
            try
            {
                SendEnabled = false;

                SendMessageResult result = await _client.SendAsync(Message);

                OnSendMessage(new SendMessageEventArgs(result));

                if (!result.Success)
                {
                    OnError(result.Message);
                    return;
                }

                Message = null;
            }
            catch (Exception e)
            {
                OnError(new ErrorEventArgs(e));
            }
            finally
            {
                SendEnabled = true;
            }
        }
 public SendMessageEventArgs(SendMessageResult result)
 {
     Result = result;
 }