Exemplo n.º 1
0
        public bool CompareToSelectedBar(GanttBar bar)
        {
            var selBar = this.SelectedBar as GanttBar;

            if (this.MouseSelType == MouseSelectType.StepSeq)
            {
                return(selBar.BarKey == bar.BarKey);
            }
            else if (this.MouseSelType == MouseSelectType.LotId)
            {
                string selLotid = GetLotId(selBar.LotID);
                string curLotid = GetLotId(bar.LotID);

                return(selLotid == curLotid);
            }

            return(false);
        }
Exemplo n.º 2
0
        public BrushInfo GetBrushInfo(GanttBar bar)
        {
            BrushInfo brushinfo = new BrushInfo(ColorGenHelper.GetColorByKey(bar.BarKey, ColorGenHelper.CATETORY_PRODUCT));
            var       selBar    = this.SelectedBar;

            if (!this.EnableSelect || selBar == null)
            {
                bar.BackColor = brushinfo.BackColor;
                return(brushinfo);
            }

            if (!CompareToSelectedBar(bar))
            {
                bar.BackColor = brushEmpth.BackColor;
                return(brushEmpth);
            }

            bar.BackColor = brushinfo.BackColor;
            return(brushinfo);
        }
Exemplo n.º 3
0
        public void SetBarInfo(GanttBar bar)
        {
            var sb = new StringBuilder();

            //sb.AppendLine("+ -----------------------------------------");
            sb.AppendLine(string.Format("LotID\t : {0}", bar.LotID));
            sb.AppendLine(string.Format("T/I Qty\t : {0}", bar.TIQty));
            sb.AppendLine(string.Format("T/O Qty\t : {0}", bar.TOQty));

            sb.AppendLine(string.Format("Process\t : {0}", bar.ProcessID));
            sb.AppendLine(string.Format("Step\t : {0}", bar.StepSeq));

            sb.AppendLine(string.Format("Product\t : {0}", bar.ProductID));

            sb.AppendLine();
            sb.AppendLine(string.Format("{0} -> {1}", bar.TkinTime, bar.TkoutTime));
            sb.AppendLine(string.Format("Gap\t : {0}", bar.TkoutTime - bar.TkinTime));

            memoEdit1.Text = sb.ToString();
        }
Exemplo n.º 4
0
        private void DoAddItem(string lotId, string processID, string stepSeq, string productID, int qty, DateTime tkin, DateTime tkout, DateTime toTime, GanttInfo info)
        {
#if DEBUG
            if (lotId == "FAAA611A5")
            {
            }
#endif
            DateTime endOfShiftTime = toTime;

            GanttBar splitBarA  = null;
            GanttBar splitBarB  = null;
            GanttBar currentBar = null;

            bool isSplit = false;

            // Shift Time에 걸쳐 있을 경우
            if (tkin < endOfShiftTime && endOfShiftTime <= tkout)
            {
                splitBarA = new GanttBar(lotId, processID, stepSeq, productID, tkin, endOfShiftTime, qty, qty, EqpState.NONE);
                splitBarB = new GanttBar(lotId, processID, stepSeq, productID, endOfShiftTime, tkout, qty, qty, EqpState.NONE);

                splitBarA.IsShiftSplit = splitBarB.IsShiftSplit = isSplit = true;
            }
            else
            {
                currentBar = new GanttBar(lotId, processID, stepSeq, productID, tkin, tkout, qty, qty, EqpState.NONE);
            }

            if (isSplit == true)
            {
                info.AddItem(splitBarA.BarKey, splitBarA);
                info.AddItem(splitBarB.BarKey, splitBarB);
            }
            else
            {
                info.AddItem(currentBar.BarKey, currentBar);
            }
        }
Exemplo n.º 5
0
            public void AddItem(string key, GanttBar bar)
            {
                BarList list;

                if (!this.Items.TryGetValue(key, out list))
                {
                    this.Items.Add(key, list = new BarList());
                    list.Add(bar);
                    return;
                }

                /* currentBar가 이전에 같은 step 조건에서 같은 lotid에 대한 작업일 때
                 *             2013-03-13 정용호
                 */
                foreach (GanttBar it in list)
                {
                    if (it.LotID != bar.LotID || it.State != bar.State)
                    {
                        continue;
                    }

                    if (it.IsShiftSplit || bar.IsShiftSplit &&
                        it.State.Equals(bar.State))
                    {
                        return;
                    }

                    if (it.Merge(bar))
                    {
                        it.TOQty += bar.TOQty;
                        return;
                    }
                }

                list.Add(bar);
            }