我对可能是一个简单的解决方案有疑问,但我只是没有做对。因此,如果我按下鼠标左键,我希望发生一些事情。
private void DrawingPanel_MouseClick(object sender, MouseEventArgs e)
{  
  if (e.Button == MouseButtons.Left)
  {
   //something happens
  }
}
所以,这很好用。但现在问题来了。现在我想检查点击事件中的更多点击(现在我考虑了一下,这是否可能?)像这样:
private void DrawingPanel_MouseClick(object sender, MouseEventArgs e)
{  
  if (e.Button == MouseButtons.Left)
  {
   //something happens
   //blabla...
   if (e.Button == MouseButtons.Left)
   {
    //Do something
   }
  }
}
这样的事情可能吗?因为第二个if (e.Button == MouseButtons.Left)总是正确的。我该怎么做才能让它不自动为真?