Пример #1
0
        protected virtual void OnUpdateInfoAvailable(UpdateInfoArgs e)
        {
            var handler = UpdateInfoAvailable;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        private void updateChecker_UpdateInfoAvailable(object sender, UpdateInfoArgs e)
        {
            var currentVersion = Assembly.GetEntryAssembly().GetName().Version;

            if (e.Version > currentVersion)
            {
                _updateNotificationShown = true;
                notificationPanel.ShowNotification(new NotificationPanelEntry {
                    Text = string.Format("A new version {0} of {1} is available at {2}",
                                         e.Version,
                                         Assembly.GetEntryAssembly().GetName().Name,
                                         e.Url),
                    Icon = NotificationPanelIcon.Info,
                });
            }
        }