Skip to content

Commit

Permalink
优化缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
MonoLogueChi committed Mar 19, 2020
1 parent 20f62a7 commit c0a0fe2
Show file tree
Hide file tree
Showing 21 changed files with 185 additions and 321 deletions.
36 changes: 6 additions & 30 deletions CommandLine/Danmu.CommandLine.csproj
Expand Up @@ -8,45 +8,21 @@
<Version>1.0.0</Version>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Menu\**" />
<EmbeddedResource Remove="Menu\**" />
<None Remove="Menu\**" />
</ItemGroup>

<ItemGroup>
<None Remove="Resources\MainMenu.txt" />
<None Remove="Utils\MainMenu.txt" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\MainMenu.txt">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.7.82" />
<PackageReference Include="Shell.NET" Version="0.2.2" />
<PackageReference Include="MedallionShell" Version="1.6.1" />
<PackageReference Include="Octokit" Version="0.45.0" />
<PackageReference Include="ShellProgressBar" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<TrimmerRootDescriptor Include="TrimmerRoots.xml" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Update="Scripts\**">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion CommandLine/Program.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using CommandLine;
using Danmu.CommandLine.Utils;

Expand All @@ -10,6 +11,9 @@ internal class Program
{
private static void Main(string[] args)
{
//系统信息查询
Start.StartCommandLine();

Parser.Default.ParseArguments<Options>(args)
.WithParsed(RunOptions)
.WithNotParsed(HandleParseError);
Expand All @@ -22,7 +26,7 @@ private static void RunOptions(Options opts)
.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion);
if (opts.Menu)
{
Menu.MainMenu();
_ = Menu.MainMenu().Result;
}
}

Expand Down
73 changes: 0 additions & 73 deletions CommandLine/Properties/Resources.Designer.cs

This file was deleted.

124 changes: 0 additions & 124 deletions CommandLine/Properties/Resources.resx

This file was deleted.

1 change: 0 additions & 1 deletion CommandLine/Resources/MainMenu.txt

This file was deleted.

9 changes: 9 additions & 0 deletions CommandLine/Scripts/Menu/MainMenu.txt
@@ -0,0 +1,9 @@
============================ Danmu.Server ============================

A 查看最新版本 B



X 退出

======================================================================
6 changes: 4 additions & 2 deletions CommandLine/TrimmerRoots.xml
@@ -1,3 +1,5 @@
<linker>
<assembly fullname="CommandLine" preserve="all"/>
<linker>
<assembly fullname="CommandLine" preserve="all"/>
<assembly fullname="MedallionShell" preserve="all"/>
<assembly fullname="ShellProgressBar" preserve="all"/>
</linker>
11 changes: 11 additions & 0 deletions CommandLine/Utils/GlobalConstant.cs
@@ -0,0 +1,11 @@
namespace Danmu.CommandLine.Utils
{
public static class GlobalConstant
{
public const string GithubUserName = "MonoLogueChi";
public const string GithubRepoName = "Danmu.Server";

public const string ReleasesLatestUrl =
"https://api.github.com/repos/" + GithubUserName + "/" + GithubRepoName + "/releases/latest";
}
}

0 comments on commit c0a0fe2

Please sign in to comment.