public void Project_OnPolled(object sauce, PolledEventArgs e) { // HandleBalloonNotification("Polled", e.ProjectStatus.LastBuildLabel.ToString(), new NotifyInfoFlags()); bool success = false; bool failure = false; foreach (Project p in settings.Projects) { if (p.ProjectStatus.BuildStatus.Equals(BuildStatus.Successful)) { success = true; } if (p.ProjectStatus.BuildStatus.Equals(BuildStatus.Failed)) { failure = true; break; } } if (failure) { trayIcon.Text = "At least one build failed"; trayIcon.Icon = GetStatusIcon(BuildStatus.Failed); } else if (success) { trayIcon.Text = "All builds succeeded."; trayIcon.Icon = GetStatusIcon(BuildStatus.Successful); } else { trayIcon.Text = "No Connection"; trayIcon.Icon = GetStatusIcon(BuildStatus.Idle); } }
public void ProjectPolled(object source, PolledEventArgs args) { bool onefailed = false; bool onesucceeded = false; //NotificationFactory.ShowMessageNotification //("Header", "Body", NotificationType.Info, new TimerEndedHandler (TimerEnded)); /* * NotificationBubble b = new NotificationBubble ("http://www.gnome.org", NotificationSource.Url, NotificationContent.Html); * b.TimeOut = 10000; * b.TimerEndedEvent += TimerEnded; * b.BubbleWidth = 600; * b.BubbleHeight = 80; * b.Move (5, 30); * b.RenderWithTimer (); * b.ShowAll (); */ foreach (Project proj in this.projects) { if (proj.ProjectStatus.BuildStatus == BuildStatus.Success) { onesucceeded = true; } if (proj.ProjectStatus.BuildStatus == BuildStatus.Failure) { onefailed = true; } if (onefailed) { //image = new Gtk.Image(new Gdk.Pixbuf(null, "red-24.png")); pixbuf = new Gdk.Pixbuf(null, "red-24.png"); image.Pixbuf = pixbuf; image.ShowNow(); return; } else if (onesucceeded) { pixbuf = new Gdk.Pixbuf(null, "green-24.png"); image.Pixbuf = pixbuf; image.ShowNow(); return; } else { pixbuf = new Gdk.Pixbuf(null, "gray-24.png"); image.Pixbuf = pixbuf; image.ShowNow(); Console.WriteLine("gray"); } } }
private void justPolled(object sauce, PolledEventArgs e) { Console.Write("."); }
private void project_OnPolled(object sauce, PolledEventArgs e) { Console.WriteLine(e.ProjectStatus.BuildStatusUrl); }
private void Project_OnPolled(object sauce, PolledEventArgs e) { UpdateProjectList(); }
private void ProjectPolled(object source, PolledEventArgs args) { UpdateProjectList(); }