コード例 #1
0
 protected void OnBuildOccurred(MonitorBuildOccurredEventArgs args)
 {
     if (BuildOccurred != null)
     {
         BuildOccurred(this, args);
     }
 }
コード例 #2
0
 private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e)
 {
     if (BuildOccurred != null)
     {
         BuildOccurred(this, e);
     }
 }
コード例 #3
0
 private void ProjectMonitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs args)
 {
     if (BuildOccurred != null)
     {
         synchronizeInvoke.BeginInvoke(BuildOccurred, new object[] {sender, args});
     }
 }
コード例 #4
0
        private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e)
        {
            string soundFileToPlay = ChooseSoundFile(e.BuildTransition);

            if (soundFileToPlay == null || soundFileToPlay.Length == 0)
                return;

            audioPlayer.Play(soundFileToPlay);
        }
コード例 #5
0
ファイル: TrayIcon.cs プロジェクト: vardars/ci-factory
        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);
        }
コード例 #6
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);
			}
		}
コード例 #7
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, caption, null, projectName, captionAndMessage.Message);
			growl.Notify(notification);
		}
コード例 #8
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("{0}: {1} ",
                                           projectName, captionAndMessage.Caption);

            trayIcon.ShowBalloonTip(
                5000,
                caption,
                captionAndMessage.Message,
                e.BuildTransition.ErrorLevel.NotifyInfo);
        }
コード例 #9
0
		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);
		}
コード例 #10
0
		public void OnBuildOccurred(MonitorBuildOccurredEventArgs args)
		{
			if (BuildOccurred != null)
				BuildOccurred(this, args);
		}
コード例 #11
0
		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 });
            }
		}
コード例 #13
0
 private void Monitor_BuildOccurred(object sender, MonitorBuildOccurredEventArgs e)
 {
     if (BuildOccurred != null)
     {
         BuildOccurred(this, e);
     }
 }
コード例 #14
0
		private void Monitor_BuildOccurred(object sauce, MonitorBuildOccurredEventArgs e)
		{
			buildOccurredCount++;
			lastBuildOccurredArgs = e;
		}