Beispiel #1
0
 public void mipiloop2(mipi mipi)
 {
     for (int i = 0; i < mipi.bitrate; i++)
     {
         Settextbox(mipi.tb, (i * 2).ToString());
         Thread.Sleep(100);
     }
 }
Beispiel #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     if (bb == null && workThread == null)
     {
         mipihander mm = mipiloop;
         mipi       m1 = new mipi(500, textBox1);
         bb         = new BackgroundWorker();
         bb.DoWork += (delegate(object workObject, DoWorkEventArgs workEvent) {
             workThread = Thread.CurrentThread;
             mipiloop(m1);
         });
         bb.RunWorkerAsync();
     }
 }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            List <Thread> threadlist = new List <Thread>();
            mipi          m1         = new mipi(500, textBox1);
            mipi          m2         = new mipi(50, textBox2);
            //testhand tt = test1;
            //tt += test2;
            //tt();
            //Settextboxcallback sb = Settextbox;
            //sb(textBox1, "hello 1");
            //Thread t1 = new Thread(delegate () { mipiloop(m1); });
            //threadlist.Add(t1);
            //Thread t2 = new Thread(delegate () { mipiloop2(m2); });
            //threadlist.Add(t2);
            //foreach(Thread tt in threadlist )
            //{
            //    tt.Start();
            //}
            //mipihander tt = mipiloop2;
            //tt += mipiloop;
            //tt(m1);
            //Thread t1 = new Thread(delegate () { mipiloop(m1); });
            ThreadStart tstar = new ThreadStart(nofunc);

            tstar += nofunc;
            Thread t2 = new Thread(tstar);


            //t1.Start();
            //t2.Start();
            //t1.Join();
            //loophander lp = loop_test1;
            //lp += loop_test2;

            //lp(textBox1, 50);
        }