Cristi
Cristi
CC#
Created by Cristi on 12/28/2023 in #help
Background Worker giving exceptions.
Hey so I'm working on a File Manager in WPF and I'm trying to use a background worker to calculate file/directory sizes in the background so the application doesn't freeze. It does work but the main problem is that when a directory is getting calculated if the user selects another item while the background worker is running in the background it gives out an exception about how it cannot run multiple instances of itself at the same time so I added logic to cancel the previous background worker if another one is selected, I did everything from setting WorkerSupportsCancellation to true and adding logic to cancel it in the DoWork function and I tried everything from asking ChatGPT to browsing the entire Microsoft documentation about it and tried dozens upon dozens of diffrent solutions but NOTHING worked. At this point I am desperate and any help towards fixing this issue would mean THE WORLD to me. I have linked my MainWindow xaml file and cs file.
81 replies
CC#
Created by Cristi on 12/11/2022 in #help
❔ Arithmetic Sum help
17 replies