12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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 DataGateWayProject
- {
- 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;
- }
- }
- }
|