public void Hide(FLOMgr mgr, int x, int y) { connecting = false; if (sobj == null) { return; } epoint = new Point(x, y); eobj = mgr.Flolist.GetObjByPoint(epoint); if (eobj == null) { return; } eptype = GetConPntTypeBySType(); // 일단 sptype의 반대를 가져옴 GetConObjType(); // 이후 상황에 따라 둘을 스위치... spoint = Sobj.Drwobj.GetConPoint(sptype); // Type에 따라 포인트를 가져옴 epoint = Eobj.Drwobj.GetConPoint(eptype); // Type에 따라 포인트를 가져옴 Sobj.Selected = true; Eobj.Selected = true; }
public void SelModeMove(FLOMgr mgr, MouseEventArgs e) { if (e.Button == MouseButtons.None || e.Button != MouseButtons.Left) { return; } epoint = new Point(e.X, e.Y); int gridx = e.X - this.GridpointX / 2 + (this.GridpointX - ((e.X - this.GridpointX / 2) % this.GridpointX)); int gridy = e.Y - this.GridpointY / 2 + (this.GridpointY - ((e.Y - this.GridpointY / 2) % this.GridpointY)); Point gridanch = new Point(0, 0); if (gridobj != null) { gridanch = gridobj.Drwobj.GetConPoint(DRWObj.CONPONT.AnCh); } int dx = gridx - gridanch.X; int dy = gridy - gridanch.Y; if (this.Selmode == GudSrt.SelMode.SelMov) { mgr.Flolist.GetSelectedObjMove(dx, dy); } if (this.Selmode == GudSrt.SelMode.SelNet) { mgr.Gudsrt.Selrect = mgr.Gudsrt.GetNormilizedRect(spoint, epoint); } }
public DRWCon(FLOMgr mgr, FLOObj owner) { this.Owner = owner; ltct = mgr.Gudcon.Spoint; rtct = mgr.Gudcon.Epoint; lttp = mgr.Gudcon.Sptype; rttp = mgr.Gudcon.Eptype; ctct = new Point((int)(ltct.X + rtct.X) / 2, (int)(ltct.Y + rtct.Y) / 2); if (Owner.Objtype == (FLOObj.OBJTYPE.B2C | FLOObj.OBJTYPE.O2C)) { this.distype = 2; } else if (Owner.Objtype == FLOObj.OBJTYPE.C2R) { this.distype = 3; } else if (Owner.Objtype == FLOObj.OBJTYPE.R2O) { this.distype = 4; } else { this.distype = 1; } }
public FLORes(FLOMgr mgr, int x, int y) { Objtype = OBJTYPE.Res; Init(mgr.Flolist.GetObjSeq(this.Objtype)); if (PopUp(mgr, new FormFLO())) { this.Drwobj = new DRWRes(this, x, y); } }
public FLOCal(FLOMgr mgr, int x, int y) { Objtype = OBJTYPE.Cal; this.Cal_caltype = mgr.LastCalType; Init(mgr.Flolist.GetObjSeq(this.Objtype)); if (PopUp(mgr, new FormFLO())) { this.Drwobj = new DRWCal(this, x, y); } }
public void SelModeUp(FLOMgr mgr, MouseEventArgs e) { if (this.Selmode == GudSrt.SelMode.SelNet) { mgr.Flolist.SelectByRect(this.selrect); this.Selmode = GudSrt.SelMode.SelNon; this.Seldraw = false; } this.selrect = new Rectangle(0, 0, 0, 0); this.spoint = new Point(0, 0); this.epoint = new Point(0, 0); this.gridobj = null; this.Selmode = GudSrt.SelMode.SelNon; }
public void SelModeDown(FLOMgr mgr, MouseEventArgs e) { if (this.Selmode == SelMode.SelNon) { FLOObj o = mgr.Flolist.GetObjByPoint(new Point(e.X, e.Y)); if (o != null) { if ((Control.ModifierKeys & Keys.Control) == 0 && !o.Selected) { mgr.Flolist.UnselectAll(); } this.Selmode = GudSrt.SelMode.SelMov; this.gridobj = o; if ((Control.ModifierKeys & Keys.Control) != 0) { o.Selected = !o.Selected; this.Selmode = GudSrt.SelMode.SelNon; } else { o.Selected = true; } } } if (this.Selmode == SelMode.SelNon) { if ((Control.ModifierKeys & Keys.Control) == 0) { mgr.Flolist.UnselectAll(); } this.selrect = GetNormilizedRect(spoint, epoint); this.Selmode = GudSrt.SelMode.SelNet; this.Seldraw = true; } this.spoint = new Point(e.X, e.Y); this.epoint = new Point(e.X, e.Y); }
public void ShowConPoint(FLOMgr mgr, int x, int y) { this.conguiding = false; epoint = new Point(x, y); FLOObj o = mgr.Flolist.GetObjByConPoint(epoint); if (o == null) { return; } Point conpoint = o.Drwobj.GetConPoint(o.Drwobj.GetConPointType(epoint)); cpoint = conpoint; this.conguiding = true; }
public void Show(FLOMgr mgr, int x, int y) { if (this.connecting) { return; } spoint = new Point(x, y); sobj = mgr.Flolist.GetObjByPoint(spoint); if (sobj != null) { mgr.Flolist.UnselectAll(); sptype = sobj.Drwobj.GetConPointType(spoint); spoint = sobj.Drwobj.GetConPoint(sptype); connecting = true; sobj.Selected = true; } }
public override bool PopUp(FLOMgr mgr, FormFLO f) { f = new FormFLOCal(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(); UpdateCon(); mgr.LastCalType = this.cal_caltype; return(true); } else { return(false); } }
public FLOB2C(FLOMgr mgr, FLOObj s, FLOObj e, FormFLO f) { Objtype = OBJTYPE.B2C; Init(mgr.Flolist.GetObjSeq(this.Objtype)); this.Uplist.Clear(); this.Dnlist.Clear(); this.Uplist.Insert(0, s); this.Dnlist.Insert(0, e); if (CheckFLOLogic(this.UPlist(0), this.DNlist(0))) { if (PopUp(mgr, new FormFLO())) { this.Drwobj = new DRWCon(mgr, this); this.UPlist(0).Dnlist.Add(this); this.DNlist(0).Uplist.Add(this); } } }
public FLOO2B(FLOMgr mgr, FLOObj s, FLOObj e, FormFLO f) { Objtype = OBJTYPE.O2B; Init(mgr.Flolist.GetObjSeq(this.Objtype)); this.Ltlist.Clear(); this.Rtlist.Clear(); this.Ltlist.Insert(0, s); this.Rtlist.Insert(0, e); if (CheckFLOLogic(this.LTlist(0), this.RTlist(0))) { if (PopUp(mgr, new FormFLO())) { this.Drwobj = new DRWCon(mgr, this); this.LTlist(0).Rtlist.Add(this); this.RTlist(0).Ltlist.Add(this); } } }
public override bool PopUp(FLOMgr mgr, FormFLO f) { f = new FormFLOB2O(CheckLockType(), b2o_altbufs); 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); this.Oldname = Objname; this.Objname = f.GetObjName(); this.Disname = f.GetDisName(); return(true); } else { return(false); } }
public virtual bool PopUp(FLOMgr mgr, FormFLO f, int x, int y) { return(false); }
public GudCon(FLOMgr mgr, int x, int y) { Init(); }
public FLOObj GetConObj(FLOMgr mgr) { if (Sobj == null) { return(null); } if (Eobj == null) { return(null); } if (Sobj != null && Eobj != null) { if (Sobj.Objtype == FLOObj.OBJTYPE.Cal || Sobj.Objtype == FLOObj.OBJTYPE.Res || Eobj.Objtype == FLOObj.OBJTYPE.Cal || Eobj.Objtype == FLOObj.OBJTYPE.Res) { if (Sptype == DRWObj.CONPONT.LtCt || Sptype == DRWObj.CONPONT.RtCt) { return(null); } if (Eptype == DRWObj.CONPONT.LtCt || Eptype == DRWObj.CONPONT.RtCt) { return(null); } } if (Sobj.Objtype != FLOObj.OBJTYPE.Cal && Sobj.Objtype != FLOObj.OBJTYPE.Res && Eobj.Objtype != FLOObj.OBJTYPE.Cal && Eobj.Objtype != FLOObj.OBJTYPE.Res) { if (Sptype == DRWObj.CONPONT.CtUp || Sptype == DRWObj.CONPONT.CtDn) { return(null); } if (Eptype == DRWObj.CONPONT.CtUp || Eptype == DRWObj.CONPONT.CtDn) { return(null); } } } switch (Sobj.Objtype) { case FLOObj.OBJTYPE.Buf: { if (this.Eobj.Objtype == FLOObj.OBJTYPE.Ope) { return(new FLOB2O(mgr, Sobj, Eobj, new FormFLO())); } else if (this.Eobj.Objtype == FLOObj.OBJTYPE.Cal) { return(new FLOB2C(mgr, Sobj, Eobj, new FormFLO())); } else if (this.Eobj.Objtype == FLOObj.OBJTYPE.Dmd) { return(new FLOB2D(mgr, Sobj, Eobj, new FormFLO())); } else { return(null); } } case FLOObj.OBJTYPE.Cal: { if (this.Eobj.Objtype == FLOObj.OBJTYPE.Res) { return(new FLOC2R(mgr, Sobj, Eobj, new FormFLO())); } else { return(null); } } case FLOObj.OBJTYPE.Ope: { if (this.Eobj.Objtype == FLOObj.OBJTYPE.Buf) { return(new FLOO2B(mgr, Sobj, Eobj, new FormFLO())); } else if (this.Eobj.Objtype == FLOObj.OBJTYPE.Cal) { return(new FLOO2C(mgr, Sobj, Eobj, new FormFLO())); } else if (this.Eobj.Objtype == FLOObj.OBJTYPE.Ope) { return(new FLOO2O(mgr, Sobj, Eobj, new FormFLO())); } else { return(null); } } case FLOObj.OBJTYPE.Res: { if (this.Eobj.Objtype == FLOObj.OBJTYPE.Ope) { return(new FLOR2O(mgr, Sobj, Eobj, new FormFLO())); } else { return(null); } } case FLOObj.OBJTYPE.Dmd: { return(null); } } return(null); }