public CBase(String _Name, CBase _Parent, Object _Owner) { //isflash = false; Name = _Name; if (Name == null) { Name = ""; } Parent = _Parent; m_Owner = _Owner; Locked = false; Visible = true; Enabled = true; if (Parent != null) { m_Path = Parent.Path + "/" + Name; } //m_CartoonData = new CCartoonData; m_ElementType = LCElementType.POINTER; DrawPen = (Pen)(Pens.DeepSkyBlue.Clone()); m_fAngleAtPosition = 0; //FOnClick = new CProgram(); ////FOnDoubleClick = new CProgram(); //FOnMouseMoving = new CProgram(); //m_Layer = ((DrawChild )Owner).GetActiveLayer(); //m_LayerName = ""; Children = new ArrayList(); ReDians = new ArrayList(); FocusList = new ArrayList(); Points = new ArrayList(); fg = null; FDrawing = true; EditingReDian = false; myPathMatrix = new Matrix(); myGraphicsPath = new GraphicsPath(); SelectedDisWMargin = DISMARGIN; SelectedDisHMargin = DISMARGIN; //OnChangeName = null; //OnTransform = null; ObjectUndolst = new ArrayList(); UndoPointer = 0; FisLive = false; //FTimer = null; }
public static CBase CreateElement(String Name, LCElementType Type, CBase Parent, Object Owner) { //根据类型生成相应的元素对象 switch (Type) { case LCElementType.TEXT: return(new CText(Name, Parent, Owner)); case LCElementType.LINE: return(new CLine(Name, Parent, Owner)); case LCElementType.RECTANGLE: return(new CRectangle(Name, Parent, Owner)); case LCElementType.ELLIPS: return(new CEllips(Name, Parent, Owner)); case LCElementType.IMAGECONTROL: return(new ImageControl(Name, Parent, Owner)); //case LCElementType.ROUNDRECTANGLE: // return new CRoundRectangle(Name, Parent, Owner); //case LCElementType.ARC: // return new CArc(Name, Parent, Owner); //case LCElementType.GROUP: // return new CGroup(Name, Parent, Owner); //case LCElementType.POLYLINE: // return new CPolyLine(Name, Parent, Owner); /*case LCElementType.POLYGON: * return new CPolygon(Name,Parent,Owner); * case LCElementType.ARC: * return new CArc(Name,Parent,Owner); * case LCElementType.HISCURVECHART: * return new CCurveChart(LCElementType.HISCURVECHART,Name,Parent,Owner); * case LCElementType.REALCURVECHART: * return new CCurveChart(LCElementType.REALCURVECHART,Name,Parent,Owner); * case LCElementType.CHARGECURVECHART: * return new CCurveChart(LCElementType.CHARGECURVECHART,Name,Parent,Owner); * case LCElementType.TABLECONTROL: * return new CTable(Name,Parent,Owner); * //case LCElementType.PRG: * // return new CRectPRCG();*/ default: return(null); } }
public static void SetClassIndex(LCElementType index)//工具条选择。 { Type = index; }