Esempio n. 1
0
        public void Run()
        {
            DiscoverParts();
            _log.Info("Parts discovered");

            MainWindow mainWindow = new MainWindow();
            InjectStaticViewModels(mainWindow);
            _log.Info("Static View Models injected");
            mainWindow.Show();

            Application.Current.MainWindow = mainWindow;

            InjectDynamicViewModels(_dm == "MULTI");
            _log.Info("Dynamic View Models injected");
            InjectServices();
            _log.Info("Services injected");
        }
Esempio n. 2
0
 private void InjectStaticViewModels(MainWindow mainWindow)
 {
     foreach (var vm in StaticViewModels)
     {
         Mediator.GetInstance.Register(vm);
         mainWindow.RibbonRegion.Items.Add(new TabItem { Content = ((BaseViewModel)vm).ViewReference, Header = vm.StaticViewName });
     }
 }