private void updateNextRefreshCallback() { switch (Setting.PodcastDownloadSchedule) { case PodcastDownloadSchedule.Manual: case PodcastDownloadSchedule.EveryTime: if (updateTimer != Clock.NULL_ALARM) { Clock.RemoveAlarm(ref updateTimer); } break; case PodcastDownloadSchedule.FifteenMinutes: Clock.Update(ref updateTimer, autoRefreshSubscriptions, 1000 * 60 * 15, true); break; case PodcastDownloadSchedule.HalfHour: Clock.Update(ref updateTimer, autoRefreshSubscriptions, 1000 * 60 * 30, true); break; case PodcastDownloadSchedule.Hourly: Clock.Update(ref updateTimer, autoRefreshSubscriptions, 1000 * 60 * 60, true); break; } }
public void ShowMessageUntilReplaced(string Message) { if (!priorityMessage) { temporaryMessage = Message; Clock.RemoveAlarm(ref temporaryDisplayRevert); this.Invalidate(); } }
public void Stop() { fading = false; if (nextTick != Clock.NULL_ALARM) { Clock.RemoveAlarm(ref nextTick); } Active = false; }
public void StartRefreshSubscriptionInfo() { if (Setting.PodcastDownloadSchedule != PodcastDownloadSchedule.Manual) { autoRefreshSubscriptions(); } else if (updateTimer != Clock.NULL_ALARM) { Clock.RemoveAlarm(ref updateTimer); } }
private static void resetRestartAlarm() { if (directories.Count > 0) { Clock.Update(ref restartAlarm, Start, 3600000, false); } else { Clock.RemoveAlarm(ref restartAlarm); } }
private void promoteCandidatePreload() { currentTrack = trackCandidate; if (candidatePromote != Clock.NULL_ALARM) { Clock.RemoveAlarm(ref candidatePromote); } if (temporaryCandidatePromote != Clock.NULL_ALARM) { Clock.RemoveAlarm(ref temporaryCandidatePromote); } temporaryTrack = null; TemporaryImage = null; candidatePromote = Clock.DoOnMainThread(promoteCandidate, 200); }
protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); Clock.RemoveAlarm(ref volChangeTimer); mouseDown = false; if (dragging) { dragging = false; } else { if (exitRect.Contains(e.Location)) { exit(); } else if (backRect.Contains(e.Location)) { back(); } else if (playPauseRect.Contains(e.Location)) { playPause(); } else if (nextRect.Contains(e.Location)) { next(); } else if (muteRect.Contains(e.Location)) { mute(); } else if (e.Location.X > timeRect.X) { if (!this.radio) { Clock.Update(ref showInfoTimer, showInfo, 300, false); } } } }
protected override void OnMouseDoubleClick(MouseEventArgs e) { Clock.RemoveAlarm(ref showInfoTimer); base.OnMouseDoubleClick(e); if (!volDownRect.Contains(e.Location) && !volUpRect.Contains(e.Location)) { Point p = BottomRightDock; if (this.Location != p) { this.Location = p; OnMouseLeave(EventArgs.Empty); if (this.Bounds.Contains(this.PointToScreen(e.Location))) { this.Opacity = OPAQUE; } } } }