Exemple #1
0
        public void AddRunTimeEvent(string eventName, string subName)
        {
            try
            {
                switch (eventName)
                {
                case "gotfocus":
                    this.delGotFocus = (b4p.del0) this.b4p.htSubs[(object)subName];
                    this.GotFocus   += new EventHandler(this.GotFocusEvent);
                    break;

                case "lostfocus":
                    this.delLostFocus = (b4p.del0) this.b4p.htSubs[(object)subName];
                    this.LostFocus   += new EventHandler(this.LostFocusEvent);
                    break;

                case "keypress":
                    this.delKeyPress = (b4p.del1) this.b4p.htSubs[(object)subName];
                    this.KeyPress   += new KeyPressEventHandler(this.KeyPressEvent);
                    break;
                }
            }
            catch
            {
                throw new Exception("Error assigning event to " + this.name.Remove(0, 1) + ".\nCheck the number of arguments of each event sub.");
            }
        }
Exemple #2
0
 public void AddEvents()
 {
     try
     {
         if (this.b4p.htSubs.Contains((object)(this.name + "_gotfocus")))
         {
             this.delGotFocus = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_gotfocus")];
             this.GotFocus   += new EventHandler(this.GotFocusEvent);
         }
         if (this.b4p.htSubs.Contains((object)(this.name + "_lostfocus")))
         {
             this.delLostFocus = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_lostfocus")];
             this.LostFocus   += new EventHandler(this.LostFocusEvent);
         }
         if (!this.b4p.htSubs.Contains((object)(this.name + "_keypress")))
         {
             return;
         }
         this.delKeyPress = (b4p.del1) this.b4p.htSubs[(object)(this.name + "_keypress")];
         this.KeyPress   += new KeyPressEventHandler(this.KeyPressEvent);
     }
     catch
     {
         throw new Exception("Error assigning event to " + this.name.Remove(0, 1) + ".\nCheck the number of arguments of each event sub.");
     }
 }
 private void CloseEvent()
 {
     this.cancelClose = false;
     this.delClose    = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_close")];
     this.b4p.sender  = this.name;
     string str = this.delClose();
 }
 public void AddEvents()
 {
     try
     {
         if (this.b4p.htSubs.Contains((object)(this.name + "_click")))
         {
             this.delClick = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_click")];
             this.Click   += new EventHandler(this.ClickEvent);
         }
         if (this.b4p.htSubs.Contains((object)(this.name + "_buttondown")))
         {
             this.delMouseDown = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_buttondown")];
             this.MouseDown   += new MouseEventHandler(this.MouseDownEvent);
         }
         if (!this.b4p.htSubs.Contains((object)(this.name + "_buttonup")))
         {
             return;
         }
         this.delMouseUp = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_buttonup")];
         this.MouseUp   += new MouseEventHandler(this.MouseUpEvent);
     }
     catch
     {
         throw new Exception("Error assigning event to " + this.name.Remove(0, 1) + ".\nCheck the number of arguments of each event sub.");
     }
 }
 public void AddRunTimeEvent(string eventName, string subName)
 {
     switch (eventName)
     {
     case "tick":
         this.delTick = (b4p.del0) this.b4p.htSubs[(object)subName];
         this.Tick   += new EventHandler(this.TickEvent);
         break;
     }
 }
 public void AddEvents()
 {
     try
     {
         if (!this.b4p.htSubs.Contains((object)(this.name + "_tick")))
         {
             return;
         }
         this.delTick = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_tick")];
         this.Tick   += new EventHandler(this.TickEvent);
     }
     catch
     {
         throw new Exception("Error assigning event to " + this.name.Remove(0, 1) + ".\nCheck the number of arguments of each event sub.");
     }
 }
 public void AddRunTimeEvent(string eventName, string subName)
 {
     try
     {
         switch (eventName)
         {
         case "click":
             this.delClick = (b4p.del0) this.b4p.htSubs[(object)subName];
             this.Click   += new EventHandler(this.ClickEvent);
             break;
         }
     }
     catch
     {
         throw new Exception("Error assigning event to " + this.name.Remove(0, 1) + ".\nCheck the number of arguments of each event sub.");
     }
 }
        public void AddRunTimeEvent(string eventName, string subName)
        {
            switch (eventName)
            {
            case "click":
                this.delClick = (b4p.del0) this.b4p.htSubs[(object)subName];
                this.Click   += new EventHandler(this.ClickEvent);
                break;

            case "buttondown":
                this.delMouseDown = (b4p.del0) this.b4p.htSubs[(object)subName];
                this.MouseDown   += new MouseEventHandler(this.MouseDownEvent);
                break;

            case "buttonup":
                this.delMouseUp = (b4p.del0) this.b4p.htSubs[(object)subName];
                this.MouseUp   += new MouseEventHandler(this.MouseUpEvent);
                break;
            }
        }
 private void ShowEvent()
 {
     this.delShow    = (b4p.del0) this.b4p.htSubs[(object)(this.name + "_show")];
     this.b4p.sender = this.name;
     string str = this.delShow();
 }