Exemple #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();
        }
Exemple #2
0
        protected override IModuleCatalog CreateModuleCatalog()
        {
            var catalog = new ModuleCatalog();

            catalog.AddModule(typeof(UnityAopModule));
            catalog.Initialize();

            return(catalog);
        }
Exemple #3
0
 /// <summary>
 /// Configures the <see cref="T:Microsoft.Practices.Prism.Modularity.IModuleCatalog"/> used by Prism.
 /// </summary>
 protected override void ConfigureModuleCatalog()
 {
     ModuleCatalog.Initialize();
 }