Exemplo n.º 1
0
 public void SetPaused(bool paused)
 {
     if (pbArtwork.InvokeRequired ||
         lblStatus.InvokeRequired)
     {
         SetPausedDelegate d = new SetPausedDelegate(SetPaused);
         Invoke(d, new object[] { paused });
     }
     else
     {
         if (paused)
         {
             lblStatus.Text           = "Paused";
             lblUploadingMessage.Text = "Paused";
             SetSystemTrayIconText("Paused");
             pbPaused.Visible = true;
         }
         else
         {
             lblStatus.Text           = "Idle";
             lblUploadingMessage.Text = "Idle";
             SetSystemTrayIconText("Idle");
             pbPaused.Visible = false;
         }
     }
 }
Exemplo n.º 2
0
 public void SetPaused(bool paused)
 {
     if (pbArtwork.InvokeRequired ||
         lblStatus.InvokeRequired ||
         lblUploadingMessage.InvokeRequired ||
         pbPaused.InvokeRequired ||
         lblArtistMeta.InvokeRequired ||
         lblAlbumMeta.InvokeRequired ||
         lblTrackMeta.InvokeRequired)
     {
         var d = new SetPausedDelegate(SetPaused);
         Invoke(d, new object[] { paused });
     }
     else
     {
         if (paused)
         {
             Paused                   = true;
             lblStatus.Text           = "Paused";
             lblUploadingMessage.Text = "Paused";
             SetSystemTrayIconText("Paused");
             Requests.UploadCheckCache.Pause = true;
             pbPaused.Visible      = true;
             pbArtworkIdle.Visible = false;
             pbArtwork.Visible     = false;
             lblArtistMeta.Text    = string.Empty;
             lblAlbumMeta.Text     = string.Empty;
             lblTrackMeta.Text     = string.Empty;
         }
         else
         {
             Paused                   = false;
             lblStatus.Text           = "Idle";
             lblUploadingMessage.Text = "Idle";
             pbArtworkIdle.Visible    = true;
             pbPaused.Visible         = false;
             SetSystemTrayIconText("Idle");
             Requests.UploadCheckCache.Pause = false;
         }
     }
 }