Exemple #1
0
        private UIViewController MakePresentingViewController(Item <object> item,
                                                              Func <LoadedItem <object>, UIViewController> builder)
        {
            var viewController = LoadingViewController <object> .Build(item, fileService, loadedItem =>
            {
                var contentViewController = builder(loadedItem);
                var actionsViewController = new ActionsViewController(contentViewController)
                {
                    ActionsViewControllerDelegate = this
                };
                return(actionsViewController);
            });

            return(viewController);
        }
        public void Start(NSUrl directoryUrl, bool animated)
        {
            bool finishButtonHidden = _navigationController?.ViewControllers?.Any() ?? false;

            if (directoryUrl.HasDirectoryPath)
            {
                var viewController = LoadingViewController <object> .Build(Item <object> .FromDirectory(directoryUrl), _fileService,
                                                                           loadedItem =>
                {
                    var viewModel = new DirectoryViewModel(loadedItem.Url, loadedItem, _fileSpecifications, _configuration, finishButtonHidden);
                    var directoryViewController = new DirectoryViewController(viewModel)
                    {
                        Delegate = this
                    };
                    _directoryViewController = directoryViewController;

                    return(directoryViewController);
                });

                _navigationController?.PushViewController(viewController, true);
            }
        }