private async void RemoveContactCommandExecute() { IsLoading = true; var messageService = ServiceLocator.Locator.Get<IMessageService>(); var deleteCommand = new DialogCommand("remove", new RelayCommand(async () => await RemoveContactAndDeleteHistory())); var cancelCommand = new DialogCommand("cancel", new RelayCommand(() => { }), false, true); await messageService.ShowAsync("Remove", "Do you really want to remove contact and chat?", new[] { deleteCommand, cancelCommand }); IsLoading = false; }
private async void SignOutCommandExecute() { IsLoading = true; var messageService = ServiceLocator.Locator.Get<IMessageService>(); DialogCommand logoutCommand = new DialogCommand("logout", new RelayCommand(SignOut)); DialogCommand cancelCommand = new DialogCommand("cancel", new RelayCommand(() => { IsLoading = false; }), false, true); await messageService.ShowAsync("Logout", "Do you really want to logout?", new [] {logoutCommand, cancelCommand}); }