LogoWindow.xaml.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. using System.IO;
  15. using System.Windows.Threading;
  16. namespace AIRS
  17. {
  18. /// <summary>
  19. /// LogoWindow.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class LogoWindow : Window
  22. {
  23. DispatcherTimer timer = new DispatcherTimer();
  24. public LogoWindow()
  25. {
  26. InitializeComponent();
  27. //开启时钟
  28. showlogo();
  29. }
  30. /// <summary>
  31. /// 开启时钟
  32. /// </summary>
  33. void showlogo()
  34. {
  35. timer.Tick += new EventHandler(timer_Tick);
  36. timer.Interval = TimeSpan.FromSeconds(2.5); //设置刷新的间隔时间
  37. timer.Start();
  38. }
  39. /// <summary>
  40. /// 时钟线程
  41. /// </summary>
  42. /// <param name="sender"></param>
  43. /// <param name="e"></param>
  44. void timer_Tick(object sender, EventArgs e)
  45. {
  46. timer.Stop();
  47. this.Hide();
  48. MainWindow mw = new MainWindow();
  49. mw.Show();
  50. this.Close();
  51. }
  52. }
  53. }