Example #1
0
        private void btnMilestoneTest_Click(object sender, System.EventArgs e)
        {
            string label     = this.btnMilestoneTest.Text;
            string taskLabel = "Test" + label;

            m_state = new MilestoneProgressState(statusBarProgressPanel2);
            MilestoneProgressState s = (MilestoneProgressState)m_state;

            s.AddMilestone(1);
            s.AddMilestone(1);
            s.AddMilestone(1);

            using (m_state)
            {
                this.button3.Text = "Working";
                Do(.5, "a");
                Do(.5, "b");
                Do(.5, "c");
                this.button3.Text = label;
            }
        }
Example #2
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            string label     = this.btnMilestoneTest.Text;
            string taskLabel = "Test" + label;

            m_state = new MilestoneProgressState(statusBarProgressPanel2);
            MilestoneProgressState s = (MilestoneProgressState)m_state;

            s.AddMilestone(1);
            s.AddMilestone(1);
            s.AddMilestone(1);
            //test what happens when we have more milestones and we signed up for
            using (m_state)
            {
                this.button3.Text = "Working";
                Do(.5, "a");
                Do(.5, "b");
                Do(.5, "c");
                Do(.5, "extra");
                this.button3.Text = label;
            }
        }