Skip to content

Commit 7f7489b

Browse files
committed
v1.6
1 parent dfd8a85 commit 7f7489b

16 files changed

+138
-77
lines changed

IMDbAPI_Client/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ DownloadSiteName2</value>
4141
<setting name="UseProxy" serializeAs="String">
4242
<value>False</value>
4343
</setting>
44-
<setting name="ProxyServer" serializeAs="String">
44+
<setting name="ProxyAddress" serializeAs="String">
4545
<value />
4646
</setting>
4747
<setting name="ProxyUsername" serializeAs="String">

IMDbAPI_Client/IMDbAPI_Client.csproj

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1414
<Deterministic>true</Deterministic>
15+
<PublishUrl>publish\</PublishUrl>
16+
<Install>true</Install>
17+
<InstallFrom>Disk</InstallFrom>
18+
<UpdateEnabled>false</UpdateEnabled>
19+
<UpdateMode>Foreground</UpdateMode>
20+
<UpdateInterval>7</UpdateInterval>
21+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
22+
<UpdatePeriodically>false</UpdatePeriodically>
23+
<UpdateRequired>false</UpdateRequired>
24+
<MapFileExtensions>true</MapFileExtensions>
25+
<ApplicationRevision>0</ApplicationRevision>
26+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
27+
<IsWebBootstrapper>false</IsWebBootstrapper>
28+
<UseApplicationTrust>false</UseApplicationTrust>
29+
<BootstrapperEnabled>true</BootstrapperEnabled>
1530
</PropertyGroup>
1631
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1732
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -36,8 +51,8 @@
3651
<ApplicationIcon>ProjectIcon.ico</ApplicationIcon>
3752
</PropertyGroup>
3853
<ItemGroup>
39-
<Reference Include="IMDbApiLib, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
40-
<HintPath>..\packages\IMDbApiLib.1.5.0\lib\net45\IMDbApiLib.dll</HintPath>
54+
<Reference Include="IMDbApiLib, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
55+
<HintPath>..\packages\IMDbApiLib.1.6.0\lib\net45\IMDbApiLib.dll</HintPath>
4156
</Reference>
4257
<Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
4358
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll</HintPath>
@@ -48,8 +63,8 @@
4863
<Reference Include="MetroFramework.Fonts, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
4964
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll</HintPath>
5065
</Reference>
51-
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
52-
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
66+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
67+
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
5368
</Reference>
5469
<Reference Include="System" />
5570
<Reference Include="System.Core" />
@@ -249,6 +264,18 @@
249264
<ItemGroup>
250265
<Content Include="ProjectIcon.ico" />
251266
</ItemGroup>
267+
<ItemGroup>
268+
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
269+
<Visible>False</Visible>
270+
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
271+
<Install>true</Install>
272+
</BootstrapperPackage>
273+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
274+
<Visible>False</Visible>
275+
<ProductName>.NET Framework 3.5 SP1</ProductName>
276+
<Install>false</Install>
277+
</BootstrapperPackage>
278+
</ItemGroup>
252279
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
253280
<PropertyGroup>
254281
<PreBuildEvent>taskkill /f /fi "imagename eq $(TargetFileName)"</PreBuildEvent>

IMDbAPI_Client/MoreInfoForm.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ public MoreInfoForm(string id)
2020
_id = id;
2121

2222
string apiKey = Properties.Settings.Default.ApiKey;
23-
_apiLib = new ApiLib(apiKey, Program.GetWebProxy());
23+
if (Properties.Settings.Default.UseProxy)
24+
_apiLib = new ApiLib(apiKey,
25+
Properties.Settings.Default.ProxyAddress,
26+
Properties.Settings.Default.ProxyUsername,
27+
Properties.Settings.Default.ProxyPassword);
28+
else
29+
_apiLib = new ApiLib(apiKey);
2430
}
2531

2632
private readonly ApiLib _apiLib;

IMDbAPI_Client/Program.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ public static WebProxy GetWebProxy()
2323
return null;
2424

2525
var webProxy = new WebProxy();
26-
webProxy.Address = new Uri(Properties.Settings.Default.ProxyServer);
27-
webProxy.Credentials = new NetworkCredential(
28-
Properties.Settings.Default.ProxyUsername,
29-
Properties.Settings.Default.ProxyPassword);
30-
webProxy.UseDefaultCredentials = false;
26+
webProxy.Address = new Uri(Properties.Settings.Default.ProxyAddress);
27+
if (!string.IsNullOrEmpty(Properties.Settings.Default.ProxyUsername)
28+
&& !string.IsNullOrEmpty(Properties.Settings.Default.ProxyPassword))
29+
{
30+
webProxy.Credentials = new NetworkCredential(
31+
Properties.Settings.Default.ProxyUsername,
32+
Properties.Settings.Default.ProxyPassword);
33+
webProxy.UseDefaultCredentials = false;
34+
}
3135
webProxy.BypassProxyOnLocal = false;
3236

3337
return webProxy;

IMDbAPI_Client/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[assembly: AssemblyConfiguration("")]
1010
[assembly: AssemblyCompany("IMDb-API")]
1111
[assembly: AssemblyProduct("IMDbAPI Client")]
12-
[assembly: AssemblyCopyright("Copyright © 2019")]
12+
[assembly: AssemblyCopyright("Copyright © 2021")]
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]
1515

@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.5.0.0")]
35-
[assembly: AssemblyFileVersion("1.5.0.0")]
34+
[assembly: AssemblyVersion("1.6.0.0")]
35+
[assembly: AssemblyFileVersion("1.6.0.0")]

IMDbAPI_Client/Properties/Settings.Designer.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IMDbAPI_Client/Properties/Settings.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ DownloadSiteName2</Value>
3636
<Setting Name="UseProxy" Type="System.Boolean" Scope="User">
3737
<Value Profile="(Default)">False</Value>
3838
</Setting>
39-
<Setting Name="ProxyServer" Type="System.String" Scope="User">
39+
<Setting Name="ProxyAddress" Type="System.String" Scope="User">
4040
<Value Profile="(Default)" />
4141
</Setting>
4242
<Setting Name="ProxyUsername" Type="System.String" Scope="User">

IMDbAPI_Client/SearchForm.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public SearchForm(SearchData searchData)
2424
_searchData = searchData;
2525

2626
string apiKey = Properties.Settings.Default.ApiKey;
27-
_apiLib = new ApiLib(apiKey, Program.GetWebProxy());
27+
if (Properties.Settings.Default.UseProxy)
28+
_apiLib = new ApiLib(apiKey,
29+
Properties.Settings.Default.ProxyAddress,
30+
Properties.Settings.Default.ProxyUsername,
31+
Properties.Settings.Default.ProxyPassword);
32+
else
33+
_apiLib = new ApiLib(apiKey);
2834
}
2935

3036
private readonly ApiLib _apiLib;

IMDbAPI_Client/SettingsForm.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public SettingsForm()
1414
InitializeComponent();
1515
txtRemoveSiteName.Text = Properties.Settings.Default.RemoveSites;
1616
chkUseProxy.Checked = Properties.Settings.Default.UseProxy;
17-
txtProxyServer.Text = Properties.Settings.Default.ProxyServer;
17+
txtProxyAddress.Text = Properties.Settings.Default.ProxyAddress;
1818
txtProxyUsername.Text = Properties.Settings.Default.ProxyUsername;
1919
txtProxyPassword.Text = Properties.Settings.Default.ProxyPassword;
2020
chkUseProxy_CheckedChanged(null, null);
@@ -46,7 +46,7 @@ private void btnOK_Click(object sender, EventArgs e)
4646
_settingsUC.SaveSettings();
4747

4848
Properties.Settings.Default.RemoveSites = txtRemoveSiteName.Text;
49-
Properties.Settings.Default.ProxyServer = txtProxyServer.Text;
49+
Properties.Settings.Default.ProxyAddress = txtProxyAddress.Text;
5050
Properties.Settings.Default.ProxyUsername = txtProxyUsername.Text;
5151
Properties.Settings.Default.ProxyPassword = txtProxyPassword.Text;
5252

@@ -81,8 +81,8 @@ private void DdlTheme_SelectedIndexChanged(object sender, EventArgs e)
8181

8282
private void chkUseProxy_CheckedChanged(object sender, EventArgs e)
8383
{
84-
lblProxyServer.Enabled =
85-
txtProxyServer.Enabled =
84+
lblProxyAddress.Enabled =
85+
txtProxyAddress.Enabled =
8686
lblProxyUsername.Enabled =
8787
txtProxyUsername.Enabled =
8888
lblProxyPassword.Enabled =

IMDbAPI_Client/SettingsForm.designer.cs

Lines changed: 42 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)