コード例 #1
0
ファイル: WindowManager.cs プロジェクト: XaaK/GenesisEngine
        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> >();
            }));
        }
コード例 #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();
            }));
        }