private void tileControl1_RightItemClick(object sender, TileItemEventArgs e) { try { OnItemRightClick?.Invoke(sender, e); } catch (Exception ex) { MsgBox.ShowException(ex, this); } }
protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); if (!Enabled) { return; } var i = FindLedAtPoint(e.Location); if (i > -1) { if (e.Button == MouseButtons.Left) { _Leds[i].Selected = !_Leds[i].Selected; Invalidate(); } else if (e.Button == MouseButtons.Right) { var led = _Leds[i].Led.Color; OnItemRightClick?.Invoke(this, new LedStatusEventArgs(led, e.Location)); } } }
public void ItemRightClickEvent(ItemInstance itemInstance, Vector2 pos, string type) => OnItemRightClick?.Invoke(itemInstance, pos, type);