Exemplo n.º 1
0
        private void UpdateAvailable(ProgramValidation.UpdateResultStruct versionInfo)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action(() =>
                {
                    this.UPDATE_AVAILABLE.Visible = true;
                    this.APP_NOTIFY_ICON.ShowBalloonTip(30000, "우윳빛깔 카페스탭", "새로운 프로그램 업데이트가 있습니다, 지금 업데이트 하는 것을 권장합니다.", ToolTipIcon.None);
                    this.CURRENT_PROGRESS_LABEL.Location = new Point(553, 13);
                    this.UPDATE_ICON_HIGHLIGHT_TIMER.Start( );

                    UpdateNotifyForm form = new UpdateNotifyForm(versionInfo);
                    form.Show(this);
                }));
            }
            else
            {
                this.UPDATE_AVAILABLE.Visible = true;
                this.APP_NOTIFY_ICON.ShowBalloonTip(30000, "우윳빛깔 카페스탭", "새로운 프로그램 업데이트가 있습니다, 지금 업데이트 하는 것을 권장합니다.", ToolTipIcon.None);
                this.CURRENT_PROGRESS_LABEL.Location = new Point(553, 13);
                this.UPDATE_ICON_HIGHLIGHT_TIMER.Start( );

                UpdateNotifyForm form = new UpdateNotifyForm(versionInfo);
                form.Show(this);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Occurs when a program update is available. Display the information form to the user.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void OnUpdateAvailable(object sender, UpdateAvailableEventArgs e)
        {
            // Notify the user and prompt him
            if (m_isShowingUpdateWindow)
                return;

            m_isShowingUpdateWindow = true;

            // New release of the same major version available
            if (!String.IsNullOrWhiteSpace(e.UpdateMessage))
            {
                using (UpdateNotifyForm form = new UpdateNotifyForm(e))
                {
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        m_isUpdating = true;

                        // Save the settings to make sure we don't lose anything
                        await Settings.SaveImmediateAsync();
                        Close();
                    }
                }
            }
            // new major version release
            else
            {
                string message = $"A new version ({e.NewestVersion}) is available at {NetworkConstants.EVEMonMainPage}." +
                                 $"{Environment.NewLine}{Environment.NewLine}" +
                                 $"Your current version is: {e.CurrentVersion}.";

                MessageBoxCustom.Show(this, message, @"EVEMon Update Available", "Ignore this upgrade",
                    icon: MessageBoxIcon.Information);

                if (MessageBoxCustom.CheckBoxChecked)
                    Settings.Updates.MostRecentDeniedMajorUpgrade = e.NewestVersion.ToString();
            }

            m_isShowingUpdateWindow = false;
            m_isUpdating = false;
        }
Exemplo n.º 3
0
        private void UPDATE_AVAILABLE_Click(object sender, EventArgs e)
        {
            UpdateNotifyForm form = new UpdateNotifyForm(GlobalVar.VERSION_INFO);

            form.Show(this);
        }