Optionally show the sync window, or just show a tooltip in Windows tray, kind of background operation.
need to do further decoupling business codes from UI codes, for this one and #32.
void SyncAll() { foreach (Control control in panel1.Controls) { UcSync syncUc = control as UcSync; //Debug.Assert(syncUc != null, "What, not syncUc?"); if (syncUc == null) //could be the status box continue; IAsyncResult r = syncUc.Sync(); while (!r.IsCompleted) { System.Threading.Thread.Sleep(200); } } }
Log in to post a comment.
need to do further decoupling business codes from UI codes, for this one and #32.