Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Form1()
- {
- InitializeComponent();
- initTimers();
- }
- public void timer1_Tick(object sender, EventArgs e)
- {
- progressBar1.Increment(1);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (button1.Text == "Go")
- {
- timer1.Start();
- button1.Text = "Stop";
- }
- else
- {
- timer1.Stop();
- button1.Text = "Go";
- }
- }
- public void initTimers()
- {
- timer1.Tick += new EventHandler(timer1_Tick);
- timer1.Interval = 1000;
- }
- public void progressTimers()
- {
- progressBar1.Value = 0;
- progressBar1.Minimum = 0;
- progressBar1.Maximum = 2;
- progressBar1.Step = 1;
- progressBar1.Visible = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement