예제 #1
0
        void DownloadCompleted(bool cancelled)
        {
            client.Dispose();
            client = null;

            if (cancelled)
            {
                try
                {
                    OnDownloadCancelled?.Invoke(this, EventArgs.Empty);
                }
                catch { }
                return;
            }

            setting.SendLog(string.Format("{0}", I18N("DownloadCompleted")));
            if (UpdateCore())
            {
                try
                {
                    OnDownloadCompleted?.Invoke(this, EventArgs.Empty);
                }
                catch { }
            }
            else
            {
                try
                {
                    OnDownloadFail?.Invoke(this, EventArgs.Empty);
                }
                catch { }
            }
        }
예제 #2
0
 void NotifyDownloadResults(bool status)
 {
     try
     {
         if (status)
         {
             OnDownloadCompleted?.Invoke(this, EventArgs.Empty);
         }
         else
         {
             OnDownloadFail?.Invoke(this, EventArgs.Empty);
         }
     }
     catch { }
 }