public TestResultsPackage(IWindowManager windowManager, ITestResultsController testResultsController, IOptionsController optionsController, ITestTreeModel testTreeModel, ITestStatistics testStatistics) { this.windowManager = windowManager; this.testResultsController = testResultsController; this.optionsController = optionsController; this.testTreeModel = testTreeModel; this.testStatistics = testStatistics; }
public TestResults(ITestResultsController testResultsController, IOptionsController optionsController, ITestTreeModel testTreeModel, ITestStatistics testStatistics) { this.testResultsController = testResultsController; this.optionsController = optionsController; this.testTreeModel = testTreeModel; this.testStatistics = testStatistics; InitializeComponent(); }
public Win7TaskBar(IntPtr windowHandle, ITaskbarList4 taskBarList, ITestTreeModel testTreeModel, ITestStatistics testStatistics) { this.windowHandle = windowHandle; this.testTreeModel = testTreeModel; this.testStatistics = testStatistics; testStatistics.Passed.PropertyChanged += UpdateTaskbar; testStatistics.Failed.PropertyChanged += UpdateTaskbar; testStatistics.Skipped.PropertyChanged += UpdateTaskbar; testStatistics.Inconclusive.PropertyChanged += UpdateTaskbar; this.taskBarList = taskBarList; taskBarList.HrInit(); }
internal Main(IApplicationController applicationController) { this.applicationController = applicationController; applicationController.RunStarted += (s, e) => SyncContext.Post(cb => { // enable/disable buttons startButton.Enabled = startTestsToolStripMenuItem.Enabled = false; startTestsWithDebuggerButton.Enabled = startWithDebuggerToolStripMenuItem.Enabled = false; stopButton.Enabled = stopTestsToolStripMenuItem.Enabled = true; }, null); applicationController.RunFinished += (s, e) => SyncContext.Post(cb => { // enable/disable buttons & menu items appropriately stopButton.Enabled = stopTestsToolStripMenuItem.Enabled = false; startButton.Enabled = startTestsToolStripMenuItem.Enabled = true; startTestsWithDebuggerButton.Enabled = startWithDebuggerToolStripMenuItem.Enabled = true; }, null); applicationController.ExploreFinished += (sender, e) => SyncContext.Post(cb => { startButton.Enabled = startTestsToolStripMenuItem.Enabled = true; startTestsWithDebuggerButton.Enabled = startWithDebuggerToolStripMenuItem.Enabled = true; }, null); applicationController.TestsFailed += (s, e) => SyncContext.Post(cb => Activate(), null); taskManager = RuntimeAccessor.ServiceLocator.Resolve <ITaskManager>(); optionsController = RuntimeAccessor.ServiceLocator.Resolve <IOptionsController>(); reportController = RuntimeAccessor.ServiceLocator.Resolve <IReportController>(); testTreeModel = RuntimeAccessor.ServiceLocator.Resolve <ITestTreeModel>(); testStatistics = RuntimeAccessor.ServiceLocator.Resolve <ITestStatistics>(); commandFactory = RuntimeAccessor.ServiceLocator.Resolve <ICommandFactory>(); testFrameworkManager = RuntimeAccessor.ServiceLocator.Resolve <ITestFrameworkManager>(); windowManager = RuntimeAccessor.ServiceLocator.Resolve <IWindowManager>(); // moved this below the service locator calls as the optionsController was being used _before_ it was initialised :( // TODO: remove as many dependencies from the shell as possible InitializeComponent(); SetupReportMenus(); SetupRecentProjects(); applicationController.PropertyChanged += (sender, e) => { switch (e.PropertyName) { case "ProjectFileName": Text = applicationController.Title; break; case "RecentProjects": SetupRecentProjects(); break; } }; progressController = RuntimeAccessor.ServiceLocator.Resolve <IProgressController>(); progressController.Status.PropertyChanged += (s, e) => { toolStripStatusLabel.Text = progressController.Status; }; progressController.TotalWork.PropertyChanged += (s, e) => { toolStripProgressBar.TotalWork = progressController.TotalWork; }; progressController.CompletedWork.PropertyChanged += (s, e) => { toolStripProgressBar.CompletedWork = progressController.CompletedWork; }; progressController.DisplayProgressDialog += (s, e) => SyncContext.Post(cb => new ProgressMonitorDialog(e.ProgressMonitor).Show(this), null); }
internal Main(IApplicationController applicationController) { this.applicationController = applicationController; applicationController.RunStarted += (s, e) => SyncContext.Post(cb => { // enable/disable buttons startButton.Enabled = startTestsToolStripMenuItem.Enabled = false; startTestsWithDebuggerButton.Enabled = startWithDebuggerToolStripMenuItem.Enabled = false; stopButton.Enabled = stopTestsToolStripMenuItem.Enabled = true; }, null); applicationController.RunFinished += (s, e) => SyncContext.Post(cb => { // enable/disable buttons & menu items appropriately stopButton.Enabled = stopTestsToolStripMenuItem.Enabled = false; startButton.Enabled = startTestsToolStripMenuItem.Enabled = true; startTestsWithDebuggerButton.Enabled = startWithDebuggerToolStripMenuItem.Enabled = true; }, null); applicationController.ExploreFinished += (sender, e) => SyncContext.Post(cb => { startButton.Enabled = startTestsToolStripMenuItem.Enabled = true; startTestsWithDebuggerButton.Enabled = startWithDebuggerToolStripMenuItem.Enabled = true; }, null); applicationController.TestsFailed += (s, e) => SyncContext.Post(cb => Activate(), null); taskManager = RuntimeAccessor.ServiceLocator.Resolve<ITaskManager>(); optionsController = RuntimeAccessor.ServiceLocator.Resolve<IOptionsController>(); reportController = RuntimeAccessor.ServiceLocator.Resolve<IReportController>(); testTreeModel = RuntimeAccessor.ServiceLocator.Resolve<ITestTreeModel>(); testStatistics = RuntimeAccessor.ServiceLocator.Resolve<ITestStatistics>(); commandFactory = RuntimeAccessor.ServiceLocator.Resolve<ICommandFactory>(); testFrameworkManager = RuntimeAccessor.ServiceLocator.Resolve<ITestFrameworkManager>(); windowManager = RuntimeAccessor.ServiceLocator.Resolve<IWindowManager>(); // moved this below the service locator calls as the optionsController was being used _before_ it was initialised :( // TODO: remove as many dependencies from the shell as possible InitializeComponent(); SetupReportMenus(); SetupRecentProjects(); applicationController.PropertyChanged += (sender, e) => { switch (e.PropertyName) { case "ProjectFileName": Text = applicationController.Title; break; case "RecentProjects": SetupRecentProjects(); break; } }; progressController = RuntimeAccessor.ServiceLocator.Resolve<IProgressController>(); progressController.Status.PropertyChanged += (s, e) => { toolStripStatusLabel.Text = progressController.Status; }; progressController.TotalWork.PropertyChanged += (s, e) => { toolStripProgressBar.TotalWork = progressController.TotalWork; }; progressController.CompletedWork.PropertyChanged += (s, e) => { toolStripProgressBar.CompletedWork = progressController.CompletedWork; }; progressController.DisplayProgressDialog += (s, e) => SyncContext.Post(cb => new ProgressMonitorDialog(e.ProgressMonitor).Show(this), null); }