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 < minimumNotificationLevel) { return; } string projectName = e.ProjectMonitor.Detail.ProjectName; CaptionAndMessage captionAndMessage = balloonMessageProvider.GetCaptionAndMessageForBuildTransition(e.BuildTransition); string caption = string.Format(System.Globalization.CultureInfo.CurrentCulture, "{0}: {1} ", projectName, captionAndMessage.Caption); trayIcon.ShowBalloonTip( 5000, caption, captionAndMessage.Message, e.BuildTransition.ErrorLevel.NotifyInfo); }