Skip to content

Commit

Permalink
一些杂项修复
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Apr 2, 2021
1 parent cb4db36 commit f80a930
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 13 deletions.
11 changes: 8 additions & 3 deletions FontDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Newtonsoft.Json;

namespace jjget
Expand Down Expand Up @@ -38,7 +39,7 @@ public string Decode(string ct, string fontName)
{
if (!map.ContainsKey(fontName))
{
setPrompt("下载字体" + fontName + "(已有" + this.map.Count + ")");
setPrompt("下载字体" + fontName + "(已有" + this.map.Count + ")......");
this.loadFont(fontName);
}
var lookup = this.map[fontName];
Expand All @@ -62,7 +63,7 @@ private void loadFont(string fontName)
{
try
{
ct = hu.Get("https://jjwxc.yooooo.us/" + fontName + ".json");
ct = hu.Get("https://jjwxc.yooooo.us/" + fontName + ".json?version=" + Application.ProductVersion);
}catch(Exception ex)
{
setPrompt("字体下载失败" + ex.ToString(), Color.Orange);
Expand All @@ -79,7 +80,11 @@ private void loadFont(string fontName)
}
this.map[fontName] = r.data;

this.saveMappings();
// only cache if response count is expected
if (r.data.Count == 200)
{
this.saveMappings();
}
}

private void loadMappings()
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.5")]
[assembly: AssemblyFileVersion("1.2.5")]
[assembly: AssemblyVersion("1.3.0")]
[assembly: AssemblyFileVersion("1.3.0")]
2 changes: 1 addition & 1 deletion frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private void button1_Click(object sender, EventArgs e)
{
if(novel.isVipChapter(i))
setPrompt(("章节" + i + "是VIP章节,"+
(novel.hasLogin?"账号没有购买,或者登陆过期":"需要登录后才能下载")), Color.Red);
(novel.hasLogin?"可能是账号没有购买,或者登陆过期;请尝试稍后重试":"需要登录后才能下载")), Color.Red);
else
MessageBox.Show("处理章节" + i + "时正则匹配失败,请联系作者", "JJGET-ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
terminate = true;
Expand Down
12 changes: 5 additions & 7 deletions jjget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">
<HintPath>packages\Newtonsoft.Json.12.0.2\lib\net35\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack">
<HintPath>packages\HtmlAgilityPack.1.11.8\lib\Net35\HtmlAgilityPack.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="FontDecoder.cs" />
Expand Down Expand Up @@ -148,7 +142,7 @@
<PackageReference Include="HtmlAgilityPack">
<Version>1.11.32</Version>
</PackageReference>
<PackageReference Include="ILMerge" Version="3.0.29" />
<PackageReference Include="ILMerge" Version="3.0.41" />
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
Expand All @@ -160,4 +154,8 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="ILMerge">
<!-- the ILMergePath property points to the location of ILMerge.exe console application -->
<Exec Command="$(ILMergeConsolePath) /out:bin\Release\jjget-merged.exe bin\Release\jjget.exe bin\Release\HtmlAgilityPack.dll bin\Release\Newtonsoft.Json.dll" />
</Target>
</Project>
28 changes: 28 additions & 0 deletions jjget.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jjget", "jjget.csproj", "{69EAF08F-7ABA-4734-ADEF-96CCC126888A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
SingleFile|Any CPU = SingleFile|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{69EAF08F-7ABA-4734-ADEF-96CCC126888A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69EAF08F-7ABA-4734-ADEF-96CCC126888A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69EAF08F-7ABA-4734-ADEF-96CCC126888A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69EAF08F-7ABA-4734-ADEF-96CCC126888A}.Release|Any CPU.Build.0 = Release|Any CPU
{69EAF08F-7ABA-4734-ADEF-96CCC126888A}.SingleFile|Any CPU.ActiveCfg = SingleFile|Any CPU
{69EAF08F-7ABA-4734-ADEF-96CCC126888A}.SingleFile|Any CPU.Build.0 = SingleFile|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7B666CF4-073B-41D6-8E09-63AC41BBBE36}
EndGlobalSection
EndGlobal

0 comments on commit f80a930

Please sign in to comment.