Example #1
0
 private void llblUpdateAvailable_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (updateChecker != null && updateChecker.Status == UpdateStatus.UpdateAvailable)
     {
         updateChecker.DownloadUpdate();
     }
 }
Example #2
0
        public static DialogResult Start(UpdateChecker updateChecker, bool activateWindow = true)
        {
            DialogResult result = DialogResult.None;

            if (updateChecker != null && updateChecker.Status == UpdateStatus.UpdateAvailable)
            {
                IsOpen = true;

                try
                {
                    using (UpdateMessageBox messageBox = new UpdateMessageBox(activateWindow, updateChecker))
                    {
                        result = messageBox.ShowDialog();
                    }

                    if (result == DialogResult.Yes)
                    {
                        updateChecker.DownloadUpdate();
                    }
                }
                finally
                {
                    IsOpen = false;
                }
            }

            return(result);
        }
Example #3
0
        public static DialogResult Start(UpdateChecker updateChecker, bool activateWindow = true)
        {
            DialogResult result = DialogResult.None;

            if (updateChecker != null && updateChecker.Status == UpdateStatus.UpdateAvailable)
            {
                IsOpen = true;

                try
                {
                    using (UpdateMessageBox messageBox = new UpdateMessageBox(activateWindow, updateChecker.IsPortable))
                    {
                        result = messageBox.ShowDialog();
                    }

                    if (result == DialogResult.Yes)
                    {
                        updateChecker.DownloadUpdate();
                    }
                }
                finally
                {
                    IsOpen = false;
                }
            }

            return result;
        }