コード例 #1
0
 private void FireCallback(UpdateCheckerArgs e)
 {
     if (OnUpdateInfoReceived != null)
     {
         try { OnUpdateInfoReceived(this, e); }
         catch { }
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: TooheyPaneer/radegast
        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 { }
     }
 }