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."); } }
public void AddRunTimeEvent(string eventName, string subName) { try { switch (eventName) { case "mousedown": this.delMouseDown = (b4p.del2) this.b4p.htSubs[(object)subName]; this.MouseDown += new MouseEventHandler(this.MouseDownEvent); break; case "mousemove": this.delMouseMove = (b4p.del2) this.b4p.htSubs[(object)subName]; this.MouseMove += new MouseEventHandler(this.MouseMoveEvent); break; case "mouseup": this.delMouseUp = (b4p.del2) this.b4p.htSubs[(object)subName]; this.MouseUp += new MouseEventHandler(this.MouseUpEvent); break; case "keypress": this.delKeyDown = (b4p.del1) this.b4p.htSubs[(object)subName]; this.KeyDown += new KeyEventHandler(this.KeyDownEvent); 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) { 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."); } }
public void AddEvents() { try { if (this.b4p.htSubs.Contains((object)(this.name + "_mousedown"))) { this.delMouseDown = (b4p.del2) this.b4p.htSubs[(object)(this.name + "_mousedown")]; this.MouseDown += new MouseEventHandler(this.MouseDownEvent); } if (this.b4p.htSubs.Contains((object)(this.name + "_mousemove"))) { this.delMouseMove = (b4p.del2) this.b4p.htSubs[(object)(this.name + "_mousemove")]; this.MouseMove += new MouseEventHandler(this.MouseMoveEvent); } if (this.b4p.htSubs.Contains((object)(this.name + "_mouseup"))) { this.delMouseUp = (b4p.del2) this.b4p.htSubs[(object)(this.name + "_mouseup")]; this.MouseUp += new MouseEventHandler(this.MouseUpEvent); } if (!this.b4p.htSubs.Contains((object)(this.name + "_keypress"))) { return; } this.delKeyDown = (b4p.del1) this.b4p.htSubs[(object)(this.name + "_keypress")]; this.KeyDown += new KeyEventHandler(this.KeyDownEvent); } catch { throw new Exception("Error assigning event to " + this.name.Remove(0, 1) + ".\nCheck the number of arguments of each event sub."); } }