Ejemplo n.º 1
0
        //If you want your own splash window - inherit from the bootstrapper and register type ISplashView
        protected override void InitializeModules()
        {
            IContainerExtension container = CreateContainerExtension();

            ModuleCatalog.Initialize();

            // Check for existance, make sure we init first.
            // load from disk in case of it not showing up in module catalog.
            // resolving seems to init properly.
            if (System.IO.File.Exists("Wider.Splash.dll"))
            {
                // Assume exits
                Assembly assembly = Assembly.LoadFrom("Wider.Splash.dll");
                Type     type     = assembly.GetType("Wider.Splash.SplashModule");
                IModule  splash   = (IModule)Container.Resolve(type);
                splash.OnInitialized(container);
            }

            // Load core module, this is internal so call manually
            CoreModule coreModule = Container.Resolve <CoreModule>();

            coreModule.OnInitialized(container);

            base.InitializeModules();

            // now we should have a shell, load settings and show if we can.
            IShell shell = Container.Resolve <IShell>();

            coreModule.LoadSettings();

            // Assign main window object and show window.
            Application.Current.MainWindow             = shell as Window;
            Application.Current.MainWindow.DataContext = Container.Resolve <IWorkspace>();
            Application.Current.MainWindow.Show();
        }
Ejemplo n.º 2
0
 protected override void RegisterTypes(IContainerRegistry containerRegistry)
 {
     // Load core module, this is internal so call manually
     coreModule = Container.Resolve <CoreModule>();
     coreModule.RegisterTypes(containerRegistry);
 }