AppUpdater.AutoUpdater.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
        public void Start()
        {
            if (thread == null || !thread.IsAlive)
            {
                log.Debug("Starting the AutoUpdater.");
                thread = new Thread(CheckForUpdates);
                thread.IsBackground = true;
                thread.Start();
            }
        }

Usage Example

Example #1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            autoUpdater = new AutoUpdater(UpdateManager.Default);
            autoUpdater.SecondsBetweenChecks = 10;
            autoUpdater.Updated += new EventHandler(autoUpdater_Updated);
            autoUpdater.Start();

            btnStart.Enabled = false;
            btnStop.Enabled = true;
            btnUpdate.Enabled = false;
        }