Skip to content

Make the ProgressDialog more readable #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 7, 2023
Merged

Conversation

gismo2004
Copy link
Contributor

Update progress bar and dialog

@heinrichI
Copy link
Collaborator

Why dialog not closed after search?
image

@Edi61
Copy link
Collaborator

Edi61 commented Mar 5, 2023

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

@gismo2004
Copy link
Contributor Author

fixed

@Edi61
Copy link
Collaborator

Edi61 commented Mar 5, 2023

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

@gismo2004
Copy link
Contributor Author

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
Copy link
Collaborator

Edi61 commented Mar 5, 2023

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.

@ermig1979 ermig1979 merged commit d356d56 into ermig1979:master Mar 7, 2023
}
base.OnClosing(e);

//find out, if the close button was pressed or if the window was closed by win.close()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is bad practise write anything in window file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not! It depends on what has to be done!

@heinrichI
Copy link
Collaborator

@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
Copy link
Contributor Author

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

@gismo2004
Copy link
Contributor Author

gismo2004 commented Mar 16, 2023

😂... Check your cpu load...

2023-03-16_18-24-46.mp4

@heinrichI
Copy link
Collaborator

@gismo2004 I got you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants