Пример #1
0
 public ContentNavigatorController(ContentNavigatorViewModel viewModel, IContentNavigator contentNavigator,
                                   IControllerServices controllerServices)
     : base(viewModel, controllerServices)
 {
     this._contentNavigator     = contentNavigator;
     this._navigationObservable = this._contentNavigator.WhenNavigated.ObserveOnDispatcher().Subscribe(this.HandleNavigatorNavigated);
     this.AddDisposable(this._navigationObservable);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ContentApiController"/> class.
 /// </summary>
 public ContentApiController()
 {
     /*
      * Calling new ContentService() in the controller is not the best design,
      * because it ties this controller to HedgehogDevelopment.Scaas.Content.Items.ContentNavigator.
      * For a better approach, use a Dependency Resolver (Injection) for our IContentNavigator inteface.
      */
     _contentNavigator = new ContentNavigator();
 }
Пример #3
0
        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            _contentNavigator = new ContentNavigator();
            var dialogService   = new DialogService(ShellViewModel.DialogIdentifier);
            var progressService = new ProgressService(ShellViewModel.ProgressDialogIdentifier);

            containerRegistry.RegisterInstance(typeof(IDialogBus), new DialogBus(dialogService, progressService));
            containerRegistry.RegisterInstance(typeof(IContentNavigator <ViewType>), _contentNavigator);
            containerRegistry.RegisterInstance(typeof(IProgressPresenter), new ProgressPresenter(progressService.GetMessenger()));
            containerRegistry.Register(typeof(IGetCurrentDateTimeUseCase), typeof(GetCurrentDateTimeUseCase));
            containerRegistry.Register(typeof(IDetailDataListUseCase), typeof(DetailDataListUseCase));
        }
Пример #4
0
        public ShellViewModel(IDialogBus dialogBus, IProgressPresenter progressPresenter, IContentNavigator <ViewType> contentNavigator) :
            base(dialogBus, progressPresenter)
        {
            _contentNavigator = contentNavigator;
            var menus = Enum.GetValues(typeof(ViewType))
                        .OfType <ViewType>()
                        .Select(x => new MenuItem(x));

            MenuItems           = new ObservableCollection <MenuItem>(menus);
            SelectedMenuCommand = new DelegateCommand(() => _contentNavigator.Navigate(SelectedMenuItem.ViewType));

            LoadedCommand = new DelegateCommand(() => _contentNavigator.Navigate(ViewType.GetCurrentDateTime));
        }
Пример #5
0
 public UserContentController(IContentNavigator navigator)
 {
     this.navigator = navigator ?? throw new ArgumentNullException(nameof(navigator));
 }
        public SimpleLoginDemoContentController(IContentNavigator navigator)
        {
            this.navigator = navigator ?? throw new ArgumentNullException(nameof(navigator));

            SubscribeContentNavigatorEvent();
        }
 public LoginContentController(IContentNavigator navigator, IUserAuthentication userAuthentication)
 {
     this.navigator          = navigator ?? throw new ArgumentNullException(nameof(navigator));
     this.userAuthentication = userAuthentication;
 }
Пример #8
0
 public LoginController(IContentNavigator navigator, IUserAuthentication userAuthentication)
 {
     Navigator          = navigator.RequireNonNull(nameof(navigator));
     UserAuthentication = userAuthentication.RequireNonNull(nameof(userAuthentication));
 }
Пример #9
0
        public ApplicationHostController(IContentNavigator navigator)
        {
            Navigator = navigator.RequireNonNull(nameof(navigator));

            SubscribeContentNavigatorEvent();
        }
Пример #10
0
 public HomeController(IContentNavigator navigator)
 {
     Navigator = navigator.RequireNonNull(nameof(navigator));
 }