Example #1
0
 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();
         }
     }
 }
Example #2
0
        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;
            }
        }
Example #3
0
        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;
            }
        }
Example #4
0
        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;
            }
        }
Example #5
0
 private static void Tangram_OnTangramCloudMsgReceived(Cosmos.Wormhole cloudWormhole)
 {
     Console.WriteLine("msgID: " + cloudWormhole.GetString("msgID"));
 }