private void ProjectMonitor_Polled(object sender, MonitorPolledEventArgs args)
 {
     if (Polled != null)
     {
         synchronizeInvoke.BeginInvoke(Polled, new object[] {sender, args});
     }
 }
 private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
 {
     if (Polled != null)
     {
         Polled(this, args);
     }
 }
示例#3
0
 protected void OnPolled(MonitorPolledEventArgs args)
 {
     if (Polled != null)
     {
         Polled(this, args);
     }
 }
		private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
		{
			Debug.WriteLine("X10Controller.Monitor_Polled");
			try
			{
				if (!IsInsideLampSwitchingHours)
				{
					SetRedYellowGreenLamps(false,false,false);
                    return;
				}

				ProjectState state = monitor.ProjectState;
				IntegrationStatus status = ((IProjectMonitor)sender).IntegrationStatus;

				if (state.Equals(ProjectState.NotConnected) || status.Equals(IntegrationStatus.Unknown)) {
	             	SetRedYellowGreenLamps(false, false, false);
                 }
                 else {
					bool red = status.Equals(IntegrationStatus.Exception) ||
						       status.Equals(IntegrationStatus.Failure) ||
							   state.Equals(ProjectState.Broken) || 
							   state.Equals(ProjectState.BrokenAndBuilding);
					bool yellow = state.Equals(ProjectState.Building) || 
					              state.Equals(ProjectState.BrokenAndBuilding);
					bool green = (status.Equals(IntegrationStatus.Success) &&
								(state.Equals(ProjectState.Success) || (state.Equals(ProjectState.Building))));
	
  					SetRedYellowGreenLamps(red,yellow,green);
                 }
			}
			catch (ApplicationException ex)
			{
				Trace.WriteLine("Failed to update X10 device status: " + ex);
			}
		}
		void _Monitor_Polled(object sender, MonitorPolledEventArgs args) {
			var monitor = sender as IProjectMonitor;
			if (null == monitor)
				return;

			var pins = _Map[monitor.ProjectState](_Configuration);
			_Mapper.EnablePins(pins);
		}
		private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
		{
			if (lastStatus != monitor.SummaryStatusString)
			{
				lastStatus = monitor.SummaryStatusString;
				Notification notification = new Notification(ApplicationName, "Message", null, "CCTray", monitor.SummaryStatusString);
				growl.Notify(notification);
			}
		}
		private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
		{
            var message = monitor.SummaryStatusString;
            if (message.Length > 63)
            {
                message = message.Substring(0, 60) + "...";
            }

            trayIcon.Text = message;
            Debug.WriteLine("Tray message: " + trayIcon.Text);
		}
		private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
		{
			String projectName = args.ProjectMonitor.Detail.ProjectName;
			projectName = SpeechUtil.makeProjectNameMoreSpeechFriendly(projectName);

			ProjectState currentState = (ProjectState)projectStates[projectName];
			ProjectState newState = args.ProjectMonitor.Detail.ProjectState;
			
			if (currentState == null) {
				projectStates.Add(projectName,newState);
			} else if (!currentState.Name.Equals(newState.Name)) {
				projectStates[projectName] = newState;
				if (newState == ProjectState.Building ||
				    newState == ProjectState.BrokenAndBuilding) {
					String message = string.Format(System.Globalization.CultureInfo.CurrentCulture,"The {0} project has started building", projectName);
                    SpeechSynthesizer speaker = new SpeechSynthesizer();
                    speaker.Speak(message);
                    Trace.WriteLine("speaking: " + message);
				}
			}
		}
		private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
		{
			Status = monitor.ProjectState;
		}
		private void Aggregator_Polled(object source, MonitorPolledEventArgs args)
		{
			pollCount++;
			lastPolledSource = source;
			lastPolledArgs = args;
		}
		private void Monitor_Polled( object sender, MonitorPolledEventArgs args )
		{
			UpdateIcon();
		}
 private void Monitor_Polled(object sauce, MonitorPolledEventArgs args)
 {
     DisplayProjectStateInListViewItem(args.ProjectMonitor);
 }
示例#13
0
 // Updates the buttons of CCTray, after each poll
 private void mon_Polled(object sender, MonitorPolledEventArgs args)
 {
     UpdateForceAbortBuildButtonLabel();
     UpdateStartStopProjectButtonLabel();
 }
示例#14
0
 protected void OnPolled(MonitorPolledEventArgs args)
 {
     if (Polled != null)
         Polled(this, args);
 }
		public void OnPolled(MonitorPolledEventArgs args)
		{
			if (Polled != null)
				Polled(this, args);
		}
		private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
		{
			Assert.Fail("Do not expect this method to actually get called as using mcoked synchronised invoke");
		}
		private void Monitor_Polled(object sauce, MonitorPolledEventArgs args)
		{
			pollCount++;
		}
示例#18
0
 private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
 {
     Text = monitor.SummaryStatusString;
     Debug.WriteLine("Tray message: " + Text);
 }
		private void ProjectMonitor_Polled(object sender, MonitorPolledEventArgs args)
		{
            if (Polled != null)
            {
                var canInvoke = true;
                if (synchronizeInvoke is Control) canInvoke = !(synchronizeInvoke as Control).IsDisposed;

                if (canInvoke) synchronizeInvoke.BeginInvoke(Polled, new object[] { sender, args });
            }
		}
示例#20
0
        void projMon_Polled(object sender, MonitorPolledEventArgs args)
        {
            IProjectMonitor projMon = args.ProjectMonitor;
            if ((projMon.ProjectState != ProjectState.Success &&
                projMon.ProjectState != ProjectState.NotConnected &&
                projMon.ProjectState != ProjectState.Building) ||
                projMon.ProjectState == ProjectState.BrokenAndBuilding)
            {
                ListViewItem item = m_viewMgr.MainForm.MainFormController.CopyBoundProject(projMon);
                m_viewMgr.m_broken.AddProject(item);
                if (m_viewMgr.TabControl.TabPages.Contains(m_viewMgr.m_broken.TabPage) == false)
                    m_viewMgr.TabControl.TabPages.Add(m_viewMgr.m_broken.TabPage);

            }
            else
            {
                foreach (ListViewItem srclvi in m_viewMgr.m_broken.ListView.Items)
                {
                    if (srclvi != null && srclvi.Tag == projMon)
                        m_viewMgr.m_broken.ListView.Items.Remove(srclvi);
                }

                if (m_viewMgr.m_broken.ListView.Items.Count == 0)
                {
                    m_viewMgr.TabControl.TabPages.Remove(m_viewMgr.m_broken.TabPage);
                }
            }
        }
 private void Monitor_Polled(object sender, MonitorPolledEventArgs args)
 {
     if (Polled != null)
     {
         Polled(this, args);
     }
 }