private void Plugin01Event(UltraKitEvent e) { string sendPluginName = "Unknow"; string receivePluginName = "Unknow"; PlugInAttributes pa = PlugInContext.Instance.GetPlugIn(e.SenderID); if (pa != null) { sendPluginName = pa.PluginName; } pa = PlugInContext.Instance.GetPlugIn(m_pluginId); if (pa != null) { receivePluginName = pa.PluginName; } string customData = ""; foreach (string data in e.CustomData) { customData += data; } string msg = string.Format("Send PluginName: {0} \r\nEventName: {1}\r\nReceive PluginName: {2}\r\nData: {3}.", sendPluginName, e.EventName, receivePluginName, customData); m_UserControl.SetEventMessage(msg); }
private void SendMsg() { UltraKitEvent testEvent = new UltraKitEvent(); testEvent.SenderID = m_DemoPlugin.PlugID; testEvent.EventName = "ULTRAKIT_PLUGIN_EVENT_TEST_01"; testEvent.CustomData.Add("Hello, I'm plug02!"); EventManager.Instance.SendEvent(testEvent); }
private void buttonSendEvent_Click(object sender, EventArgs e) { // Send Event //DemoEvent dEvent = new DemoEvent(); UltraKitEvent testEvent = new UltraKitEvent(); testEvent.SenderID = m_DemoPlugin.PlugID; testEvent.EventName = "ULTRAKIT_PLUGIN_EVENT_TEST_02"; testEvent.CustomData.Add("Hello, I'm plug01!"); EventManager.Instance.SendEvent(testEvent); //m_fmwkCoreRef.SendEvent(dEvent); }