Beispiel #1
0
 private async void UserJoined_Event(string obj)
 {
     Messages.Insert(0, new UserChatMessage
     {
         Message   = "User joined to the meeting.",
         Username  = userName,
         TimeStamp = DateTime.Now,
         Location  = await Lokalizacja_Main.lokacja()
     });
 }
Beispiel #2
0
        private async void BtnSend_Clicked(object sender, EventArgs e)
        {
            var message = txtMassage.Text;

            if (string.IsNullOrWhiteSpace(message))
            {
                await DisplayAlert("Message errors", "The message is required.", "Ok");

                return;
            }

            await hubConnection.SendAsync(Consts.SEND_MESSAGE, new UserChatMessage
            {
                Message  = message,
                Username = userName,
                Location = await Lokalizacja_Main.lokacja()
            });
        }