Ejemplo n.º 1
0
        private Product GetProduct(int camNo, int stageId)
        {
            TrayColumn column = Columns[stageId - 1];

            if (column.Products?.Count == 0)
            {
                return(null);
            }
            int row = Config.Group.FirstOrDefault(p => p.CAMNO.Contains(camNo))?.Row ?? 1;

            return(column.Products[row - 1]);
        }
Ejemplo n.º 2
0
        public int?NewColumn()
        {
            if (Index > Columns.Count || Index < 0)
            {
                return(null);
            }
            int        nowIndex = Index;
            TrayColumn column   = Columns[nowIndex - 1];

            column.Create(RowCount);
            OnPropertyChanged(nameof(Columns));
            if (Config.Direction == "right" || Config.Direction == "bottom")
            {
                Index--;
            }
            else
            {
                Index++;
            }
            return(nowIndex);
        }