Пример #1
0
 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;
     }
 }
Пример #2
0
 private void OnClicked(MailboxItem itemView)
 {
     Pick?.Invoke(itemView.Item);
 }
Пример #3
0
 void OnMouseLeftButtonUp(object sender, MouseEventArgs e)
 {
     Pick?.Invoke(this, new EventArgs());
 }
Пример #4
0
 private void MyPicker_OnPickColor(Color color)
 {
     Pick?.Invoke(color);
     this.Close();
 }