I am using Diagram.MouseDoubleClicked event and ClickSelectingTool.DiagramClicked event for tracking double click and click so as to get the node underneath the clicks.
There are two different logics I have to perform on both the clicks.
Unfortunately when I do double click or click the control goes to ClickSelectingTool.DiagramClicked.
Apologies. Thats a custom event I had added on DoMouseUp event.
Let me rephrase,
I am using Diagram.MouseDoubleClicked event and ClickSelectingTool.DoMouseUp event for tracking double click and click so as to get the node underneath the clicks but I see DoMouseUp is called even during the DoubleClick(DoMouseUp event is called twice)
A single click should always happen before a double click. Unless you want to wait after the first mouse up for a second mouse down and up to maybe happen, before you can decide that a double click cannot happen and therefore there will only be a single click.
I was pointing out that when a click happens, it is impossible to know if another click will happen again soon enough and close enough to count as a double click. (Same is true for distinguishing double clicks from triple clicks.) The only way to find out is to wait to see if a double click did not happen. The easiest way to do that is to have the click handler set a timer that waits until a double click is supposed to have happened, and in the double click handler set a flag that a double click did happen. If in the timer event the flag hadn’t been set, then only a single click happened.