Skip to content

Commit

Permalink
autoset new wallpaper fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-mh committed Apr 5, 2019
1 parent 643ebe8 commit cd98f6c
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
12 changes: 6 additions & 6 deletions BingWallpaper/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="BingWallpaper.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="BingWallpaper.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<appSettings>
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="ClientSettingsProvider.ServiceUri" value=""/>
</appSettings>
<userSettings>
<BingWallpaper.Properties.Settings>
Expand All @@ -27,13 +27,13 @@
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
</providers>
</roleManager>
</system.web>
</configuration>
</configuration>
6 changes: 3 additions & 3 deletions BingWallpaper/BingWallpaper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>BingWallpaper</RootNamespace>
<AssemblyName>BingWallpaper</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
Expand Down Expand Up @@ -54,8 +54,8 @@
<ApplicationIcon>bing.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="RestSharp, Version=106.6.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.6.7\lib\net452\RestSharp.dll</HintPath>
<Reference Include="RestSharp, Version=106.6.9.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.6.9\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
6 changes: 3 additions & 3 deletions BingWallpaper/FormAbout.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions BingWallpaper/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions BingWallpaper/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public partial class FormMain : Form
private BingClient _bingClient;

private bool _exiting;
private DateTime _lastOpen;
private int _currentImage = 0;

public FormMain()
Expand All @@ -21,13 +20,13 @@ public FormMain()

_bingClient = new BingClient();
_exiting = false;
_lastOpen = DateTime.Now;
}

private void FormMain_Shown(object sender, EventArgs e)
{
SetFormLocation();
AttemptUpdate();
_currentImage = 0;

if(_bingClient.Images.Count > 0)
LoadPreview();
Expand Down Expand Up @@ -124,8 +123,7 @@ private void toolStripMenuItemExit_Click(object sender, EventArgs e)
private void toolStripMenuItemShow_Click(object sender, EventArgs e)
{
Visible = true;
SetFormLocation();
AttemptUpdate();
FormMain_Shown(sender, e);
}

private void buttonNext_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -171,7 +169,7 @@ private void timer_Tick(object sender, EventArgs e)
if(Properties.Settings.Default.AutomaticallySetNewWallpaper &&
_bingClient.Images[0].Hash != previousHash)
{
SetWallpaper(0, true);
_ = SetWallpaper(0, true);
}
}

Expand Down
12 changes: 6 additions & 6 deletions BingWallpaper/FormOptions.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions BingWallpaper/FormOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ private void FormOptions_Load(object sender, EventArgs e)
comboLocale.SelectedValue = Properties.Settings.Default.Locale;

checkBoxRunAtStartup.Checked = Properties.Settings.Default.RunAtStartup;
checkBoxAutomaticWallpaper.Checked = Properties.Settings.Default.AutomaticallySetNewWallpaper;
}

private void buttonOK_Click(object sender, EventArgs e)
Expand All @@ -85,6 +86,7 @@ private void buttonOK_Click(object sender, EventArgs e)
subkey.Close();
Properties.Settings.Default.Locale = comboLocale.SelectedValue.ToString();
Properties.Settings.Default.RunAtStartup = checkBoxRunAtStartup.Checked;
Properties.Settings.Default.AutomaticallySetNewWallpaper = checkBoxAutomaticWallpaper.Checked;
Properties.Settings.Default.Save();
Close();
}
Expand Down
2 changes: 1 addition & 1 deletion BingWallpaper/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BingWallpaper/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BingWallpaper/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RestSharp" version="106.6.7" targetFramework="net461" />
<package id="RestSharp" version="106.6.9" targetFramework="net472" />
</packages>

0 comments on commit cd98f6c

Please sign in to comment.