Пример #1
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));
        }
Пример #2
0
        IUIController CreateController(IConnection connection, ViewWithData data, Action <IView> onViewLoad)
        {
            var controller = uiProvider.Configure(data.MainFlow, connection, data);

            controller.TransitionSignal.Subscribe(
                loadData =>
            {
                onViewLoad?.Invoke(loadData.View);
                IsBusy = false;
            },
                () => {
                Pop(controller);
                Reload();
            });
            controller.Start();
            return(controller);
        }
Пример #3
0
 public IUIController Configure(UIControllerFlow flow, IConnection connection = null, ViewWithData data = null) => theRealProvider.Configure(flow, connection, data);