private static void Button_Click(object sender, EventArgs e) { Cosmos.Wormhole session = null; if (Cosmos.Hubble.Wormholes.TryGetValue(sender, out session)) { Button button = sender as Button; if (button != null) { session.InsertString("msgID", "FIRE_EVENT"); session.InsertString("currentsubobj", button.Name); session.InsertString("currentevent", "OnClick@" + button.Name); session.SendMessage(); } } }
private void ThisNode_OnBindCLRObjToWebPage(object SourceObj, Cosmos.Wormhole eventSession, string eventName) { switch (eventName) { case "OnMyEvent": if (SourceObj is UserControl2 userControl2) { userControl2.MyEvent += UserControl2_MyEvent; } break; default: break; } }
private static void Tangram_OnBindCLRObjToWebPage(object SourceObj, Cosmos.Wormhole eventSession, string eventName) { switch (eventName) { case "OnClick": Button button = SourceObj as Button; if (button != null) { button.Click += Button_Click; } break; default: break; } }
private static void Tangram_OnBindCLRObjToWebPage(object SourceObj, Cosmos.Wormhole eventWormhole, string eventName) { switch (eventName) { case "OnClick": Button button = SourceObj as Button; if (button != null) { button.Click += Button_Click; } break; case "OnAfterSelect": TreeView treeView = SourceObj as TreeView; if (treeView != null) { treeView.AfterSelect += TreeView_AfterSelect; } break; default: break; } }
private static void Tangram_OnTangramCloudMsgReceived(Cosmos.Wormhole cloudWormhole) { Console.WriteLine("msgID: " + cloudWormhole.GetString("msgID")); }