Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

Builder Confirmation Window

Open KM198912 opened this issue 4 years ago • 5 comments

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.

KM198912 avatar Apr 17 '21 20:04 KM198912

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

Arawn-Davies avatar May 19 '21 22:05 Arawn-Davies

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.

charlesbetros avatar May 19 '21 23:05 charlesbetros

I would try to help or something but I don't even know where is the file I would edit.

penguin-number-123 avatar Apr 28 '22 22:04 penguin-number-123

Found it.

penguin-number-123 avatar Apr 28 '22 22:04 penguin-number-123

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

quajak avatar May 01 '22 08:05 quajak