コード例 #1
0
        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;
            }
        }
コード例 #2
0
 public void ShowMessageUntilReplaced(string Message)
 {
     if (!priorityMessage)
     {
         temporaryMessage = Message;
         Clock.RemoveAlarm(ref temporaryDisplayRevert);
         this.Invalidate();
     }
 }
コード例 #3
0
ファイル: Sleep.cs プロジェクト: usmanatron/quuxplayer
        public void Stop()
        {
            fading = false;

            if (nextTick != Clock.NULL_ALARM)
            {
                Clock.RemoveAlarm(ref nextTick);
            }
            Active = false;
        }
コード例 #4
0
 public void StartRefreshSubscriptionInfo()
 {
     if (Setting.PodcastDownloadSchedule != PodcastDownloadSchedule.Manual)
     {
         autoRefreshSubscriptions();
     }
     else if (updateTimer != Clock.NULL_ALARM)
     {
         Clock.RemoveAlarm(ref updateTimer);
     }
 }
コード例 #5
0
 private static void resetRestartAlarm()
 {
     if (directories.Count > 0)
     {
         Clock.Update(ref restartAlarm, Start, 3600000, false);
     }
     else
     {
         Clock.RemoveAlarm(ref restartAlarm);
     }
 }
コード例 #6
0
ファイル: Artwork.cs プロジェクト: usmanatron/quuxplayer
        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);
        }
コード例 #7
0
        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);
                    }
                }
            }
        }
コード例 #8
0
        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;
                    }
                }
            }
        }