Example #1
0
        public void DUTEnable(List <string> tempduts) // enables or disables different controls in gui based on selection of DUTS
        {
            List <Control> myDuts = new List <Control>();

            foreach (string dut in tempduts) // add certain DUT control panels for each DUT which was selected in lbDUTNumber
            {
                switch (dut)
                {
                case "DUT 1": { foreach (Control temp in ldut1)
                                {
                                    myDuts.Add(temp);
                                }
                                ActiveDUTs.Add(ldut1); break; }

                case "DUT 2": { foreach (Control temp in ldut2)
                                {
                                    myDuts.Add(temp);
                                }
                                ActiveDUTs.Add(ldut2); break; }

                case "DUT 3": { foreach (Control temp in ldut3)
                                {
                                    myDuts.Add(temp);
                                }
                                ActiveDUTs.Add(ldut3); break; }

                case "DUT 4": { foreach (Control temp in ldut4)
                                {
                                    myDuts.Add(temp);
                                }
                                ActiveDUTs.Add(ldut4); break; }

                case "DUT 5": { foreach (Control temp in ldut5)
                                {
                                    myDuts.Add(temp);
                                }
                                ActiveDUTs.Add(ldut5); break; }

                case "DUT 6": { foreach (Control temp in ldut6)
                                {
                                    myDuts.Add(temp);
                                }
                                ActiveDUTs.Add(ldut6); break; }
                }
            }
            foreach (Control temp in myDuts)
            {
                temp.Enabled = true;
            }
        }
Example #2
0
        private void DUTDisable(string dut)
        {
            switch (dut)
            {
            case "DUT 1": { foreach (Control temp in ldut1)
                            {
                                temp.Enabled = false;
                            }
                            ActiveDUTs.Remove(ldut1); break; }

            case "DUT 2": { foreach (Control temp in ldut2)
                            {
                                temp.Enabled = false;
                            }
                            ActiveDUTs.Remove(ldut2); break; }

            case "DUT 3": { foreach (Control temp in ldut3)
                            {
                                temp.Enabled = false;
                            }
                            ActiveDUTs.Remove(ldut3); break; }

            case "DUT 4": { foreach (Control temp in ldut4)
                            {
                                temp.Enabled = false;
                            }
                            ActiveDUTs.Remove(ldut4); break; }

            case "DUT 5": { foreach (Control temp in ldut5)
                            {
                                temp.Enabled = false;
                            }
                            ActiveDUTs.Remove(ldut5); break; }

            case "DUT 6": { foreach (Control temp in ldut6)
                            {
                                temp.Enabled = false;
                            }
                            ActiveDUTs.Remove(ldut6); break; }
            }
        }