Ejemplo n.º 1
0
        private bool TryGetNextBatchNotEmpty(bool isHead = false)
        {
            int index = -1;

            RefreshBatchNameList();
            do
            {
                if (!isHead)
                {
                    if (BatchNameList.Contains(BatchName))
                    {
                        index = BatchNameList.IndexOf(BatchName);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (index >= BatchNameList.Count - 1)
                {
                    return(false);
                }
                isHead = false;
            } while ((!TrySelectBatch(++index)) || (!TryGetNextBoardNotEmpty(true)));

            return(true);
        }
Ejemplo n.º 2
0
        private bool TryGetPreviousBatchNotEmpty(bool isEnd = false)
        {
            RefreshBatchNameList();
            int index = BatchNameList.Count;

            do
            {
                if (!isEnd)
                {
                    if (BatchNameList.Contains(BatchName))
                    {
                        index = BatchNameList.IndexOf(BatchName);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (index <= 0)
                {
                    return(false);
                }
                isEnd = false;
            } while ((!TrySelectBatch(--index)) || (!TryGetPreviousBoardNotEmpty(true)));

            return(true);
        }
Ejemplo n.º 3
0
        public void SwitchBatch(string batchName)
        {
            var index = BatchNameList.IndexOf(batchName);

            if (TrySelectBatch(index) && TrySelectBoard(0) && TrySelectSide(0) && TrySelectShot(0) && TrySelectDefect(0))
            {
            }

            return;
        }
Ejemplo n.º 4
0
        private void LoadDataBaseInfo()
        {
            _device.SetDataDir(_modelDir, _dataDir);

            XmlParameter xmlParameter = new XmlParameter();

            xmlParameter.ReadParameter(Application.StartupPath + _fileDataBaseManager);

            ProductName = xmlParameter.GetParamData("ProductName");
            BatchName   = xmlParameter.GetParamData("BatchName");
            BoardName   = xmlParameter.GetParamData("BoardName");
            SideName    = xmlParameter.GetParamData("SideName");
            ShotName    = xmlParameter.GetParamData("ShotName");
            DefectName  = xmlParameter.GetParamData("DefectName");

            RefreshProductNameList();
            if (!ProductNameList.Contains(ProductName))
            {
                TrySelectProduct(0);
            }
            RefreshBatchNameList();
            if (!BatchNameList.Contains(BatchName))
            {
                TrySelectBatch(0);
            }
            RefreshBoardNameList();
            if (!BoardNameList.Contains(BoardName))
            {
                TrySelectBoard(0);
            }
            RefreshSideNameList();
            if (!SideNameList.Contains(SideName))
            {
                TrySelectSide(0);
            }
            RefreshShotNameList();
            if (!ShotNameList.Contains(ShotName))
            {
                TrySelectShot(0);
            }
            RefreshDefectNameList();
            if (!DefectNameList.Contains(DefectName))
            {
                TrySelectDefect(0);
            }
            UpdateDataCells();

            return;
        }