예제 #1
0
 private void FireCallback(UpdateCheckerArgs e)
 {
     if (OnUpdateInfoReceived != null)
     {
         try { OnUpdateInfoReceived(this, e); }
         catch { }
     }
 }
예제 #2
0
        void OnUpdateInfoReceived(object sender, UpdateCheckerArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(() => OnUpdateInfoReceived(sender, e)));
                return;
            }

            if (!e.Success)
            {
                if (ManualUpdateCheck)
                    tabsConsole.DisplayNotificationInChat("Error: Failed connecting to the update site.", ChatBufferTextStyle.StatusBlue);
            }
            else
            {
                if (!ManualUpdateCheck && e.Info.DisplayMOTD)
                {
                    tabsConsole.DisplayNotificationInChat(e.Info.MOTD, ChatBufferTextStyle.StatusBlue);
                }

                if (e.Info.UpdateAvailable)
                {
                    tabsConsole.DisplayNotificationInChat("New version available at " + e.Info.DownloadSite, ChatBufferTextStyle.Alert);
                }
                else
                {
                    if (ManualUpdateCheck)
                        tabsConsole.DisplayNotificationInChat("Your version is up to date.", ChatBufferTextStyle.StatusBlue);
                }
            }

            updateChecker.Dispose();
            updateChecker = null;
        }
예제 #3
0
 private void FireCallback(UpdateCheckerArgs e)
 {
     if (OnUpdateInfoReceived != null)
     {
         try { OnUpdateInfoReceived(this, e); }
         catch { }
     }
 }