private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { TaskEnd.PerformClick(); allDone.Close(); allDone.Dispose(); soc.Close(); soc.Dispose(); }
private void OnTaskEnd(ITask task, TaskState endState, Exception workerError) { try { OnWorkerError(workerError); } catch (Exception) { // ignore exceptions during event handling } task.UpdateState(endState); TaskEnd?.Invoke(this, new TaskEventArgs(task, endState)); }
public virtual StatusCode OnEnd() { TaskEnd?.Invoke(this, new EventArgs()); return(StatusCode.SUCCEED_STATUS); }