Beispiel #1
0
 private void threadFinishEvent()
 {
     lock (obj)
     {
         if (index < listView.Items.Count)
         {
             var lvi = listView.Items[index++];
             var th  = new Thread(() =>
             {
                 CheckerEngine.Start(lvi);
             });
             th.IsBackground = true;
             th.Start();
         }
     }
 }
Beispiel #2
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            clear();
            int finishIndex = listView.Items.Count < 5 ? listView.Items.Count : 5;

            for (index = 0; index < finishIndex; index++)
            {
                var lvi = listView.Items[index];
                var th  = new Thread(() =>
                {
                    CheckerEngine.Start(lvi);
                });
                th.IsBackground = true;
                th.Start();
            }
        }