Closed gismo2004 closed 1 year ago
Why dialog not closed after search?
I can confirm, there seem to be an error in implementation. Please fix it.
fixed
(I cannot confirm, still same. Problem is not related to closing, issue seems related to "Stopped".) -> Wrong Info
Ok, can't reproduce this, at least I don't know how. However, I need to have a closer look on how it is meant to work and will try to find a better way to close the dialog properly.
Hi @gismo2004 I rechecked it, now its closing, I have forgotten to update pull request sorry.
Ps.: Maybe not caused by your change, but I am wondering, that progress bar seems to be finished too early. In my example progress was 111 from 162. In the screenshot from @heinrichI it's 4211 from 4541. Update: I have checked it, it was same before, so not obligatory part of this PR.
@gismo2004 what this code do? Why is it needed?
//find out, if the close button was pressed or if the window was closed by win.close()
if (new StackTrace().GetFrames().FirstOrDefault(x => x.GetMethod() == typeof(Window).GetMethod("Close")) != null) return;
//if close button was pressed, cancel execution
var vm = (ProgressDialogViewModel)DataContext;
vm.CancelCommand.Execute(null);
e.Cancel = true;
Remove the code, run the program, close the dialog by clicking the win32 close button (right corner X) --> then you know...
😂... Check your cpu load...
https://user-images.githubusercontent.com/2325636/225702711-544f0e34-91f9-4074-ae3e-6f5e4f5e96e0.mp4
@gismo2004 I got you.
Update progress bar and dialog