示例#1
0
        public SplashScreen(MenuScreen mainForm)
        {
            this.mainForm = mainForm;
            InitializeComponent();
            LoadTimer = new Timer();
            LoadTimer.Interval = (int)TimeSpan.FromSeconds(10).TotalMilliseconds;
            LoadTimer.Tick += LoadTimer_Tick;
            LoadTimer.Start();

            //load backimage from file
            string path;
            if (File.Exists(path = Path.Combine(Application.StartupPath, "Data", "Images", "Splash.bmp")))
            {
                this.BackgroundImage = Bitmap.FromFile(path);
                this.Width = this.BackgroundImage.Width;
                this.Height = this.BackgroundImage.Height;
            }
        }
示例#2
0
 public MyContext()
 {
     MenuScreen ms = new MenuScreen();
     new SplashScreen(ms).Show();
     ms.Shown += ms_Shown;
 }