I am trying to emulate the common cad function:-
Point pt = getpoint();
The function prompts the user to pick a point and the coordinates of the picked point are returned.
I am trying to figure out how to pause the function while it waits for the user to pick the point so that it can return it when the function completes. I think the solution lies in threading and using WaitEvent signals. The difficulty is that the getpoint()
method will be called from a button on the Windows form i.e. the UIThread. But I cannot put a Wait instruction on the UIThread, otherwise the pick point event which is also on the UITread will never be triggered. This is a common feature of CAD where
command is started and the program pauses for user input and then responds and waits for more input. How is this achieved when the command and response are all apparently on the UIThread?
View Complete Post