Beispiel #1
0
        public WindowManager(IContainer container)
        {
            _container = container;

            StartUIThread();

            _windowDispatcher.Invoke((Action)(() =>
            {
                // We pull these out of the container here instead of doing normal
                // constructor injection because we need them to be created on this thread.
                _settingsCustodian = _container.GetInstance <IScreenCustodian <SettingsView, SettingsViewModel> >();
                _statisticsCustodian = _container.GetInstance <IScreenCustodian <StatisticsView, StatisticsViewModel> >();
            }));
        }
Beispiel #2
0
        public void ShowAllWindows()
        {
            StartUIThread();

            _windowDispatcher.Invoke(() =>
            {
                // We pull these out of the container here instead of doing normal
                // constructor injection because we need them to be created on this thread.
                _settingsCustodian   = _container.GetInstance <IScreenCustodian <SettingsView, SettingsViewModel> >();
                _statisticsCustodian = _container.GetInstance <IScreenCustodian <StatisticsView, StatisticsViewModel> >();
            });

            _windowDispatcher.Invoke((Action)(() =>
            {
                _settingsCustodian.ShowInactive();
                _statisticsCustodian.ShowInactive();
            }));
        }