private void update_OnCheckUpdateStop(UpdateManager sender, string message)
 {
     if (picUpdateCheck.InvokeRequired)
     {
         var d = new UpdateEventHandler(update_OnCheckUpdateStop);
         Invoke(d, new object[] { sender, message });
     }
     else
     {
         picUpdateCheck.Image = Resources.feed_green;
         UpdateEventMessage(message);
     }
 }
 private void update_OnDownloadStart(UpdateManager sender, string message)
 {
     if (picDownload.InvokeRequired)
     {
         var d = new UpdateEventHandler(update_OnDownloadStart);
         Invoke(d, new object[] { sender, message });
     }
     else
     {
         downloadRefreshTimer.Enabled = true;
         picDownload.Image = Resources.download_orange;
         UpdateEventMessage(message);
     }
 }
        private void update_OnUpdateProcessStop(UpdateManager sender, string message)
        {
            if (btnCheckUpdate.InvokeRequired)
            {
                var d = new UpdateEventHandler(update_OnUpdateProcessStop);
                Invoke(d, new object[] { sender, message });
            }
            else
            {
                UpdateInProgress = false;
                UpdateEventMessage(message);

                switch (Settings.XbmcAutostart)
                {
                    //Always
                    case 1:
                        {
                            _logger.Info("XBMC is set to always autostart");
                            XbmcManager.StartXbmc();
                            ShutDown();
                            break;
                        }

                    //Only if closed
                    case 2:
                        {
                            _logger.Info("XBMC is set to auto start only if it was closed.");
                            if (XbmcManager.XbmcTerminated)
                            {
                                _logger.Info("XBMC was terminated during this session");
                                XbmcManager.StartXbmc();
                                ShutDown();
                            }
                            break;
                        }
                }

                if (SilentUpdate)
                {
                    ShutDown();
                }
            }
        }
 private void update_OnUpdateProcessStart(UpdateManager sender, string message)
 {
     if (btnCheckUpdate.InvokeRequired)
     {
         var d = new UpdateEventHandler(update_OnUpdateProcessStart);
         Invoke(d, new object[] { sender, message });
     }
     else
     {
         UpdateInProgress = true;
         UpdateEventMessage(message);
     }
 }
        private void update_OnUpdateError(UpdateManager sender, string message)
        {
            if (picUpdateCheck.InvokeRequired)
            {
                var d = new UpdateEventHandler(update_OnUpdateError);
                Invoke(d, new object[] { sender, message });
            }
            else
            {
                UpdateEventMessage(message);
                UpdateInProgress = false;

                if (SilentUpdate)
                {
                    ShutDown();
                }
            }
        }
 private void update_OnUnZipStart(UpdateManager sender, string message)
 {
     if (picUnzip.InvokeRequired)
     {
         var d = new UpdateEventHandler(update_OnUnZipStart);
         Invoke(d, new object[] { sender, message });
     }
     else
     {
         picUnzip.Image = Resources.unzip_orange;
         UpdateEventMessage(message);
     }
 }