protected void OnBuildOccurred(MonitorBuildOccurredEventArgs args) { if (BuildOccurred != null) { BuildOccurred(this, args); } }
private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e) { if (BuildOccurred != null) { BuildOccurred(this, e); } }
private void ProjectMonitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs args) { if (BuildOccurred != null) { synchronizeInvoke.BeginInvoke(BuildOccurred, new object[] {sender, args}); } }
private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e) { string soundFileToPlay = ChooseSoundFile(e.BuildTransition); if (soundFileToPlay == null || soundFileToPlay.Length == 0) return; audioPlayer.Play(soundFileToPlay); }
private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e) { string projectName = e.ProjectMonitor.Detail.ProjectName; CaptionAndMessage captionAndMessage = balloonMessageProvider.GetCaptionAndMessageForBuildTransition(e.BuildTransition); string caption = string.Format("{0}: {1}", projectName, captionAndMessage.Caption); ShowBalloon(caption, captionAndMessage.Message, e.BuildTransition.ErrorLevel.NotifyInfo, 5000); }
private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e) { if (SpeechUtil.shouldSpeak(e.BuildTransition,speakBuildSucceded,speakBuildFailed)) { String projectName = e.ProjectMonitor.Detail.ProjectName; projectName = SpeechUtil.makeProjectNameMoreSpeechFriendly(projectName); CaptionAndMessage captionAndMessage = balloonMessageProvider.GetCaptionAndMessageForBuildTransition(e.BuildTransition); String message = string.Format(System.Globalization.CultureInfo.CurrentCulture,"The {0} project reports {1}", projectName, captionAndMessage.Message); SpeechSynthesizer speaker = new SpeechSynthesizer(); speaker.Speak(message); Trace.WriteLine("speaking: " + message); } }
private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e) { if (e.BuildTransition.ErrorLevel.NotifyInfo < this.configuration.MinimumNotificationLevel) return; string projectName = e.ProjectMonitor.Detail.ProjectName; CaptionAndMessage captionAndMessage = GetCaptionAndMessageForBuildTransition(e.BuildTransition); string caption = string.Format(System.Globalization.CultureInfo.CurrentCulture,"{0}: {1} ", projectName, captionAndMessage.Caption); Notification notification = new Notification(ApplicationName, caption, null, projectName, captionAndMessage.Message); growl.Notify(notification); }
private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e) { if (e.BuildTransition.ErrorLevel.NotifyInfo < minimumNotificationLevel) return; string projectName = e.ProjectMonitor.Detail.ProjectName; CaptionAndMessage captionAndMessage = balloonMessageProvider.GetCaptionAndMessageForBuildTransition(e.BuildTransition); string caption = string.Format("{0}: {1} ", projectName, captionAndMessage.Caption); trayIcon.ShowBalloonTip( 5000, caption, captionAndMessage.Message, e.BuildTransition.ErrorLevel.NotifyInfo); }
public void BuildOccuredIsFiredWheneverAnyContainedProjectStatusFiresIt() { buildOccurredCount = 0; lastBuildOccurredEventArgs = null; StubProjectMonitor stubProjectMonitor1 = new StubProjectMonitor("project1"); StubProjectMonitor stubProjectMonitor2 = new StubProjectMonitor("project2"); aggregator = new AggregatingProjectMonitor(stubProjectMonitor1, stubProjectMonitor2); aggregator.BuildOccurred += new MonitorBuildOccurredEventHandler(Aggregator_BuildOccurred); Assert.AreEqual(0, buildOccurredCount); stubProjectMonitor1.OnBuildOccurred(new MonitorBuildOccurredEventArgs(stubProjectMonitor1, BuildTransition.Fixed)); Assert.AreEqual(1, buildOccurredCount); Assert.AreSame(stubProjectMonitor1, lastBuildOccurredEventArgs.ProjectMonitor); Assert.AreEqual(BuildTransition.Fixed, lastBuildOccurredEventArgs.BuildTransition); }
public void OnBuildOccurred(MonitorBuildOccurredEventArgs args) { if (BuildOccurred != null) BuildOccurred(this, args); }
private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e) { Assert.Fail("Do not expect this method to actually get called as using mcoked synchronised invoke"); }
private void ProjectMonitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs args) { if (BuildOccurred != null) { var canInvoke = true; if (synchronizeInvoke is Control) canInvoke = !(synchronizeInvoke as Control).IsDisposed; if (canInvoke) synchronizeInvoke.BeginInvoke(BuildOccurred, new object[] { sender, args }); } }
private void Monitor_BuildOccurred(object sauce, MonitorBuildOccurredEventArgs e) { buildOccurredCount++; lastBuildOccurredArgs = e; }