public MainFormController(ICCTrayMultiConfiguration configuration, ISynchronizeInvoke owner, MainForm mainForm)
		{
            this.mainForm = mainForm;
			this.configuration = configuration;

			serverMonitors = configuration.GetServerMonitors();
			for (int i = 0; i < serverMonitors.Length; i++)
			{
				serverMonitors[i] = new SynchronizedServerMonitor(serverMonitors[i], owner);
			}
			aggregatedServerMonitor = new AggregatingServerMonitor(serverMonitors);
			queueIconProvider = new ResourceIntegrationQueueIconProvider();

			projectMonitors = configuration.GetProjectStatusMonitors(serverMonitors);
			execRunners = new BuildTransitionExecRunner[projectMonitors.Length];
			for (int i = 0; i < projectMonitors.Length; i++)
			{
				execRunners[i] = new BuildTransitionExecRunner(projectMonitors[i], configuration.Execs);
				projectMonitors[i] = new SynchronizedProjectMonitor(projectMonitors[i], owner);
			}
			aggregatedProjectMonitor = new AggregatingProjectMonitor(projectMonitors);
			projectStateIconProvider = new ConfigurableProjectStateIconProvider(configuration.Icons);
			projectStateIconAdaptor = new ProjectStateIconAdaptor(aggregatedProjectMonitor, projectStateIconProvider);
			soundPlayer = new BuildTransitionSoundPlayer(aggregatedProjectMonitor, new AudioPlayer(), configuration.Audio);
			LampController lampController = new LampController(configuration.X10,null);
			x10Controller = new X10Controller(aggregatedProjectMonitor,new DateTimeProvider(),configuration.X10,lampController);
			
			growlController = new GrowlController(aggregatedProjectMonitor, configuration.Growl);

#if !DISABLE_COM
			IBalloonMessageProvider balloonMessageProvider = new ConfigurableBalloonMessageProvider(configuration.BalloonMessages);
			speakerForTheDead = new SpeakingProjectMonitor(aggregatedProjectMonitor, balloonMessageProvider, configuration.Speech);
#endif
		}
		public void SetUp()
		{
			x10LowLevelDriverMock = new DynamicMock(typeof (IX10LowLevelDriver));
			x10LowLevelDriverMock.Strict = true;

			X10Configuration configuration = new X10Configuration();
			configuration.SuccessUnitCode = GREEN_LAMP_DEVICE_CODE;
			configuration.BuildingUnitCode = YELLOW_LAMP_DEVICE_CODE;
			configuration.FailureUnitCode = RED_LAMP_DEVICE_CODE;
			IX10LowLevelDriver x10LowLevelDriver = x10LowLevelDriverMock.MockInstance as IX10LowLevelDriver;
			lampController = new LampController(configuration,x10LowLevelDriver);
		}