Bootstrapper.cs 871 B

123456789101112131415161718192021222324252627282930313233
  1. using System.ComponentModel.Composition.Hosting;
  2. using System.Windows;
  3. using Microsoft.Practices.Prism.MefExtensions;
  4. using Module.Login;
  5. namespace Editor
  6. {
  7. public partial class Bootstrapper : MefBootstrapper
  8. {
  9. protected override void ConfigureAggregateCatalog()
  10. {
  11. this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(Bootstrapper).Assembly));
  12. this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(LoginModule).Assembly));
  13. }
  14. protected override void ConfigureContainer()
  15. {
  16. base.ConfigureContainer();
  17. }
  18. protected override void InitializeShell()
  19. {
  20. base.InitializeShell();
  21. Application.Current.MainWindow = (Shell)this.Shell;
  22. Application.Current.MainWindow.Show();
  23. }
  24. protected override DependencyObject CreateShell()
  25. {
  26. return this.Container.GetExportedValue<Shell>();
  27. }
  28. }
  29. }