private async void CloseApplication(CloseEventTestMessenger mapMesseger)
 {
     try
     {
         await _singnalRPersistensConnectionService.SendMessageAsync(UserName, null, MethodType.RemoveUser, null, ReceiverType.None);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
Exemple #2
0
        private async void ConnectAsync()
        {
            try
            {
                await _singnalRPersistensConnectionService.ConnectServerAsync(ServerURI);

                await _singnalRPersistensConnectionService.SendMessageAsync(UserName, null, MethodType.AddUser, null, ReceiverType.None);

                await _navigationService.Navigate <TestWPFViewModel, string>(UserName);
            }
            catch (Exception e)
            {
                StatusText = "Unable to connect to server: Start server before connecting clients.";
                return;
            }
        }