|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2022-3-6 21:53:22
|
显示全部楼层
- // 进度条托管
- private delegate void ShowProgressDelegate(int totalStep, int currentStep);
- ProgreeLight ProgreeLightForm = new ProgreeLight();
- private void ShowProgress(int currentStep, int totalStep)
- {
- if (ProgreeLightForm == null)
- {
- ProgreeLightForm = new ProgreeLight();
- }
- else
- {
- if (ProgreeLightForm.IsDisposed) //若子窗体关闭 则打开新子窗体 并显示
- {
- ProgreeLightForm = new ProgreeLight();
- }
- }
- ProgreeLightForm.Show();
- ProgreeLightForm.SetProgreeBar(currentStep, totalStep);
- }
- 调用:
- ShowProgressDelegate showProgressBar = new ShowProgressDelegate(ShowProgress);
- this.Invoke(showProgressBar, new object[] { 0, RowsCount_ });
复制代码 |
|