Skip to content
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

Fix for Issue #23 #27

Merged
merged 2 commits into from
Feb 17, 2017
Merged

Fix for Issue #23 #27

merged 2 commits into from
Feb 17, 2017

Conversation

benedikt257
Copy link
Contributor

As described in Issue #23 RWC stops looking for wallpapers when finding a wallpaper from deviantart and then timing out on the HttpWebRequest that checks whether the url links to an image file.

As far as I can tell, this is due to the Timer breakBetweenChange being restarted in a BackgroundWorker's thread with no effect on the main thread. This commit fixes that by adding a method that invokes a Timer from the main thread.
I replaced all .Enabled = true; calls that were made from DoWork delegates in setWallpaper and changeWallpaper.

I have been running RWC for a few hours now with wallpaper changes every minute and so far I have not noticed any stops in the cycle.

I have not fixed RWC not being able to fetch deviantart wallpapers yet, I leave that to @Rawns ;-)

Restarting a System.Windows.Forms.Timer does not always work when using
a BackgroundWorker.
Added method restartTimer that takes a System.Windows.Forms.Timer and
sets it to true from the main thread
@Rawns Rawns merged commit 41cc6b3 into Rawns:Development Feb 17, 2017
@Rawns Rawns self-requested a review February 17, 2017 12:43
@Rawns Rawns self-assigned this Feb 17, 2017
@Rawns Rawns added the Accepted label Feb 17, 2017
@Rawns Rawns added the Fixed label Aug 3, 2017
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.

None yet

2 participants