/// <summary> /// Called when the <see cref="SignIn"/> command is executed. /// </summary> void OnSignIn() { // Show the Sign In dialog. We don't need to listen to the outcome of this: the parent // GitHubPaneViewModel will listen to RepositoryHosts.IsLoggedInToAnyHost and close // this view when the user logs in. uiProvider.RunInDialog(UIControllerFlow.Authentication); }
public Task <CloneDialogResult> ShowCloneDialog([AllowNull] IConnection connection) { var controller = uiProvider.Configure(UIControllerFlow.Clone, connection); var basePath = default(string); var repository = default(IRepositoryModel); controller.TransitionSignal.Subscribe(x => { var vm = x.View.ViewModel as IBaseCloneViewModel; vm.Done.Subscribe(_ => { basePath = vm?.BaseRepositoryPath; repository = vm?.SelectedRepository; }); }); uiProvider.RunInDialog(controller); var result = repository != null && basePath != null ? new CloneDialogResult(basePath, repository) : null; return(Task.FromResult(result)); }
public void RunInDialog(IUIController controller) => theRealProvider.RunInDialog(controller);