コード例 #1
0
        private void newBoard_button_Click(object sender, RoutedEventArgs e)
        {
            AddBoard window = new AddBoard();

            window.ShowDialog();
            //AddBoard addBoard = new AddBoard();
            //List<String> DeviceNames = window.GetNameList();



            if (window.boolVal == true)
            {
                List <int>    DUTPins       = GCIDB.GetDUTPins(SelectedPartName);
                List <String> DeviceNames   = window.GetNameList();
                Byte          CurrentGCIPin = 1;
                int           SocketIndex   = 0;


                int TestBoardID = GCIDB.GetNextTestBoardID();
                int PartID      = GCIDB.GetPartID(SelectedPartName);

                testBoardList1.ClearPins();
                foreach (String Device in DeviceNames)
                {
                    foreach (byte Pin in DUTPins)
                    {
                        //if (CurrentGCIPin == 48)
                        //    CurrentGCIPin += 4;
                        GCIDB.AddTestPinMap(TestBoardID, window.BoardName, PartID, SocketIndex, Device, Pin, CurrentGCIPin, DateTime.Now);
                        CurrentGCIPin++;
                        //testBoardList1.AddPinMap(PartID, TestBoardID, Device, Pin, CurrentGCIPin++);
                    }
                    testBoardList1.ExtraSpace += 20;
                    SocketIndex++;
                }
                //AddBoardControl window = new AddBoardControl();
                //window.ShowDialog();
            }
            List <string> boardNames = GCIDB.GetTestBoardList(SelectedPartName);

            //SelectedBoardName = string.Empty;
            selectBoard_listBox.ItemsSource = boardNames;
        }