Пример #1
0
 public GrowlMessages()
 {
     BrokenBuildMessage          = new CaptionAndMessage("Broken build", "Recent checkins have broken the build");
     FixedBuildMessage           = new CaptionAndMessage("Fixed build", "Recent checkins have fixed the build");
     StillFailingBuildMessage    = new CaptionAndMessage("Build still failing", "The build is still broken...");
     StillSuccessfulBuildMessage = new CaptionAndMessage("Build successful", "Yet another successful build!");
 }
Пример #2
0
		public BalloonMessages()
		{
				BrokenBuildMessage = new CaptionAndMessage("Broken build", "Recent checkins have broken the build");
				FixedBuildMessage = new CaptionAndMessage("Fixed build", "Recent checkins have fixed the build");
				StillFailingBuildMessage = new CaptionAndMessage("Build still failing", "The build is still broken...");
				StillSuccessfulBuildMessage = new CaptionAndMessage("Build successful", "Yet another successful build!");
		}
Пример #3
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);
        }
Пример #4
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);
            }
        }
Пример #5
0
        public void ShowBallowTip(ICollection <Project> interestingProjects)
        {
            foreach (Project project in interestingProjects)
            {
                try
                {
                    CaptionAndMessage info = project.Activity.ActivityDetails;

                    //  Need a queue so no events are skipped
                    notifyIcon.ShowBalloonTip(BALLOON_TOOLTIP_TIMEOUT, info.Caption, info.Message, info.Icon);
                }
                catch (Exception ex)
                {
                    LoggingHelper.LogError(logger, ex);
                }
            }
        }
Пример #6
0
        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, captionAndMessage.Caption, null, projectName, captionAndMessage.Message);

            growl.Notify(notification);
        }
Пример #7
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);
        }