public override void LoadFromStream(SerializationInfo info, int orderNumber) { this.b2o_constype = (BOMTYPE)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryb2oconstype, orderNumber), typeof(BOMTYPE)); this.b2o_cosqty = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryb2ocosqty, orderNumber), typeof(int)); this.b2o_altbuf = (string)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryb2oaltbuf, orderNumber), typeof(string)); this.b2o_altpriority = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryb2oaltpriority, orderNumber), typeof(int)); this.b2o_altbufs = (ArrayList)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryb2oaltbufs, orderNumber), typeof(ArrayList)); Point ctct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryctct, orderNumber), typeof(Point)); Point ltct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryltct, orderNumber), typeof(Point)); Point rtct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryrtct, orderNumber), typeof(Point)); int distype = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrydistype, orderNumber), typeof(int)); DRWObj.CONPONT lttp = (DRWObj.CONPONT)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrylttp, orderNumber), typeof(DRWObj.CONPONT)); DRWObj.CONPONT rttp = (DRWObj.CONPONT)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryrttp, orderNumber), typeof(DRWObj.CONPONT)); this.Rtlist = new ArrayList(); this.Ltlist = new ArrayList(); this.Drwobj = new DRWCon(ltct, rtct, DRWObj.CONPONT.LtCt, DRWObj.CONPONT.RtCt, this); this.Drwobj.Stype = lttp; this.Drwobj.Etype = rttp; this.Drwobj.Distype = distype; base.LoadFromStream(info, orderNumber); }
public override void LoadFromStream(SerializationInfo info, int orderNumber) { this.o2b_prodtype = (OPETYPE)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2bprodtype, orderNumber), typeof(OPETYPE)); this.o2b_prodqty = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2bprodqty, orderNumber), typeof(int)); this.o2b_altpriority = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2baltpriority, orderNumber), typeof(int)); this.o2b_altproportion = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2baltproportion, orderNumber), typeof(int)); this.o2b_basedqty = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2bbasedqty, orderNumber), typeof(int)); this.o2b_cobyprod = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2bcobyprod, orderNumber), typeof(int)); this.o2b_cobyprodqty = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2bcobyprodqty, orderNumber), typeof(int)); this.o2b_cobyprodrate = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryo2bcobyprodrate, orderNumber), typeof(int)); Point ctct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryctct, orderNumber), typeof(Point)); Point ltct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryltct, orderNumber), typeof(Point)); Point rtct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryrtct, orderNumber), typeof(Point)); int distype = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrydistype, orderNumber), typeof(int)); DRWObj.CONPONT lttp = (DRWObj.CONPONT)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrylttp, orderNumber), typeof(DRWObj.CONPONT)); DRWObj.CONPONT rttp = (DRWObj.CONPONT)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryrttp, orderNumber), typeof(DRWObj.CONPONT)); this.Rtlist = new ArrayList(); this.Ltlist = new ArrayList(); this.Drwobj = new DRWCon(ltct, rtct, DRWObj.CONPONT.LtCt, DRWObj.CONPONT.RtCt, this); this.Drwobj.Stype = lttp; this.Drwobj.Etype = rttp; this.Drwobj.Distype = distype; base.LoadFromStream(info, orderNumber); }
public override Point GetConPoint(DRWObj.CONPONT cptype) { Point rpoint = new Point(0, 0); switch (cptype) { case DRWObj.CONPONT.CtCt: rpoint = ctct; break; case DRWObj.CONPONT.LtUp: rpoint = ltup; break; case DRWObj.CONPONT.RtUp: rpoint = rtup; break; case DRWObj.CONPONT.CtDn: rpoint = ctdn; break; case DRWObj.CONPONT.CtUp: rpoint = new Point(ctct.X, ltup.Y); break; case DRWObj.CONPONT.AnCh: rpoint = anch; break; } return(rpoint); }
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 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 override Point GetConPoint(DRWObj.CONPONT cptype) { Point rpoint = new Point(0, 0); switch (cptype) { case DRWObj.CONPONT.CtCt: rpoint = ctct; break; case DRWObj.CONPONT.RtCt: rpoint = new Point(operation.Right, ctct.Y); break; case DRWObj.CONPONT.LtCt: rpoint = new Point(operation.Left, ctct.Y); break; case DRWObj.CONPONT.CtDn: rpoint = new Point(ctct.X, operation.Bottom); break; case DRWObj.CONPONT.CtUp: rpoint = new Point(ctct.X, operation.Top); break; case DRWObj.CONPONT.AnCh: rpoint = anch; break; } return(rpoint); }
public override Point GetConPoint(DRWObj.CONPONT cptype) { Point rpoint = new Point(0, 0); switch (cptype) { case DRWObj.CONPONT.CtCt: rpoint = ctct; // 중간 break; case DRWObj.CONPONT.LtCt: rpoint = new Point(calrect.Left, ctct.Y); // 왼쪽 중간 break; case DRWObj.CONPONT.RtCt: rpoint = new Point(calrect.Right, ctct.Y); // 오른쪽 중간 break; case DRWObj.CONPONT.CtUp: rpoint = new Point(ctct.X, calrect.Top); // 위쪽 중간 break; case DRWObj.CONPONT.CtDn: rpoint = new Point(ctct.X, calrect.Bottom - 2); // 아래쪽 중간 break; case DRWObj.CONPONT.LtUp: rpoint = new Point(calrect.X, calrect.Y); // 왼쪽 모서리 break; case DRWObj.CONPONT.RtUp: rpoint = new Point(calrect.Right, calrect.Y); // 오른쪽 모서리 break; case DRWObj.CONPONT.RtDn: rpoint = new Point(calrect.Right, calrect.Bottom - 4); // 오른쪽 아래 모서리 break; case DRWObj.CONPONT.LtDn: rpoint = new Point(calrect.X, calrect.Bottom); // 왼쪽 아래 break; case DRWObj.CONPONT.AnCh: rpoint = anch; break; } return(rpoint); }
public void Init() { sobj = null; eobj = null; spoint = new Point(0, 0); epoint = new Point(0, 0); cpoint = new Point(0, 0); connecting = false; conguiding = false; sptype = DRWObj.CONPONT.NULL; eptype = DRWObj.CONPONT.NULL; }
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; } }
private void GetConObjType() { bool switched = false; if (this.sptype == DRWObj.CONPONT.LtCt || this.sptype == DRWObj.CONPONT.CtUp) { switched = true; } if (switched) { FLOObj tmpobj = this.Sobj; this.Sobj = this.Eobj; this.Eobj = tmpobj; DRWObj.CONPONT tmptype = this.sptype; this.sptype = this.eptype; this.eptype = tmptype; } }
public override void LoadFromStream(SerializationInfo info, int orderNumber) { Point ctct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryctct, orderNumber), typeof(Point)); Point ltct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryltct, orderNumber), typeof(Point)); Point rtct = (Point)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryrtct, orderNumber), typeof(Point)); int distype = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrydistype, orderNumber), typeof(int)); DRWObj.CONPONT lttp = (DRWObj.CONPONT)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrylttp, orderNumber), typeof(DRWObj.CONPONT)); DRWObj.CONPONT rttp = (DRWObj.CONPONT)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryrttp, orderNumber), typeof(DRWObj.CONPONT)); this.Uplist = new ArrayList(); this.Dnlist = new ArrayList(); this.Drwobj = new DRWCon(ltct, rtct, DRWObj.CONPONT.LtCt, DRWObj.CONPONT.RtCt, this); this.Drwobj.Stype = lttp; this.Drwobj.Etype = rttp; this.Drwobj.Distype = distype; base.LoadFromStream(info, orderNumber); }
public override Point GetConPoint(DRWObj.CONPONT cptype) { Point rpoint = new Point(0, 0); switch (cptype) { case DRWObj.CONPONT.CtCt: rpoint = ctct; break; case DRWObj.CONPONT.LtCt: rpoint = ltct; break; case DRWObj.CONPONT.RtCt: rpoint = rtct; break; } return(rpoint); }
public DRWCon(Point spt, Point ept, DRWObj.CONPONT stp, DRWObj.CONPONT etp, FLOObj owner) { this.Owner = owner; ltct = spt; rtct = ept; lttp = stp; rttp = etp; ctct = new Point((int)(ltct.X + rtct.X) / 2, (int)(ltct.Y + rtct.Y) / 2); if (Owner.Objtype == (FLOObj.OBJTYPE.B2C | FLOObj.OBJTYPE.O2C | FLOObj.OBJTYPE.R2O)) { this.distype = 2; } else if (Owner.Objtype == FLOObj.OBJTYPE.C2R) { this.distype = 3; } else { this.distype = 1; } }
public virtual Point GetConPoint(DRWObj.CONPONT cptype) { Point rpoint = new Point(0, 0); return(rpoint); }
public override Point GetConPoint(DRWObj.CONPONT cptype) { Point rpoint = new Point(0, 0); return(rpoint); }