//private bool _isListening = true; /// <summary> /// Initializes a new instance of the <see cref="ThreadInvoker"/> class. /// </summary> /// <param name="ownerForm">The owner form.</param> public ThreadInvoker(Form ownerForm, IExecutorService executorService, int sleepInterval) { this.OwnerForm = ownerForm; this.ExecutorService = executorService; this.SleepInterval = sleepInterval; _actualCallback = new WaitCallback(this.ExecAsync); _updateStatus = new UpdateAsyncStatusObjectHandler(this.UpdateStatusObject); }
/// <summary> /// Initializes the specified callback. /// </summary> /// <param name="callback">The callback.</param> /// <param name="finishedCallback">The finished callback.</param> /// <param name="abortCallback">The abort callback.</param> /// <param name="ownerForm">The owner form.</param> /// <param name="parentForm">The parent form.</param> public void Initialize(AsyncWaitCallback callback, AsyncWaitCallback finishedCallback, AsyncWaitCallback abortCallback, UpdateAsyncStatusObjectHandler updateStatus) { _callback = callback; _finishedCallback = finishedCallback; _abortCallback = abortCallback; _updateStatusUser = updateStatus; }