/// <summary> /// 事件基类 /// </summary> /// <returns></returns> public string Action_Init() { DataSet ds = new DataSet(); //事件实体. FrmEvents ndevs = new FrmEvents(); if (BP.DA.DataType.IsNullOrEmpty(this.FK_MapData) == false) { ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData); } ////已经配置的事件类实体. //DataTable dtFrm = ndevs.ToDataTableField("FrmEvents"); //ds.Tables.Add(dtFrm); //把事件类型列表放入里面.(发送前,发送成功时.) EventLists xmls = new EventLists(); xmls.Retrieve("EventType", this.ShowType); DataTable dt = xmls.ToDataTable(); dt.TableName = "EventLists"; ds.Tables.Add(dt); return(BP.Tools.Json.ToJson(ds)); }
/// <summary> /// Get the recieverBase types that contain event logic /// </summary> /// <returns></returns> public static EventLists GetEventTypes() { List <Type> eventTypes = new List <Type>(); List <string> names = new List <string>(); var assemblys = AppDomain.CurrentDomain.GetAssemblies(); foreach (var assembly in assemblys) { foreach (Type type in assembly.GetTypes()) { TypeInfo info = type.GetTypeInfo(); if (info.BaseType != null && info.BaseType.Equals(typeof(ReceiverBase))) { eventTypes.Add(type); names.Add(type.Name); } } } EventLists lists = new EventLists(); lists.EventTypes = eventTypes; lists.EventNames = names; return(lists); }
private void run(object obj) { while (true) { Thread.Sleep(60000); try { // cleanup while (EventLists.Count > 200) { EventLists.RemoveAt(0); } while (DeviceLogs.Count > 200) { DeviceLogs.RemoveAt(0); } // save data hashDevices = saveData(hashDevices, JsonConvert.SerializeObject(Devices), "devices"); hashDeviceLogs = saveData(hashDeviceLogs, JsonConvert.SerializeObject(DeviceLogs), "devicelogs"); hashEventLists = saveData(hashEventLists, JsonConvert.SerializeObject(EventLists), "eventlists"); hashJbalotrons = saveData(hashJbalotrons, JsonConvert.SerializeObject(Jablotrons), "jablotrons"); } catch { } } }
private void Initialize() { for (int i = 0; i < _actionCount; i++) { uint _crc = (uint)Util.GetWordUnsafe(_workingSource.Address + 0x10 + (i * 8), Endian); int _offset = Util.GetWordUnsafe((_workingSource.Address + 0x10 + (i * 8)) + 0x04, Endian); EventLists.Add(_crc, ParseEventList(_crc, _offset)); } }
private void RefreshAndAddAllEventTypes(EventLists events) { events.lists.Clear(); foreach (var guid in UnityEditor.AssetDatabase.FindAssets("t:EventList")) { var assetPath = UnityEditor.AssetDatabase.GUIDToAssetPath(guid); var asset = UnityEditor.AssetDatabase.LoadAssetAtPath <EventList>(assetPath); events.lists.Add(asset); } }
/// <summary> /// Create the event and setup the values from the inspector /// </summary> /// <param name="iEvent"></param> /// <param name="lists"></param> /// <returns></returns> public static ReceiverBase GetReceiver(InteractableEvent iEvent, EventLists lists) { int index = InspectorField.ReverseLookup(iEvent.ClassName, lists.EventNames.ToArray()); Type eventType = lists.EventTypes[index]; // apply the settings? ReceiverBase newEvent = (ReceiverBase)Activator.CreateInstance(eventType, iEvent.Event); InspectorGenericFields <ReceiverBase> .LoadSettings(newEvent, iEvent.Settings); return(newEvent); }
public ACMDFile(DataSource source) : this() { _workingSource = source; _actionCount = Util.GetWordUnsafe(source.Address + 0x08, Runtime.WorkingEndian); _commandCount = Util.GetWordUnsafe(source.Address + 0x0C, Runtime.WorkingEndian); for (int i = 0; i < _actionCount; i++) { uint _crc = (uint)Util.GetWordUnsafe(_workingSource.Address + 0x10 + (i * 8), Runtime.WorkingEndian); int _offset = Util.GetWordUnsafe((_workingSource.Address + 0x10 + (i * 8)) + 0x04, Runtime.WorkingEndian); EventLists.Add(_crc, ParseEventList(_crc, _offset)); } }
private void Awake() { if (!instance) { instance = this; if (!eventLists) { eventLists = Resources.Load <EventLists>("EventLists"); } DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
private void OnRebuild(VoidPtr address, int length) { // Remove empty event lists for (int i = 0; i < EventLists.Count; i++) { if (EventLists.Values[i].Empty) { EventLists.RemoveAt(i); } } VoidPtr addr = address; // Base address. (0x00) Util.SetWordUnsafe(address, 0x444D4341, Endianness.Little); // ACMD //==========================================================================// // Rebuilding Header and offsets // //==========================================================================// Util.SetWordUnsafe(address + 0x04, 2, Runtime.WorkingEndian); // Version (2) Util.SetWordUnsafe(address + 0x08, EventLists.Count, Runtime.WorkingEndian); int count = EventLists.Values.Sum(e => e.Count); Util.SetWordUnsafe(address + 0x0C, count, Runtime.WorkingEndian); addr += 0x10; //===============Write Event List offsets and CRC's=================// for (int i = 0, prev = 0; i < EventLists.Count; i++) { int dataOffset = 0x10 + (EventLists.Count * 8) + prev; Util.SetWordUnsafe(addr, (int)EventLists.Keys[i], Runtime.WorkingEndian); Util.SetWordUnsafe(addr + 4, dataOffset, Runtime.WorkingEndian); prev += EventLists.Values[i].Size; addr += 8; } // Write event lists at final address. foreach (ACMDScript e in EventLists.Values) { e.Rebuild(addr, e.Size); addr += e.Size; } }
void btn_Click(object sender, EventArgs e) { FrmEvent fe = new FrmEvent(); fe.MyPK = this.FK_MapData + "_" + this.Event; fe.RetrieveFromDBSources(); EventLists xmls = new EventLists(); xmls.RetrieveAll(); foreach (EventList xml in xmls) { if (xml.No != this.Event) { continue; } string doc = this.Pub2.GetTextBoxByID("TB_Doc").Text.Trim(); if (doc == "" || doc == null) { if (fe.MyPK.Length > 3) { fe.Delete(); } continue; } fe.MyPK = this.FK_MapData + "_" + xml.No; fe.DoDoc = doc; fe.FK_Event = xml.No; fe.FK_MapData = this.FK_MapData; fe.HisDoType = (EventDoType)this.Pub2.GetDDLByID("DDL_EventDoType").SelectedItemIntVal; fe.MsgOKString = this.Pub2.GetTextBoxByID("TB_MsgOK").Text; fe.MsgErrorString = this.Pub2.GetTextBoxByID("TB_MsgErr").Text; fe.Save(); this.Response.Redirect("Action.aspx?NodeID=" + this.NodeID + "&MyPK=" + fe.MyPK + "&Event=" + xml.No, true); return; } }
public ACMDFile(DataSource source) : this() { _workingSource = source; if (*(byte *)(source.Address + 0x04) == 0x02) { Endian = Endianness.Little; } else if ((*(byte *)(source.Address + 0x04) == 0x00)) { Endian = Endianness.Big; } ActionCount = Util.GetWordUnsafe(source.Address + 0x08, Endian); CommandCount = Util.GetWordUnsafe(source.Address + 0x0C, Endian); for (int i = 0; i < ActionCount; i++) { uint _crc = (uint)Util.GetWordUnsafe(_workingSource.Address + 0x10 + (i * 8), Endian); int _offset = Util.GetWordUnsafe((_workingSource.Address + 0x10 + (i * 8)) + 0x04, Endian); EventLists.Add(_crc, ParseEventList(_crc, _offset)); } }
public override void RegisterEvents() { EventLists.Add(FBConsts.E_SceneEnter); }
public override void ParseData(JObject data, int requestType = 0) { if (data["result"] != null) { JToken result = (JToken)data["result"]; switch (requestType) { case (int)TrainingReqType.GET_DETECTION_INFO: // Store actions lists // Training Action JArray jActionsArr = (JArray)result["actions"]; foreach (var item in jActionsArr) { ActionLists.Add((string)item); } // Training Control JArray jControlArr = (JArray)result["controls"]; foreach (var item in jControlArr) { ControlLists.Add((string)item); } // Training Events JArray jEventArr = (JArray)result["events"]; foreach (var item in jEventArr) { EventLists.Add((string)item); } break; case (int)TrainingReqType.CREATE_NEW_PROFILE: Console.WriteLine("Create Profile Successfully"); break; case (int)TrainingReqType.LOAD_PROFILE: IsLoaded = true; Console.WriteLine("Load Profile Successfully"); break; case (int)TrainingReqType.SAVE_PROFILE: Console.WriteLine("Save Profile Successfully"); break; case (int)TrainingReqType.UPLOAD_PROFILE: Console.WriteLine("Upload Profile Successfully"); break; case (int)TrainingReqType.QUERY_PROFILE_LIST: Console.WriteLine("Querry Profile Successfully"); JArray jProfileArr = (JArray)result; List <string> profileLists = new List <string>(); foreach (var item in jProfileArr) { profileLists.Add((string)item); } if (profileLists.Count > 0) { ProfileLists = profileLists.ToList(); } else { ProfileLists.Clear(); } break; case (int)TrainingReqType.MCC_START: case (int)TrainingReqType.MCC_ACCEPT: case (int)TrainingReqType.MCC_REJECT: case (int)TrainingReqType.MCC_RESET: Console.WriteLine("Mental Command Training: " + (string)result); break; case (int)TrainingReqType.FE_START: case (int)TrainingReqType.FE_ACCEPT: case (int)TrainingReqType.FE_REJECT: case (int)TrainingReqType.FE_RESET: Console.WriteLine("Facial Expression Training: " + (string)result); break; default: break; } } }
protected void Page_Load(object sender, EventArgs e) { if (this.DoType == "Del") { FrmEvent delFE = new FrmEvent(); delFE.MyPK = this.FK_MapData + "_" + this.Request.QueryString["RefXml"]; delFE.Delete(); } FrmEvents ndevs = new FrmEvents(); if (this.FK_MapData != null) { ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData); } EventLists xmls = new EventLists(); xmls.RetrieveAll(); BP.WF.XML.EventSources ess = new EventSources(); ess.RetrieveAll(); string myEvent = this.Event; BP.WF.XML.EventList myEnentXml = null; #region //生成事件列表 foreach (EventSource item in ess) { if (item.No == "Frm" && this.FK_MapData == null) { continue; } if (item.No == "Node" && string.IsNullOrEmpty(this.NodeID)) { continue; } if (item.No == "Flow" && string.IsNullOrEmpty(this.FK_Flow)) { continue; } Pub1.Add(string.Format("<div title='{0}' style='padding:10px; overflow:auto' data-options=''>", item.Name)); Pub1.AddUL("class='navlist'"); foreach (BP.WF.XML.EventList xml in xmls) { if (xml.EventType != item.No) { continue; } FrmEvent nde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, xml.No) as FrmEvent; if (nde == null) { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi( string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'>{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi( string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&tk={5}&FK_MapData={6}'><span class='nav'>{3}</span></a></div>{4}", NodeID, xml.No, FK_Flow, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } else { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi( string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'>{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi( string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&MyPK={3}&tk={6}&FK_MapData={6}'><span class='nav'>{4}</span></a></div>{5}", NodeID, xml.No, FK_Flow, nde.MyPK, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } } Pub1.AddULEnd(); Pub1.AddDivEnd(); } #endregion if (myEnentXml == null) { CurrentEvent = "帮助"; Pub2.Add("<div style='width:100%; text-align:center' data-options='noheader:true'>"); Pub2.AddH2("事件是ccflow与您的应用程序接口"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动的过程中会产生很多的事件,比如:节点发送前、发送成功时、发送失败时、退回前、退后后。"); this.Pub2.AddLi("在这些事件里ccflow允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccflow把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddULEnd(); Pub2.AddDivEnd(); return; } FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, myEvent) as FrmEvent; if (mynde == null) { mynde = new FrmEvent(); mynde.FK_Event = myEvent; } this.Title = "设置:事件接口=》" + myEnentXml.Name; this.CurrentEvent = myEnentXml.Name; int col = 50; Pub2.Add("<div id='tabMain' class='easyui-tabs' data-options='fit:true'>"); Pub2.Add("<div title='事件接口' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src1' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); if (myEnentXml.IsHaveMsg == true) { HaveMsg = true; Pub2.Add("<div title='向当事人推送消息' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src2' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); Pub2.Add("<div title='向其他指定的人推送消息' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src3' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); } //BP.WF.Dev2Interface.Port_Login("zhoupeng"); // BP.WF.Dev2Interface.Port_SigOut(); Pub2.Add("</div>"); }
protected void Page_Load(object sender, EventArgs e) { if (this.DoType == "Del") { FrmEvent delFE = new FrmEvent(); delFE.MyPK = this.FK_MapData + "_" + this.Request.QueryString["RefXml"]; delFE.Delete(); } FrmEvents ndevs = new FrmEvents(); if (this.FK_MapData != null) { ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData); } EventLists xmls = new EventLists(); xmls.RetrieveAll(); BP.WF.XML.EventSources ess = new EventSources(); ess.RetrieveAll(); string myEvent = this.Event; BP.WF.XML.EventList myEnentXml = null; #region //生成事件列表 foreach (EventSource item in ess) { if (item.No != this.ShowType) { continue; } Pub1.Add(string.Format("<div title='{0}' style='padding:10px; overflow:auto' data-options=''>", item.Name)); Pub1.AddUL("class='navlist'"); string msg = ""; foreach (BP.WF.XML.EventList xml in xmls) { if (xml.EventType != item.No) { continue; } msg = ""; if (xml.IsHaveMsg == true) { msg = "<img src='/WF/Img/Msg.png' />"; } FrmEvent nde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, xml.No) as FrmEvent; if (nde == null) { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi(string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi(string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&tk={5}&FK_MapData={6}'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{3}</span></a></div>{4}", NodeID, xml.No, FK_Flow, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } else { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi(string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi(string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&MyPK={3}&tk={6}&FK_MapData={7}'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{4}</span></a></div>{5}", NodeID, xml.No, FK_Flow, nde.MyPK, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } } Pub1.AddULEnd(); Pub1.AddDivEnd(); } #endregion if (myEnentXml == null) { CurrentEvent = "帮助"; this.Pub2.Add("<div style='width:100%; text-align:left' data-options='noheader:true'>"); this.Pub2.AddH2("事件是ccbpm与您的应用程序接口"); if (this.NodeID != "0") { this.Pub2.AddFieldSet("节点事件"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动过程中,有许多的事件,比如节点发送前、发送成功后、发送失败后、退回前、退回后、撤销发送前、这小发送后、流程结束前、结束后、删除前删除后。"); this.Pub2.AddLi("ccbpm把事件分为流程事件与节点事件,流程属性里定义流程事件,节点属性里定义节点事件。"); this.Pub2.AddLi("在这些事件里ccbpm允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccbpm把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddLi("在BPMN2.0规范里没有定义节点事件表单事件,这是ccbpm特有的概念与元素。"); this.Pub2.AddULEnd(); this.Pub2.AddFieldSetEnd(); } if (this.FK_Flow != null && this.NodeID == "0") { this.Pub2.AddFieldSet("流程事件"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动过程中,有许多的事件,比如节点发送前、发送成功后、发送失败后、退回前、退回后、撤销发送前、这小发送后、流程结束前、结束后、删除前删除后。"); this.Pub2.AddLi("ccbpm把事件分为流程事件与节点事件,流程属性里定义流程事件,节点属性里定义节点事件。"); this.Pub2.AddLi("在这些事件里ccbpm允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccbpm把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddLi("在BPMN2.0规范里定义了,流程发起事件,流程发起错误事件。在ccbpm里取消了这些概念,取而代之的是开始节点的发送前、发送失败时、发送成功时的事件与之对应。"); this.Pub2.AddULEnd(); this.Pub2.AddFieldSetEnd(); } if (this.FK_MapData != null && this.FK_MapData != "") { this.Pub2.AddFieldSet("表单事件"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动过程中,有许多的事件,比如节点发送前、发送成功后、发送失败后、退回前、退回后、撤销发送前、这小发送后、流程结束前、结束后、删除前删除后。"); this.Pub2.AddLi("ccbpm把事件分为流程事件与节点事件,流程属性里定义流程事件,节点属性里定义节点事件。"); this.Pub2.AddLi("在这些事件里ccbpm允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccbpm把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddLi("在BPMN2.0规范里定义了,流程发起事件,流程发起错误事件。在ccbpm里取消了这些概念,取而代之的是开始节点的发送前、发送失败时、发送成功时的事件与之对应。"); this.Pub2.AddULEnd(); this.Pub2.AddFieldSetEnd(); } this.Pub2.AddDivEnd(); return; } FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, myEvent) as FrmEvent; if (mynde == null) { mynde = new FrmEvent(); mynde.FK_Event = myEvent; } this.Title = "设置:事件接口=》" + myEnentXml.Name; this.CurrentEvent = myEnentXml.Name; Pub2.Add("<div id='tabMain' class='easyui-tabs' data-options='fit:true'>"); Pub2.Add("<div title='事件接口' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src1' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); /* 该模块jflow暂时不翻译,注释掉 by fanleiwei 20160531 * if (myEnentXml.IsHaveMsg == true) * { * HaveMsg = true; * Pub2.Add("<div title='向当事人推送消息' style='padding:5px'>" + Environment.NewLine); * Pub2.Add("<iframe id='src2' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); * Pub2.Add("</div>" + Environment.NewLine); * * Pub2.Add("<div title='向其他指定的人推送消息' style='padding:5px'>" + Environment.NewLine); * Pub2.Add("<iframe id='src3' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); * Pub2.Add("</div>" + Environment.NewLine); * } */ Pub2.Add("</div>"); }
protected void Page_Load(object sender, EventArgs e) { if (this.DoType == "Del") { FrmEvent delFE = new FrmEvent(); delFE.MyPK = this.FK_MapData + "_" + this.Request.QueryString["RefXml"]; delFE.Delete(); } this.Pub3.AddCaptionLeft("节点表单/节点/流程:事件"); FrmEvents ndevs = new FrmEvents(); ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData); EventLists xmls = new EventLists(); xmls.RetrieveAll(); BP.WF.XML.EventSources ess = new EventSources(); ess.RetrieveAll(); string myEvent = this.Event; BP.WF.XML.EventList myEnentXml = null; foreach (EventSource item in ess) { this.Pub1.AddFieldSet(item.Name); this.Pub1.AddUL(); foreach (BP.WF.XML.EventList xml in xmls) { if (xml.EventType != item.No) { continue; } FrmEvent nde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, xml.No) as FrmEvent; if (nde == null) { if (myEvent == xml.No) { myEnentXml = xml; this.Pub1.AddLi("<font color=green><b>" + xml.Name + "</b></font>"); } else { this.Pub1.AddLi("Action.aspx?NodeID=" + this.NodeID + "&Event=" + xml.No + "&FK_Flow=" + this.FK_Flow, xml.Name); } } else { if (myEvent == xml.No) { myEnentXml = xml; this.Pub1.AddLi("<font color=green><b>" + xml.Name + "</b></font>"); } else { this.Pub1.AddLi("Action.aspx?NodeID=" + this.NodeID + "&Event=" + xml.No + "&MyPK=" + nde.MyPK + "&FK_Flow=" + this.FK_Flow, "<b>" + xml.Name + "</b>"); } } } this.Pub1.AddULEnd(); this.Pub1.AddFieldSetEnd(); } if (myEnentXml == null) { this.Pub2.AddFieldSet("帮助"); this.Pub2.AddH2("事件是ccflow与您的应用程序接口,"); this.Pub2.AddFieldSetEnd(); return; } FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, myEvent) as FrmEvent; if (mynde == null) { mynde = new FrmEvent(); } this.Title = "设置:事件接口=》" + myEnentXml.Name; this.Pub2.AddFieldSet(myEnentXml.Name); int col = 80; this.Pub2.Add("内容类型:"); DDL ddl = new DDL(); ddl.BindSysEnum("EventDoType"); ddl.ID = "DDL_EventDoType"; ddl.SetSelectItem((int)mynde.HisDoType); this.Pub2.Add(ddl); this.Pub2.Add(" 要执行的内容<br>"); TextBox tb = new TextBox(); tb.ID = "TB_Doc"; tb.Columns = col; tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 10; tb.Text = mynde.DoDoc; this.Pub2.Add(tb); this.Pub2.AddBR(); tb = new TextBox(); tb.ID = "TB_MsgOK"; tb.Columns = col; tb.Text = mynde.MsgOKString; tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 4; this.Pub2.Add("执行成功信息提示(可为空)<br>"); this.Pub2.Add(tb); this.Pub2.AddBR(); this.Pub2.Add("执行失败信息提示(可为空)<br>"); tb = new TextBox(); tb.ID = "TB_MsgErr"; tb.Columns = col; tb.Text = mynde.MsgErrorString; tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 4; this.Pub2.Add(tb); this.Pub2.AddBR(); Button btn = new Button(); btn.ID = "Btn_Save"; btn.Text = "Save"; btn.CssClass = "Btn"; btn.Click += new EventHandler(btn_Click); this.Pub2.Add(" "); this.Pub2.Add(btn); if (this.MyPK != null) { this.Pub2.Add(" <a href=\"javascript:DoDel('" + this.NodeID + "','" + this.Event + "')\"><img src='/WF/Img/Btn/Delete.gif' />删除</a>"); } this.Pub2.AddFieldSetEnd(); }
public override void RegisterEvents() { EventLists.Add(FBConsts.E_ShowTowerCreat); EventLists.Add(FBConsts.E_ShowTowerUpgrade); EventLists.Add(FBConsts.E_TowerHide); }