/// <summary> /// Occurs when the application has started. /// </summary> /// <param name="e">Event information.</param> protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ValidateConnection.validateConnection(); // Create the window and provide it with the presentation layer. IDIPS service = ServiceHelper.CreateLocalService(); IProcessingService s = service.Processor; IUnityContainer c = GlobalContainer.Instance.Container; c.RegisterInstance <IDIPS>(service); c.RegisterInstance <IProcessingService>(s); c.RegisterInstance <IPipelineManager>(s.PipelineManager); FilterTreeView ftv = new FilterTreeView(); QueueDialog qd = new QueueDialog(); UIContext context = new UIContext(); HandlerFactory f = new HandlerFactory(); f.Load(Assembly.GetAssembly(typeof(HandlerFactory))); c.RegisterInstance <IHandlerFactory>(f); c.RegisterInstance <IUIContext>(context); c.RegisterInstance <IFilterTreeView>(ftv); c.RegisterInstance <IQueueDialog>(qd); MainNavi navWindow = new MainNavi(); try { navWindow.ShowDialog(); } catch (Exception) { throw; } }