This was WAY harder than it needed to be, as the loading window runs in a separate thread. It does a bit of trickery to get it to work reliably, but now it works ok. I really should be factoring the work into a background thread rather than running it in the UI thread, but that's something I'll revisit when I rebuild it under .net 6.0 and MAUI.
Finally tested the process launching, and finally managed to get it working! THis has been quite a lot of problems to get right, so pretty happy it's all working.
Tried to remove the unneeded bits of the ProcessUtils module, and to streamline the process monitoring process to make it sane, and have code only live in one place. I also wanted to make use of the TryExecute_Impersonated if possible. I hope I've done that all today!
The previous launching process just didn't work! It's the last outstanding thing I've got to sort out, so trying a new process launching method as used within MediaPortal project.
The game imagelistview wasn't showing the correct selected item when loading an existing shortcut into the shortcutform after creating a new shortcut. This is now fixed and displays correctly.
Did a HUGE amount of testing with the amazing help of @domenic as part of #41, and we finally got the right configuration sorted out! This update is a reflection of the changes required.
With the recent changes to the way that ShortcutForm worked, I had left a logic check that was no longer needed, an in fact actually caused an Autoname bug. Now fixed.
Added empty DisplayConfig dictionary and CustomDisplays list to the Display Profiles JSON format, as I'm going to need it in a while when I add the integer scaling.
I have completely rewritten the process creation logic for the start programs to handle launchers, and applications that require higher level privileges. It doesn't quite handle asking for UAC if the programn requires it, but that's something I can add at a later date. At the moment it seems to work a lot more reliably than the last set of code.