public void CopyAsync(ICopyFilesDiag diag) { digWindow = diag; if (digWindow != null && digWindow.SynchronizationObject == null) { throw new Exception("Dialog window sent with no SynchronizationObject"); } delCopy = new DEL_CopyFiles(Copyfiles); CopyResult = delCopy.BeginInvoke(CopyfilesCallback, null); }
private void ShowDiag(ICopyFilesDiag diag) { //Check to see if there is a dialog window to use if (digWindow != null) { //Are we going to send the update on the correct thread? if (digWindow.SynchronizationObject != null && digWindow.SynchronizationObject.InvokeRequired) { digWindow.SynchronizationObject.Invoke(new DEL_ShowDiag(ShowDiag), new Object[] { diag }); } else { diag.Show(); } } }