示例#1
0
        private UpdateAvailableDialog(Appcast appcast)
        {
            ReleaseNotesLink = appcast.ReleaseNotesLink;
            NewVersion       = appcast.Version;

            DataContext = this;
            InitializeComponent();

            if (GuiController.AppIcon != null)
            {
                ImageSource imSource = GuiController.ToImageSource(GuiController.AppIcon);
                Icon            = imSource;
                GuiImage.Source = imSource;
            }

            if (!string.IsNullOrEmpty(ReleaseNotesLink))
            {
                try
                {
                    GuiWebBrowser.Source = new Uri(ReleaseNotesLink);
                }
                catch (Exception)
                {
                    // ignore errors
                }
            }
            else
            {
                GuiWebBrowser.Visibility = Visibility.Collapsed;
            }
        }
示例#2
0
 public static void ShowWindow(Appcast appcast)
 {
     Application.Current.Dispatcher.Invoke(() =>
     {
         _currentWindow       = new UpdateAvailableDialog(appcast);
         _currentWindow.Owner = Application.Current.MainWindow;
         _currentWindow.Show();
     });
 }
示例#3
0
 private static void Updater_NewUpdateAvailable(Appcast appcast)
 {
     UpdateAvailableDialog.ShowWindow(appcast);
 }
示例#4
0
 static void Updater_AppcastDownloadFinished(Appcast appcast)
 {
     HideWindows();
 }