Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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);
        }