public ColorChanger(Node parent = null) { //smartshifting = true; if (parent != null) this.parent = parent; colormode = ColorMode.hueShifter; inc = 1; phaseSpeed = 10; phasePercent = 100; schedulerModerated = false; msInterval = 20; useMsInterval = false; appt = new Appointment(managedUpdate, msInterval, infinite: true); }
public static int Compare(Appointment a1, Appointment a2) { if (a1.scheduledTime < a2.scheduledTime) return -1; if (a1.scheduledTime > a2.scheduledTime) return 1; return 0; }
public void RemoveAppointment(Appointment app) { //if (!appointments.Contains(app)) return; appointments.Remove(app); //appointments.OrderBy(a => a.scheduledTime); }
public void doEveryXMilliseconds(Action<Node> action, int X, bool playSound = false) { if (playSound) start.Play(); Action<Node> a = delegate(Node n) { action(n); }; Appointment appt = new Appointment(a, X, infinite: true, playSound: playSound); AddAppointment(appt); }
public void AddAppointment(Appointment app) { app.SetTimer(); appointments.Add(app); SortAppointments(); }