Example #1
0
        //
        private bool TryGetPreviousProductNotEmpty(bool isEnd = false)
        {
            RefreshProductNameList();
            int index = ProductNameList.Count;

            do
            {
                if (!isEnd)
                {
                    if (ProductNameList.Contains(ProductName))
                    {
                        index = ProductNameList.IndexOf(ProductName);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (index <= 0)
                {
                    return(false);
                }
                isEnd = false;
            } while ((!TrySelectProduct(--index)) || (!TryGetPreviousBatchNotEmpty(true)));

            return(true);
        }
Example #2
0
        //
        private bool TryGetNextProductNotEmpty(bool isHead = false)
        {
            int index = -1;

            RefreshProductNameList();
            do
            {
                if (!isHead)
                {
                    if (ProductNameList.Contains(ProductName))
                    {
                        index = ProductNameList.IndexOf(ProductName);
                    }
                    else
                    {
                        return(false);
                    }
                }

                if (index >= ProductNameList.Count - 1)
                {
                    return(false);
                }
                isHead = false;
            } while ((!TrySelectProduct(++index)) || (!TryGetNextBatchNotEmpty(true)));

            return(true);
        }
Example #3
0
        //
        public void SwitchProduct(string productName)
        {
            var index = ProductNameList.IndexOf(productName);

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

            return;
        }