Пример #1
0
        /// <summary>
        /// Re-download the latest version.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void Button_Update_Click(object sender, RoutedEventArgs e)
        {
            Tool.Update update  = new Tool.Update();
            bool        success = await update.RetrieveAsync();

            if (!success)
            {
                MessageBox.Show(Lang.NO_NEW_VERSION);
                this.Close();

                return;
            }

            (new Updater(update.Release, update.Changelog)).ShowDialog();
        }
Пример #2
0
        /// <summary>
        /// Check if there is an update.
        /// Open the Updater window if there is.
        /// </summary>
        /// <param name="notify"></param>
        private async void CheckForUpdate()
        {
            Tool.Update update  = new Tool.Update();
            bool        success = await update.RetrieveAsync();

            if (!success)
            {
                this.NoNewVersion();

                return;
            }

            (new Updater(update.Release, update.Changelog)).ShowDialog();

            this.Collection.Blackout(true);
            (new Updater(update.Release, update.Changelog)).ShowDialog();
            this.Collection.Blackout(false);
        }