/// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void OnUpdateCheckFinished(object sender, UpdateCheckFinishedEventArgs e)
 {
     if (UpdateCheckFinished != null)
         UpdateCheckFinished(sender, e);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UpdateChecker_UpdateCheckFinished(object sender, UpdateCheckFinishedEventArgs e)
        {
            Version oVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;

            if ((e.CurrentVersion != null) && (oVersion.CompareTo(e.CurrentVersion) < 0))
            {
                // Update the status label.
                tssl_Info.Text = "New update available";

                // Show the update locations form.
                using (UpdateLocations oForm = new UpdateLocations(e.GetLocations()))
                    oForm.ShowDialog();
            }
            else
            {
                // Update the status label.
                tssl_Info.Text = "No updates found";

                if (m_bShowNoUpdatesFoundDialog)
                {
                    MessageBox.Show("There are currently no new updates available.", "Update Check",
                        MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }

            tssl_Info.Text = "Ready";
        }