Exemplo n.º 1
0
        private void EnableButtons(bool extract)
        {
            if (this.extractButton.InvokeRequired || this.cancelButton.InvokeRequired)
            {
                EnableButtonsDelegate callback = new EnableButtonsDelegate(EnableButtons);
                this.Invoke(callback, new object[] { extract });
                return;
            }

            this.extractButton.Enabled = extract ? true : false;
            this.cancelButton.Enabled  = extract ? false : true;
        }
		private void EnableButtons(bool extract)
		{
			if (this.extractButton.InvokeRequired || this.cancelButton.InvokeRequired)
			{
				EnableButtonsDelegate callback = new EnableButtonsDelegate(EnableButtons);
				this.Invoke(callback, new object[] { extract });
				return;
			}

			this.extractButton.Enabled = extract ? true : false;
			this.cancelButton.Enabled = extract ? false : true;
		}