码迷,mamicode.com
首页 > Windows程序 > 详细

启动界面调用的窗体

时间:2016-04-23 11:38:22      阅读:406      评论:0      收藏:0      [点我收藏+]

标签:

 

1     SplashScreenManager.ShowForm(null, typeof(ssMain), true, true, false, 1000);

调用的窗体

 1   public partial class ssMain : DemoSplashScreen {
 2         int dotCount = 0;
 3         public ssMain() {
 4             DevExpress.Utils.LocalizationHelper.SetCurrentCulture(DataHelper.ApplicationArguments);
 5             InitializeComponent();
 6             labelControl1.Text = string.Format("{0}{1}", labelControl1.Text, GetYearString());
 7             pictureEdit2.Image = global::DevExpress.MailClient.Win.Properties.Resources.SplashScreen;
 8             Timer tmr = new Timer();
 9             tmr.Interval = 400;
10             tmr.Tick += new EventHandler(tmr_Tick);
11             tmr.Start();
12         }
13 
14         void tmr_Tick(object sender, EventArgs e) {
15             if(++dotCount > 3) dotCount = 0;
16             labelControl2.Text = string.Format("{1}{0}", GetDots(dotCount), DevExpress.MailClient.Win.Properties.Resources.Starting);
17         }
18 
19         string GetDots(int count) {
20             string ret = string.Empty;
21             for(int i = 0; i < count; i++) ret += ".";
22             return ret;
23         }
24         int GetYearString() {
25             int ret = DateTime.Now.Year;
26             return (ret < 2015 ? 2015 : ret);
27         }
28     }

 

启动界面调用的窗体

标签:

原文地址:http://www.cnblogs.com/endv/p/5424101.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!