Cosmos
Cosmos copied to clipboard
Builder Confirmation Window
When closing builder during compile maybe we should add a Close confirmation as currently it is possible to accidently close builder while it is compiling.
One would need something to catch the Close event on the builder window and check to see if all steps are done, but that shouldn't be hard to do.
Personally, I haven't really delved into the UI source of the current builder (only steps like cloning the Git repos) as it's using WPF AFAIK (which I'm still yet to make any app using that framework) but something like this would be a good place to start: https://stackoverflow.com/questions/3683450/handling-the-window-closing-event-with-wpf-mvvm-light-toolkit
This shouldn't be difficult. I don't think we are using mvvm in the builder. It is wpf, but we are using old school events iirc. I think there is an Exit or Close event on the window. You can add a variable to be set after the installer launch step that can prevent the window close event from completing.
On May 19, 2021, at 5:56 PM, Arawn Davies @.***> wrote:
One would need something to catch the Close event on the builder window and check to see if all steps are done, but that shouldn't be hard to do.
Personally, I haven't really delved into the UI source of the current builder (only steps like cloning the Git repos) as it's using WPF AFAIK (which I'm still yet to make any app using that framework) but something like this would be a good place to start: https://stackoverflow.com/questions/3683450/handling-the-window-closing-event-with-wpf-mvvm-light-toolkit
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I would try to help or something but I don't even know where is the file I would edit.
Found it.
Together with ProfessorDJ on discord, I looked into this. The WPF framework we are using WPFUI currently has a bug, which makes it impossible to suppress the closing event. So fixing the issue is currently blocked by https://github.com/lepoco/wpfui/issues/122