コード例 #1
0
        private bool TryGetNextDefectNotEmpty(bool isHead = false)
        {
            int index = -1;

            RefreshDefectNameList();
            do
            {
                if (!isHead)
                {
                    if (DefectNameList.Contains(DefectName))
                    {
                        index = DefectNameList.IndexOf(DefectName);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (index >= DefectNameList.Count - 1)
                {
                    return(false);
                }
                isHead = false;
            } while (!TrySelectDefect(++index));

            return(true);
        }
コード例 #2
0
        private bool TryGetPreviousDefectNotEmpty(bool isEnd = false)
        {
            RefreshDefectNameList();
            int index = DefectNameList.Count;

            do
            {
                if (!isEnd)
                {
                    if (DefectNameList.Contains(DefectName))
                    {
                        index = DefectNameList.IndexOf(DefectName);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (index <= 0)
                {
                    return(false);
                }
                isEnd = false;
            } while (!TrySelectDefect(--index));

            return(true);
        }
コード例 #3
0
        public void SwitchDefect(string defectName)
        {
            var index = DefectNameList.IndexOf(defectName);

            if (TrySelectDefect(index))
            {
            }

            return;
        }
コード例 #4
0
        private void UpdateDataCells()
        {
            DefectCells = new List <DefectCell>();
            if (_displayWindowNum <= 0)
            {
                return;
            }

            int head = -1;
            int end  = -1;

            if (!DefectNameList.Contains(DefectName))
            {
                int iter = _displayWindowNum;
                do
                {
                    DefectCells.Add(new DefectCell());
                } while (--iter > 0);
                return;
            }

            int indexOfGroup = DefectNameList.IndexOf(DefectName) / _displayWindowNum;

            head = indexOfGroup * _displayWindowNum;
            end  = head + _displayWindowNum - 1;

            for (var iter = head; iter <= end; ++iter)
            {
                var defectCell = new DefectCell();
                if (null == DefectNameList || 0 == DefectNameList.Count || iter >= DefectNameList.Count || iter < 0)
                {
                    DefectCells.Add(new DefectCell());
                }
                else
                {
                    _device.GetDefectCell(ProductName, BatchName, BoardName, SideName, ShotName, DefectNameList[iter], out defectCell);
                    defectCell.GenRegionFromRect(_dilationPixel);
                    DefectCells.Add(defectCell);
                }
            }

            DisplayWindowIndex = DefectNameList.IndexOf(DefectName) - head;
            DefectRegionIndex  = 0;

            return;
        }