Ejemplo n.º 1
0
        public override bool PopUp(FLOMgr mgr, FormFLO f)
        {
            f = new FormFLOOpe(CheckLockType());

            if (mgr == null)
            {
                return(false);
            }

            f.SetAttr(this);
            DialogResult r = f.ShowDialog();

            if (r == DialogResult.OK)
            {
                if (mgr.Flolist.CheckObjNameUnique(f.GetObjName(), this))               // objname 유일성 테스트
                {
                    return(false);
                }

                if (f.CheckFormLogic())
                {
                    return(false);
                }

                f.GetAttr(this);

                Oldname      = Objname;
                Objname      = f.GetObjName();
                this.Disname = f.GetDisName();

                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        private void PopUpMulti(DrawArea drawArea, MouseEventArgs e)
        {
            FormFLO f = new FormFLO();

            switch (this.Flolist.GetSelectedObjType())
            {
            case FLOObj.OBJTYPE.Buf:
                f = new FormFLOBuf(99);
                break;

            case FLOObj.OBJTYPE.Cal:
                f = new FormFLOCal(99);
                break;

            case FLOObj.OBJTYPE.Res:
                f = new FormFLORes(99);
                break;

            case FLOObj.OBJTYPE.Dmd:
                f = new FormFLODmd(99);
                break;

            case FLOObj.OBJTYPE.Ope:
                f = new FormFLOOpe(99);
                break;

            case FLOObj.OBJTYPE.B2O:
                f = new FormFLOB2O(99, new ArrayList());
                break;

            case FLOObj.OBJTYPE.O2B:
                f = new FormFLOO2B(99);
                break;

            case FLOObj.OBJTYPE.R2O:
                f = new FormFLOR2O(99, new ArrayList());
                break;

            default:
                return;
            }

            if (this.Flolist.GetSelectedObj().Objtype == FLOObj.OBJTYPE.Buf)
            {
                foreach (FLOObj o in Flolist.GetSelectedObjList())
                {
                    foreach (FLOObj c in o.Rtlist)
                    {
                        if (c.Objtype == FLOObj.OBJTYPE.B2D)
                        {
                            f.LockedForm(98);
                        }
                    }
                }
            }

            if (this.Flolist.GetSelectedObj().Objtype == FLOObj.OBJTYPE.Cal)
            {
                if (Flolist.GetSelectedCalObjConned())
                {
                    f.LockedForm(98);
                }
            }

            if (this.Flolist.GetSelectedObj().Objtype == FLOObj.OBJTYPE.B2O)
            {
                if (Flolist.GetSelectedBomObjTypeMatch())
                {
                    f.LockedForm(98);
                }
            }

            if (this.Flolist.GetSelectedObj().Objtype == FLOObj.OBJTYPE.O2B)
            {
                if (Flolist.GetSelectedOpeObjTypeMatch() == FLOObj.OPETYPE.AltRouting)
                {
                    f.LockedForm(97);
                }
                else if (Flolist.GetSelectedOpeObjTypeMatch() == FLOObj.OPETYPE.CoByProd)
                {
                    f.LockedForm(98);
                }
                else
                {
                    f.LockedForm(99);
                }
            }

            foreach (FLOObj o in Flolist.GetSelectedObjList())
            {
                f.SetAttrMulti(o);
            }

            DialogResult r = f.ShowDialog();

            if (r == DialogResult.OK)
            {
                foreach (FLOObj o in Flolist.GetSelectedObjList())
                {
                    if (!Flolist.CheckObjNameUnique(f.GetObjName(o), o))
                    {
                        f.GetAttrMulti(o);
                        o.Oldname = o.Objname;
                        o.Objname = f.GetObjName(o);
                        o.Disname = f.GetDisName(o);
                        o.UpdateCon();
                    }
                }
            }
        }