Esempio n. 1
0
        private void IncreaseLoadCounter()
        {
            LoadCounter++;
            LoadingScreen.progressBar1.Value = LoadCounter;
            LoadingScreen.Update();
            if (LoadCounter >= TotalLoadSteps)
            {
                if (LoadingScreen != null)
                {
                    LoadingScreen.Close();
                    LoadingScreen = null;

                    AfterLoadComplete();
                }
            }
        }
Esempio n. 2
0
        private void Form1_Shown(object sender, EventArgs e)
        {
            LoadingScreen = new Form3();
            LoadingScreen.Location = new Point(this.Location.X + (this.Width - LoadingScreen.Width) / 2, this.Location.Y + (this.Height - LoadingScreen.Height) / 2);
            LoadingScreen.Show();
            LoadingScreen.progressBar1.Maximum = TotalLoadSteps;
            LoadingScreen.progressBar1.Value = 0;
            LoadingScreen.LoadText.Text = "Querying CPU devices...";

            StartupTimer = new Timer();
            StartupTimer.Tick += StartupTimer_Tick;
            StartupTimer.Interval = 200;
            StartupTimer.Start();
        }