aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.cs
blob: 3eff2f130b14b70a9715a8a13368cf8627a1064f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Histacom2.Engine;

namespace Histacom2.GlobalPrograms.InstallerPanes
{
    public partial class ProgressPane : UserControl
    {
        public ProgressPane()
        {
            InitializeComponent();
        }

        private void DirectoryPane_Load(object sender, EventArgs e)
        {
            classicLabel2.Text = $"Please   wait   while   setup   installs   {((WinClassicInstaller)Parent.Parent).progName}   on   your   computer.         ";
            Timer t = new Timer();
            t.Interval = 200;
            t.Tick += (s, a) =>
            {
                if (progressBar1.Value == 100)
                {
                    ((WinClassicInstaller)Parent.Parent).classicButton2.PerformClick();
                    t.Stop();
                }
                else progressBar1.Value += 4;
            };
            t.Start();
        }
    }
}