/// <summary> /// 新增BP /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsm_AddBPEntity_Click(object sender, EventArgs e) { if (this._currentProjNode == null || this._currentProjNode.NodeType != NodeType.BPProj) { MessageBox.Show("请选择一个BP工程"); } else { ComponentTreeNode tn = new ComponentTreeNode(NodeType.BPEntity, Guid.NewGuid().ToString()); tn.Text = "新增BP"; tn.ImageIndex = tn.SelectedImageIndex = 2; BPEntity entity = new BPEntity(this._currentProj as BPProj, tn.Guid, string.Empty); if (this._bindDataNode.NodeType == NodeType.Floder) { entity.FloderGuid = this._bindDataNode.Guid; } entity.Code = string.Empty; entity.Name = string.Empty; if (this._bindDataNode.NodeType == NodeType.Floder) { entity.FloderGuid = this._bindDataNode.Guid; } entity.ReturnName = entity.ReturnProxyName = "void"; entity.ReturnGuid = string.Empty; this._currentProj.EntityList.Add(entity); this._bindDataNode.Nodes.Add(tn); this.groupBox3.Enabled = true; this.dataGridView1.Rows.Clear(); this.tvProject.SelectedNode = tn; } }
public BuildBPAgent(BPEntity entity) { _entity = entity; _namespace = entity.Proj.Namespace + ".Agent"; _bpNamespace = entity.Proj.Namespace; }
public BPColumn(string guid, BPProj proj, BPEntity entity) : base(guid) { this._guid = guid; this._proj = proj; this._entity = entity; this.DataState = DataState.Add; }
public override void FromXML(XmlNode node) { this.DataState = DataState.UnChanged; this.Namespace = node.Attributes["namespace"].Value; this._guid = node.Attributes["Guid"].Value; this.ProjName = node.Attributes["Name"].Value; this.IsService = false; if (node.Attributes["SVC"] != null) { this.IsService = (node.Attributes["SVC"].Value == "1" ? true : false); } this.DataState = DataState.Update; this.EntityList.Clear(); this.FloderList.Clear(); this.DTOList.Clear(); this.EnumList.Clear(); this.RefrenceList.Clear(); XmlNodeList nodeList = node.SelectNodes("RefrenceList/Refrence"); if (nodeList != null) { foreach (XmlNode n in nodeList) { ProjectRefrence projRef = new ProjectRefrence(this, string.Empty, string.Empty); projRef.FromXML(n); this.RefrenceList.Add(projRef); } } nodeList = node.SelectNodes("BPList/BP"); //查找当前工程文件下所有的实体 if (nodeList != null) { foreach (XmlNode n in nodeList) { BPEntity entity = new BPEntity(this, string.Empty, string.Empty); entity.FromXML(n); this.EntityList.Add(entity); } } this.FloderList.AddRange(this.LoadFloderList(node)); nodeList = node.SelectNodes("DTOList/DTO"); if (nodeList != null) { foreach (XmlNode n in nodeList) { DTOEntity dtoEntity = new DTOEntity(this, string.Empty, string.Empty); dtoEntity.FromXML(n); this.DTOList.Add(dtoEntity); } } nodeList = node.SelectNodes("EnumList/Enum"); if (nodeList != null) { foreach (XmlNode n in nodeList) { EnumEntity enumEntity = new EnumEntity(this, string.Empty, string.Empty); enumEntity.FromXML(n); this.EnumList.Add(enumEntity); } } this.IsChanged = false; }
public BuildBP(BPEntity entity) { _entity = entity; _namespace = entity.Proj.Namespace; }