Event data for a failed step.
Inheritance: System.EventArgs
Example #1
0
        void UpdateStepFailed(UpdateStepOn us, FailArgs args)
        {
            SetLastSuccessfulStep();

            switch (us)
            {
            case UpdateStepOn.Checking:

                if (CheckingFailed != null)
                {
                    CheckingFailed(this, args);
                }

                break;

            case UpdateStepOn.DownloadingUpdate:

                if (DownloadingFailed != null)
                {
                    DownloadingFailed(this, args);
                }

                break;

            case UpdateStepOn.ExtractingUpdate:

                if (ExtractingFailed != null)
                {
                    ExtractingFailed(this, args);
                }

                break;
            }
        }
Example #2
0
        public frmError(FailArgs failArgs, AUTranslation translation)
        {
            Font = SystemFonts.MessageBoxFont;

            InitializeComponent();

            // Don't show the extended error information textbox if there is no extended error info.
            if (!string.IsNullOrEmpty(failArgs.ErrorMessage))
            {
                richError.Text = failArgs.ErrorMessage;
            }
            else
            {
                richError.Visible = false;
            }

            Text                  = translation.ErrorTitle;
            btnOK.Text            = translation.CloseButton;
            btnTryAgainLater.Text = translation.TryAgainLater;
            lblTitle.Text         = failArgs.ErrorTitle;

            // resize the buttons to fit their contents
            btnTryAgainLater.Left = btnOK.Left - btnTryAgainLater.Width - 6;

            MinimumSize = new Size(richError.Left + Right - btnTryAgainLater.Left, 250);
        }
        /// <summary>
        /// Handler method that's called when <see cref="MainForm.AutomaticUpdater"/> reports an error checking for updates.
        /// </summary>
        /// <param name="sender">Object from which this event originated, <see cref="MainForm.AutomaticUpdater"/> in this case.</param>
        /// <param name="e">Arguments associated with this event.</param>
        private void AutomaticUpdater_CheckingFailed(object sender, FailArgs e)
        {
            _statusLabel.Text = "Error occurred while checking for updates.  Please try again later.";
            _progressBar.Style = ProgressBarStyle.Continuous;
            _progressBar.Value = 100;

            _okButton.Enabled = true;
        }
Example #4
0
        public frmError(FailArgs failArgs, AUTranslation translation)
        {
            Font = SystemFonts.MessageBoxFont;

            InitializeComponent();

            richError.Text = failArgs.ErrorMessage;

            Text                  = translation.ErrorTitle;
            btnOK.Text            = translation.CloseButton;
            btnTryAgainLater.Text = translation.TryAgainLater;
            lblTitle.Text         = failArgs.ErrorTitle;

            // resize the buttons to fit their contents
            btnTryAgainLater.Left = btnOK.Left - btnTryAgainLater.Width - 6;

            MinimumSize = new Size(richError.Left + Right - btnTryAgainLater.Left, 250);
        }
Example #5
0
        void auBackend_ExtractingFailed(object sender, FailArgs e)
        {
            // call this function from ownerForm's thread context
            if (sender != null)
            {
                ownerForm.Invoke(new FailHandler(auBackend_ExtractingFailed), new object[] { null, e });
                return;
            }

            UpdateStepFailed(e);

            Text = translation.FailedToExtract;

            if (DownloadingOrExtractingFailed != null)
            {
                DownloadingOrExtractingFailed(this, e);
            }
        }
Example #6
0
        public frmError(FailArgs failArgs, AUTranslation translation)
        {
            Font = SystemFonts.MessageBoxFont;

            InitializeComponent();

            richError.Text = failArgs.ErrorMessage;

            Text = translation.ErrorTitle;
            btnOK.Text = translation.CloseButton;
            btnTryAgainLater.Text = translation.TryAgainLater;
            lblTitle.Text = failArgs.ErrorTitle;

            // resize the buttons to fit their contents
            btnTryAgainLater.Left = btnOK.Left - btnTryAgainLater.Width - 6;

            MinimumSize = new Size(richError.Left + Right - btnTryAgainLater.Left, 250);
        }
Example #7
0
        public frmError(FailArgs failArgs, AUTranslation translation)
        {
            Font = SystemFonts.MessageBoxFont;

            InitializeComponent();

            // Don't show the extended error information textbox if there is no extended error info.
            if (!string.IsNullOrEmpty(failArgs.ErrorMessage))
                richError.Text = failArgs.ErrorMessage;
            else
                richError.Visible = false;

            Text = translation.ErrorTitle;
            btnOK.Text = translation.CloseButton;
            btnTryAgainLater.Text = translation.TryAgainLater;
            lblTitle.Text = failArgs.ErrorTitle;

            // resize the buttons to fit their contents
            btnTryAgainLater.Left = btnOK.Left - btnTryAgainLater.Width - 6;

            MinimumSize = new Size(richError.Left + Right - btnTryAgainLater.Left, 250);
        }
Example #8
0
        void auBackend_UpdateFailed(object sender, FailArgs e)
        {
            // call this function from ownerForm's thread context
            if (sender != null)
            {
                ownerForm.Invoke(new FailHandler(auBackend_UpdateFailed), new object[] { null, e });
                return;
            }

            // show the control
            Visible = !KeepHidden;

            failArgs = e;

            // show failed Text & icon
            Text = translation.UpdateFailed;
            CreateMenu(MenuType.Error);
            AnimateImage(BmpFailed, true);

            if (UpdateFailed != null)
            {
                UpdateFailed(this, e);
            }
        }
Example #9
0
        void UpdateStepFailed(FailArgs e)
        {
            if (e.wyUpdatePrematureExit)
            {
                e.ErrorTitle = translation.PrematureExitTitle;

                // use the general "premature exit" message only when there's no other message present
                if (e.ErrorMessage == null || e.ErrorMessage == AUTranslation.C_PrematureExitMessage)
                {
                    e.ErrorMessage = translation.PrematureExitMessage;
                }
            }

            failArgs = e;

            //only show the error if this is visible
            if (Visible)
            {
                CreateMenu(MenuType.Error);
                AnimateImage(BmpFailed, true);
            }

            SetMenuText(translation.CheckForUpdatesMenu);
        }
Example #10
0
 void OnDownloadingFailed(object sender, FailArgs e)
 {
     Console.WriteLine("download fail");
     UpdateDownloadErrorBox();
 }
Example #11
0
 private void Updater_CheckingFailed(object sender, FailArgs e)
 {
     Console.WriteLine("*****I FAILED******* " + e.ErrorMessage); // since we kept on getting an error message we added e.ErrorMessage to find out why
     UpdateCheckErrorBox();
 }
        void auBackend_UpdateFailed(object sender, FailArgs e)
        {
            // call this function from ownerForm's thread context
            if (sender != null)
            {
                ownerForm.Dispatcher.Invoke(DispatcherPriority.Normal, new FailHandler(auBackend_UpdateFailed), null, e);
                return;
            }

            // show the control
            Visibility = KeepHidden ? Visibility.Hidden : Visibility.Visible;

            failArgs = e;

            // show failed Text & icon
            Text = translation.UpdateFailed;
            CreateMenu(MenuType.Error);
            AnimateImage(Properties.Resources.cross, true);

            if (UpdateFailed != null)
                UpdateFailed(this, e);
        }
Example #13
0
 void OnExtractingFailed(object sender, FailArgs e)
 {
     Console.WriteLine("extract fail");
     UpdateExtractErrorBox();
 }
        void auBackend_ExtractingFailed(object sender, FailArgs e)
        {
            // call this function from ownerForm's thread context
            if (sender != null)
            {
                ownerForm.Dispatcher.Invoke(DispatcherPriority.Normal, new FailHandler(auBackend_ExtractingFailed), null, e);
                return;
            }

            UpdateStepFailed(e);

            Text = translation.FailedToExtract;

            if (DownloadingOrExtractingFailed != null)
                DownloadingOrExtractingFailed(this, e);
        }
Example #15
0
 void OnFailed(object sender, FailArgs e) //OnUpdateFailed
 {
     Console.WriteLine("fail");
     UpdateErrorBox();
 }
        void auBackend_CheckingFailed(object sender, FailArgs e)
        {
            // call this function from ownerForm's thread context
            if (sender != null)
            {
                ownerForm.Invoke(new FailHandler(auBackend_CheckingFailed), new object[] { null, e });
                return;
            }

            UpdateStepFailed(e);

            Text = translation.FailedToCheck;

            if (CheckingFailed != null)
                CheckingFailed(this, e);
        }
        void auBackend_UpdateFailed(object sender, FailArgs e)
        {
            if (sender != null)
            {
                // call this function from ownerForm's thread context
                InvokeMyself(new FailHandler(auBackend_UpdateFailed), new object[] {null, e});
                return;
            }

            // show the control
            Visible = !KeepHidden;

            failArgs = e;

            // show failed Text & icon
            Text = translation.UpdateFailed;
            CreateMenu(MenuType.Error);
            AnimateImage(BmpFailed, true);

            if (UpdateFailed != null)
                UpdateFailed(this, e);
        }
        void auBackend_ExtractingFailed(object sender, FailArgs e)
        {
            if (sender != null)
            {
                // call this function from ownerForm's thread context
                InvokeMyself(new FailHandler(auBackend_ExtractingFailed), new object[] {null, e});
                return;
            }

            UpdateStepFailed(e);

            Text = translation.FailedToExtract;

            if (DownloadingOrExtractingFailed != null)
                DownloadingOrExtractingFailed(this, e);
        }
Example #19
0
 private void automaticUpdater_DownloadingOrExtractingFailed(object sender, FailArgs e)
 {
     checkForUpdatesButtonItem.Text = automaticUpdater.Translation.CheckForUpdatesMenu;
 }
        void UpdateStepFailed(FailArgs e)
        {
            if (e.wyUpdatePrematureExit)
            {
                e.ErrorTitle = translation.PrematureExitTitle;

                // use the general "premature exit" message only when there's no other message present
                if (e.ErrorMessage == null || e.ErrorMessage == AUTranslation.C_PrematureExitMessage)
                    e.ErrorMessage = translation.PrematureExitMessage;
            }

            failArgs = e;

            //only show the error if this is visible
            if (Visibility == Visibility.Visible)
            {
                CreateMenu(MenuType.Error);
                AnimateImage(Properties.Resources.cross, true);
            }

            SetMenuText(translation.CheckForUpdatesMenu);
        }
        void UpdateStepFailed(UpdateStepOn us, FailArgs args)
        {
            SetLastSuccessfulStep();

            switch (us)
            {
                case UpdateStepOn.Checking:

                    if (CheckingFailed != null)
                        CheckingFailed(this, args);

                    break;
                case UpdateStepOn.DownloadingUpdate:

                    if (DownloadingFailed != null)
                        DownloadingFailed(this, args);

                    break;
                case UpdateStepOn.ExtractingUpdate:

                    if (ExtractingFailed != null)
                        ExtractingFailed(this, args);

                    break;
            }
        }
 static void auBackend_UpdateFailed(object sender, FailArgs e)
 {
     //TODO: Notify the admin, or however you want to handle the failure
     WriteToLog("Update failed. Reason\r\nTitle: " + e.ErrorTitle + "\r\nMessage: " + e.ErrorMessage, true);
 }