static void throwGoodThreadMain(object po) { object[] pa = (object[])po; int chId = (int)pa[0]; // parameters deserialization finished int crId = chId % 2; if (chId >= 2) { ConveyorBasicController.chB(chId); ConveyorCleverController.waitForChangeover(chId, ConveyorChState.Up | ConveyorChState.Backward, TimeC); } else { ConveyorBasicController.chF(chId); ConveyorCleverController.waitForChangeover(chId, ConveyorChState.Up | ConveyorChState.Forward, TimeC); } ConveyorBasicController.chS(chId); }
static void unsafeUploadGoodThreadMain(object po) { object[] pa = (object[])po; int chId = (int)pa[0]; // parameters deserialization finished int crId = chId % 2; UploadCount[chId]++; if (chId >= 2) { ConveyorBasicController.chF(chId); ConveyorBasicController.crF(crId); ConveyorCleverController.waitForCrossover(crId, ConveyorCrState.Forward, TimeC); } else { ConveyorBasicController.chB(chId); ConveyorBasicController.crB(crId); ConveyorCleverController.waitForCrossover(crId, ConveyorCrState.Backward, TimeC); } ConveyorBasicController.chS(chId); ConveyorBasicController.crS(crId); }
private void _button_ch_backward_Click(object sender, EventArgs e) { ConveyorBasicController.chB(Convert.ToInt32(new Regex(@"\d+").Match(((Button)sender).Name).ToString()) - 1); }