public void DisplayProgress(int Val) { if (this.DBT_Progress.InvokeRequired) { ShowProgressHandler sph = new ShowProgressHandler(ShowProgress); sph.Invoke(Val); } else { ShowProgress(Val); } }
public void ShowProgress(int CurrCount, int TabCount) { if (this.PB_Generate.InvokeRequired) { if (ShowProgressMethod == null) { ShowProgressMethod = new ShowProgressHandler(SetPro); } ShowProgressMethod.Invoke(CurrCount, TabCount); } else { SetPro(CurrCount, TabCount); } }