Exemplo n.º 1
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            if (listLifetimeInfo1.CheckForDuplicateSerialNumber() == true)
            {
                //MessageBox.Show("Duplicate serial numbers detected, please fix.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                MessageBox.Show("Duplicate serial numbers detected, please fix.", "Error");
                return;
            }

            if (textBatchName.Text.Trim().Length == 0)
            {
                //MessageBox.Show("Please enter a batch name.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                MessageBox.Show("Duplicate serial numbers detected, please fix.", "Error");
                return;
            }

            PinsToTest = listLifetimeInfo1.GetAllPinsToTest();
            int PinTotal = PinsToTest.Count;

            //ClearLog();
            treeReport.Items.Clear();
            LifetimeTest = new TestPart();
            LifetimeTest.TotalIterations = (int)numericIterations.pinValue();
            LifetimeTest.PinsToTest      = PinsToTest;
            // SafeLockUI(true);
            if (PinTotal > 0)
            {
                Communication.TestPin(LifetimeTest.GetNextPin());
            }
        }
Exemplo n.º 2
0
        private void buttonStart_Click(object sender, RoutedEventArgs e)
        {
            PinsToTest = listProductionInfo1.GetAllPinsToTest();
            listProductionInfo1.ResetAll();
            PinTotal = PinsToTest.Count;
            ClearLog();

            ProductionTest = new TestPart();
            ProductionTest.TotalIterations = (int)numericIterations.pinValue();
            ProductionTest.PinsToTest      = PinsToTest;

            if (PinTotal > 0)
            {
                SetDisplayStates(false);
                Communication.TestPin(ProductionTest.GetNextPin());
            }

            /*  Debuggin purposes
             * listProductionInfo1.DisplaAll(true);
             * listProductionInfo1.SetResult(0, false);
             */
        }