private void clickItem(object obj, EventArgs args) { int pos = ui_items.IndexOf(obj as BunifuFlatButton); posSelectedItem = pos; ///Change color old if (uiitemSelectd != null) { uiitemSelectd.BackColor = uiitemSelectd.Normalcolor = yuhBackColorIdel; uiitemSelectd.Textcolor = uiitemSelectd.ForeColor = yuhTextColorIdel; uiitemSelectd.OnHovercolor = yuhBackColorHover; uiitemSelectd.OnHoverTextColor = yuhTextColorHover; uiitemSelectd.Activecolor = yuhBackColorActive; } ///Change color new BunifuFlatButton uiitem = ui_items[pos]; uiitem.BackColor = uiitem.Normalcolor = uiitem.OnHovercolor = yuhBackColorActive; uiitem.Textcolor = uiitem.ForeColor = yuhTextColorHover; uiitemSelectd = uiitem; ///Call event Object objselect = items[pos] as Object; if (YuhSelect != null) { YuhSelect.Invoke(objselect, args); } items[pos].OnSelect(objselect, args); }
public void OnSelect(Object obj, EventArgs args) { if (YuhSelect != null) { YuhSelect.Invoke(obj, args); } }