예제 #1
0
 public void slowMethod(DFeedBack dfeedback)
 {
     int count = 0;
     while (count != NUM_OF_STEPS)
     {
        Thread.Sleep(500);
        dfeedback();
        count++;
     }
 }
예제 #2
0
        private void btnGo_Click(object sender, EventArgs e)
        {
            if (rbProgressBar.Checked)
                dfeedback = new DFeedBack(updateProgressBar);
            if (rbSpinBox.Checked)
                dfeedback = new DFeedBack(updateSpinBox);
            if (rbTrackBar.Checked)
                dfeedback = new DFeedBack(updateTrackBar);

            slowMethod(dfeedback);
        }
예제 #3
0
        public void slowMethod(DFeedBack dfeedback)
        {
            int count = 0;

            while (count != NUM_OF_STEPS)
            {
                Thread.Sleep(500);
                dfeedback();
                count++;
            }
        }
예제 #4
0
        private void btnGo_Click(object sender, EventArgs e)
        {
            if (rbProgressBar.Checked)
            {
                dfeedback = new DFeedBack(updateProgressBar);
            }
            if (rbSpinBox.Checked)
            {
                dfeedback = new DFeedBack(updateSpinBox);
            }
            if (rbTrackBar.Checked)
            {
                dfeedback = new DFeedBack(updateTrackBar);
            }

            slowMethod(dfeedback);
        }