通用等待窗口
1: 
2. 方法
public static void ShowWait<T>(this Form form, string caption="请等待", string description="加载中...")
{
SplashScreenManager splashScreenManager = new SplashScreenManager(form, typeof(WaitForml), true, true);
splashScreenManager.ShowWaitForm();//显示加载等待窗体
splashScreenManager.SetWaitFormCaption(caption);
splashScreenManager.SetWaitFormDescription(description);
//ProductForm productForm = new ProductForm();
//productForm.Show ():
Type type = typeof(T);//ProductForm检测类型
Form f=(Form)Activator.CreateInstance(type); //new
f.Show();
splashScreenManager.CloseWaitForm();
}
浙公网安备 33010602011771号