开发者论坛

 找回密码
 注册 (请使用非IE浏览器)
查看: 4613|回复: 0

DevExpress WinForms帮助文档:初始屏幕管理器序列化细节

[复制链接]

0

精华

8

贡献

1768

赞扬

特约版主

帖子
583
软币
4524
在线时间
275 小时
注册时间
2019-2-21
发表于 2021-4-16 10:05:14 | 显示全部楼层 |阅读模式

点击获取DevExpress完整版下载

SplashScreenManager 组件的序列化取决于所选的Active Splash Form(SplashScreenManager.ActiveSplashFormTypeInfo属性)。

激活启动表单是Splash Screen或None

SplashScreenManager类的实例在主窗体的InitializeComponent方法中声明为局部变量,这种序列化方法可确保在所有其他组件之前初始化启动画面管理器,并在您的表单开始的第一刻启动选定的启动画面。 但是请注意,您将无法处理在InitializeComponent方法中声明SplashScreenManager组件的本地实例。

这里是在这种情况下可以使用的方法。

C#

[C#] 纯文本查看 复制代码
// Display a Wait Form
SplashScreenManager.ShowForm(typeof(WaitForm2));
//...
//Change its caption
SplashScreenManager.Default.SetWaitFormCaption("new caption");
//...
//Close the Wait Form
SplashScreenManager.CloseForm();

VB.NET

[Visual Basic] 纯文本查看 复制代码
' Display a Wait Form
SplashScreenManager.ShowForm(GetType(WaitForm2))
'...
'Change its caption
SplashScreenManager.Default.SetWaitFormCaption("new caption")
'...
'Close the Wait Form
SplashScreenManager.CloseForm()

激活启动表单是一个等待表单

SplashScreenManager类的实例被声明为表单的局部变量,而不是InitializeComponent方法。 在这种情况下,您可以使用SplashScreenManager的非静态方法(可通过SplashScreenManager实例访问)打开,关闭所选的等待表单并与之交互。 这些方法是:SplashScreenManager.ShowWaitForm, SplashScreenManager.CloseWaitForm, SplashScreenManager.SetWaitFormCaption, SplashScreenManager.SetWaitFormDescription and SplashScreenManager.SendCommand


上DevExpress中文网,获取第一手最新产品资讯!

DevExpress技术交流群3:700924826      欢迎一起进群讨论


回复

使用道具 举报

Archiver|手机版|小黑屋|开发者网 ( 苏ICP备08004430号-2 )
版权所有:南京韵文教育信息咨询有限公司

GMT+8, 2024-5-8 22:57

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表