/// <summary> /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class. /// </summary> public AsyncDialogForm(string formCaption, IExecutorService executorService, int minimum, int maximum, AsyncWaitCallback callback, AsyncWaitCallback finishedCallback, AsyncWaitCallback abortCallback) { InitializeComponent(); SetTagProperty(); this.ResolveResources(); _elapsedTimer = AsyncProgressTimerFactory.Create(); _executorService = executorService; _actualCallback = new WaitCallback(this.ExecAsync); _updateStatus = new UpdateAsyncStatusHandler(this.UpdateStatus); _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress); _enableButton = new EnableButtonHandler(this.EnableOKButton); this.InitializeProgress(minimum, maximum); btnCancel.Enabled = (_executorService != null); if (_executorService != null) { IExecutorService2 executor2 = _executorService as IExecutorService2; if (executor2 != null) { executor2.Reset(); } } this.Text = formCaption; lblStatus.Text = formCaption; this.Initialize(callback, finishedCallback, abortCallback, this); }
/// <summary> /// Initializes a new instance of the <see cref="AxAsyncProgress"/> class. /// </summary> public AxWpfAsyncProgress() { _actualCallback = new WaitCallback(this.ExecAsync); _updateStatus = new UpdateAsyncStatusHandler(this.UpdateStatus); _updateStatusProgress = new UpdateAsyncStatusProgressHandler(this.UpdateStatusProgress); _enableButton = new EnableButtonHandler(this.EnableOKButton); InitializeComponent(); }
private void enableButton() { if (bCreateEntries.InvokeRequired) { EnableButtonHandler b = new EnableButtonHandler(enableButton); this.Invoke(b, null); } else { bClearList.Enabled = true; bSelectAll.Enabled = true; bCreateEntries.Enabled = true; bCreateEntries.Text = "Create Registry entries"; } }