Пример #1
0
        private void sendBtn_Click(object sender, EventArgs e)
        {
            var msg = messageTxt.Text.Trim();

            Message message = new Message
            {
                Text        = msg,
                User        = _profile,
                Attachments = (msgPhotos.Count != 0)
                    ? msgPhotos
                    : null,
                Chat = _currentChat,
                Date = DateTime.UtcNow,
                IsSelfDestructing = destructingChk.Checked
            };

            ServiceClient.SendMessage(message);
            msgPhotos.Clear();
        }
Пример #2
0
 public static void SendMessage(Message message)
 {
     _client.PostAsJsonAsync <Message>("messages", message);
     return;
 }