wyDay.Controls.AutomaticUpdaterBackend.Cancel C# (CSharp) Method

Cancel() public method

Cancel the checking, downloading, or extracting currently in progress.
public Cancel ( ) : void
return void
        public void Cancel()
        {
            if (AutoUpdaterInfo == null)
                throw new FailedToInitializeException();

            updateHelper.Cancel();

            SetLastSuccessfulStep();

            if (Cancelled != null)
                Cancelled(this, EventArgs.Empty);
        }

Usage Example

Example #1
0
        void auBackend_BeforeChecking(object sender, BeforeArgs e)
        {
            // disable any scheduled checking
            tmrWaitBeforeCheck.Enabled = false;

            SetMenuText(translation.CancelCheckingMenu);

            if (BeforeChecking != null)
            {
                BeforeChecking(this, e);
            }

            if (e.Cancel)
            {
                // close wyUpdate
                auBackend.Cancel();
                return;
            }

            // show the working animation
            SetUpdateStepOn(UpdateStepOn.Checking);
            UpdateProcessing(false);

            // setup the context menu
            CreateMenu(MenuType.CheckingMenu);
        }