public Form1() { InitializeComponent(); CustomEvent.Click += new EventHandler(customButtonClick);//This links our custom event to a new EventHandler and then adds it to a button we have created. clickEvent += new clickDelegate(newCustomClickEvent);//Creates a new event from our delegate. clickEvent();//Fires our new event. }
public void activate(LetterTileModel _model, clickDelegate _callBack) { model = _model; letterValueText.text = model.getLetterValue().ToString().ToUpper(); gameObject.SetActive(true); setRotation(0); if (clickEvent == null) { clickEvent += _callBack; } }
public void setHotkey(Keys[] a_key, clickDelegate a_method) { m_clickEvent = new Button.clickDelegate(a_method); m_hotkey = a_key; }