Write me some code that ensures that there is only one running instance of an Avalonia…
Jump to turn (15)
- 1Write me some code that ensures that there is only one running instance of an Av
- 2Nice, but how do you bring the running instance to the foreground if there is on
- 3What do you think about solving this with an EventWaitHandle?
- 4How to bring the running instance to the foreground with this method?
- 5How about just using EventWaitHandler.Set() to notify the other instance?
- 6I think the code that brings the window to the foreground is unreachable because
- 7I think the code that brings the window to the foreground should be executed in
- 8Shouldn't waitHandle.WaitOne() be called in a loop within the Task?
- 9How about using "while (waitHandle.WaitOne())"?
- 10That looks nice, thank you :)
- 11One last question, which of all these methods to prevent multiple instances and
- 12Between the EventWaitHandle and the NamedPipe, which is preferrable to send mess
- 13Ok, I think EventWaitHandle is the right choice for me.
- 14Do you think you can improve the last code sample a bit more or is it already pe
- 15Thank you very much :)
- User
Write me some code that ensures that there is only one running instance of an Avalonia application
- Assistant