Ejemplo n.º 1
0
        private void _OnApplicationUpdateFailed(object sender, ApplicationUpdateFailedEventArgs e)
        {
            Assert.IsNotNull(e);

            var websiteLink = new Hyperlink(new Run("website"));

            websiteLink.Click += (sender2, e2) => Process.Start(new ProcessStartInfo(FacebookClientApplication.Current2.SupportWebsite.OriginalString));

            if (e.WasUpdateDetected)
            {
                _ShowGoldBar(false, new Inline[]
                {
                    new Run("An update to Fishbowl was unable to install successfully.  To complete the update please visit the "),
                    websiteLink,
                    new Run(" and run setup manually."),
                });
            }
            else
            {
                _ShowGoldBar(false, new Inline[]
                {
                    new Run("Fishbowl was unable to check for updates.  To check on whether there's a new version please visit the "),
                    websiteLink,
                    new Run("."),
                });
            }
        }
Ejemplo n.º 2
0
        private static void _NotifyUpdateFailure(ApplicationUpdateFailedEventArgs args)
        {
            // If we failed an update don't try again.
            // Wait until the user restarts the application.
            if (_updateTimer != null)
            {
                _updateTimer.Stop();
                _updateTimer = null;
            }

            _isUpdating = false;

            var handler = ApplicationUpdateFailed;

            if (handler != null)
            {
                Application.Current.Dispatcher.BeginInvoke(handler, Application.Current, args);
            }
        }