Exemplo n.º 1
0
        }     // done()

        public async void task1(Object form)
        {
            WordBlasterForm form1 = (WordBlasterForm)form;

            do
            {
                await Task.Delay(5000);

                form1.charpermin  += (form1.wordarray[0] * 12);
                form1.wordarray[0] = 0;
            } while (!form1.getDone());
        }
Exemplo n.º 2
0
        public async void task3(Object form)
        {
            WordBlasterForm form1 = (WordBlasterForm)form;//Thread 3's Task associated with Lane 3

            do
            {
                await Task.Delay(5000);

                form1.charpermin  += (form1.wordarray[2] * 12);
                form1.wordarray[2] = 0;
            } while (!form1.getDone());
        }
Exemplo n.º 3
0
        public async void task5(Object form) //Thread 5's Task associated with Lane 5
        {
            WordBlasterForm form1 = (WordBlasterForm)form;

            do
            {
                form1.charpermin   = 0; //reset number after five seconds
                form1.charpermin  += (form1.wordarray[4] * 10);
                form1.wordarray[4] = 0;
                await Task.Delay(6000);
            } while (!form1.getDone());
        }