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 }
时间: 2024-09-28 20:40:56