Beispiel #1
0
        private void PopulateBoardList()
        {
            List <String> BoardNames = GCIDB.GetTestBoardList(SelectedPartName);

            SelectedBoardName   = string.Empty;
            comboTestBoard.Text = string.Empty;
            comboTestBoard.Items.Clear();
            foreach (String Board in BoardNames)
            {
                comboTestBoard.Items.Add(Board);
            }
        }
Beispiel #2
0
 private void part_listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (part_listBox.SelectedIndex == -1)
     {
         MessageBox.Show("Select a Part Name!");
     }
     else
     {
         //pull batch names from the DB, then render the view for filtering
         SelectedPartName = part_listBox.SelectedItem.ToString();
         GCIDB.Initialize();
         GCIDB.OpenConnection();
         List <string> boardNames = GCIDB.GetTestBoardList(SelectedPartName);
         SelectedBoardName = string.Empty;
         testBoardList1.ClearPins();
         selectBoard_listBox.ItemsSource = boardNames;
     }
 }
Beispiel #3
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;
        }
Beispiel #4
0
        private void selectBoard_listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (selectBoard_listBox.Items.Count > 0)
            {
                if (selectBoard_listBox.SelectedItem == null)
                {
                    return;
                }

                if (SelectedBoardName == selectBoard_listBox.SelectedItem.ToString())
                {
                    return;
                }
                SelectedBoardName = selectBoard_listBox.SelectedItem.ToString();

                LoadedTestInfo = GCIDB.GetTestPins(SelectedPartName, SelectedBoardName);
                testBoardList1.ClearPins();
                //  test
                String LastDeviceName = string.Empty;
                foreach (TestPinEntity Pin in LoadedTestInfo)
                {
                    if (LastDeviceName.Length > 0 && (LastDeviceName != Pin.SocketName))
                    {
                        testBoardList1.ExtraSpace += 20;
                    }

                    testBoardList1.AddPinMap(Pin);
                    LastDeviceName = Pin.SocketName;
                }

                SelectedPartName = part_listBox.SelectedItem.ToString();
                GCIDB.Initialize();
                GCIDB.OpenConnection();
                List <string> boardNames = GCIDB.GetTestBoardList(SelectedPartName);
                SelectedBoardName = string.Empty;
                selectBoard_listBox.ItemsSource = boardNames;

                SelectedBoardName = selectBoard_listBox.SelectedItem.ToString();
            }
        }