1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| using System.Windows;
using Microsoft.Practices.Prism.Logging;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.ServiceLocation;
//using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.MefExtensions;
//using Microsoft.Practices.Prism.UnityExtensions;
using System;
namespace X23P
{
class X23PBootstrapper : MefBootstrapper
{
protected override DependencyObject CreateShell()
{
return new Shell();
}
protected override void InitializeShell()
{
base.InitializeShell();
App.Current.MainWindow = (Window)this.Shell;
App.Current.MainWindow.Show();
}
protected override IModuleCatalog CreateModuleCatalog()
{
return base.CreateModuleCatalog();
}
protected override void ConfigureModuleCatalog()
{
Type MD = typeof(HelloWorldModule.HelloWorldModule);
this.ModuleCatalog.AddModule(
new ModuleInfo()
{
ModuleName = MD.Name,
ModuleType = MD.AssemblyQualifiedName,
}
);
}
}
} |
Partager