private void glCanvas_MouseDown(object sender, MouseEventArgs e) { //右键:选择 if (e.Button == MouseButtons.Right) { Pick?.Invoke(e.X, e.Y);//事件触发 return; } //左键:平移 或 旋转 if (shiftPressed) { mousePressed = true; sp = e.Location; } else { mousePressed = true; sp = e.Location; } }
private void OnClicked(MailboxItem itemView) { Pick?.Invoke(itemView.Item); }
void OnMouseLeftButtonUp(object sender, MouseEventArgs e) { Pick?.Invoke(this, new EventArgs()); }
private void MyPicker_OnPickColor(Color color) { Pick?.Invoke(color); this.Close(); }