Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 public void RunInDialog(IUIController controller) => theRealProvider.RunInDialog(controller);