ermig1979 / AntiDupl

A program to search similar and defect pictures on the disk
https://ermig1979.github.io/AntiDupl
MIT License
1.28k stars 93 forks source link

Make the ProgressDialog more readable #166

Closed gismo2004 closed 1 year ago

gismo2004 commented 1 year ago

Update progress bar and dialog

heinrichI commented 1 year ago

Why dialog not closed after search? image

Edi61 commented 1 year ago

I can confirm, there seem to be an error in implementation. Please fix it.

gismo2004 commented 1 year ago

fixed

Edi61 commented 1 year ago

(I cannot confirm, still same. Problem is not related to closing, issue seems related to "Stopped".) -> Wrong Info

gismo2004 commented 1 year ago

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.

Edi61 commented 1 year ago

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.

heinrichI commented 1 year ago

@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;
gismo2004 commented 1 year ago

Remove the code, run the program, close the dialog by clicking the win32 close button (right corner X) --> then you know...

heinrichI commented 1 year ago

@gismo2004 and? https://user-images.githubusercontent.com/7752557/225687593-6baf62a6-f49c-4cd9-90ed-6dc6164b9ec6.mp4

gismo2004 commented 1 year ago

😂... Check your cpu load...

https://user-images.githubusercontent.com/2325636/225702711-544f0e34-91f9-4074-ae3e-6f5e4f5e96e0.mp4

heinrichI commented 1 year ago

@gismo2004 I got you.