using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace BEMSDataGateway
{
    public partial class FirstCheck_Progressbar : Form
    {
        Thread th1;

        public FirstCheck_Progressbar()
        {
            InitializeComponent();              
        }

        public void Start_progressBar()
        {    
            th1 = new Thread(new ThreadStart(myThread));
            th1.Start(); 
        }
        // progress bar

        private delegate void myDelegate(int theValue, int theMax);

        private void updateProgress(int theValue, int theMax)
        {  
            Close();
        }

        public void Stop_progressBar()
        {
            this.Invoke(new myDelegate(updateProgress), new object[]{ 100, 100 });
        }


        private void myThread()
        {
            ShowDialog();
            start_progressBar.Enabled = true;
        }

    }
}