Example #1
0
        public MenuNavigator(IInfrastructureEventAggregator eventAggregator, IPluginFinder pluginFinder, IFormsManager formsManager)
        {
            _UnattachedMenus = new HashSet<KeyValuePair<string, IMenu>>();
            _FormsManager = formsManager;

            pluginFinder.RegisterCreatePluginsCallBack<IEndPointProvider>(ProcessPlugins);
            eventAggregator.Subscribe<IApplicationInitializedEvent>((args) => ApplicationInitialized());
        }
Example #2
0
        public ViewNavigator(p.IRegionManager regionManager, IDialogs dialogs, IFormsManager formsManager, IInfrastructureEventAggregator eventAggregator)
        {
            _RegionManager = regionManager;
            _Dialogs = dialogs;
            _FormsManager = formsManager;
            _EventAggregator = eventAggregator;

            _RegionActiveViewModels = new Dictionary<string, HashSet<INavigationAware>>();
            _DisposableViewStates = new Dictionary<object, IDisposable>();
            KeptAliveRegions = new HashSet<string>();

            _EventAggregator.Subscribe<IApplicationExitRequestEvent>(ApplicationExitRequested);
            _EventAggregator.Subscribe<IStartupNotificationsRequestEvent>(args => _IsProcessingNotifications = true);
            _EventAggregator.Subscribe<IStartupNotificationsProcessedEvent>(args => 
                {
                    _IsProcessingNotifications = false;
                    _NotificationsProcessed = true;
                    ProcessUIWorkQueue();
                });
        }