예제 #1
0
 private void tileControl1_RightItemClick(object sender, TileItemEventArgs e)
 {
     try
     {
         OnItemRightClick?.Invoke(sender, e);
     }
     catch (Exception ex)
     {
         MsgBox.ShowException(ex, this);
     }
 }
예제 #2
0
        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));
                }
            }
        }
예제 #3
0
 public void ItemRightClickEvent(ItemInstance itemInstance, Vector2 pos, string type) => OnItemRightClick?.Invoke(itemInstance, pos, type);