<feat> + text工具结果在浏览器打开

This commit is contained in:
nsnail 2022-12-09 11:57:12 +08:00
parent c1538af689
commit ea75f46af3
3 changed files with 8 additions and 9 deletions

View File

@ -25,6 +25,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{AD79881E-7
README.md = README.md README.md = README.md
README.zh-CN.md = README.zh-CN.md README.zh-CN.md = README.zh-CN.md
safe-delete-unused-resx.ahk = safe-delete-unused-resx.ahk safe-delete-unused-resx.ahk = safe-delete-unused-resx.ahk
switch-nuget.ps1 = switch-nuget.ps1
switch-project.ps1 = switch-project.ps1
switcher.json = switcher.json
EndProjectSection EndProjectSection
EndProject EndProject
Global Global

View File

@ -1,3 +1,4 @@
using System.Diagnostics;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using NSExt.Extensions; using NSExt.Extensions;
@ -97,6 +98,9 @@ html-encode: {o.HtmlEncode}
html-decode: {o.HtmlDecode} html-decode: {o.HtmlDecode}
"""; """;
Console.WriteLine(outputTemp); Console.WriteLine(outputTemp);
var file = Path.Combine(Path.GetTempPath(), $"{System.Guid.NewGuid()}.html");
File.WriteAllText(file, outputTemp.Text2Html());
Process.Start("explorer", file);
} }
protected override async Task Core() protected override async Task Core()

View File

@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
@ -14,30 +13,23 @@
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<AssemblyTitle>功能全面的实用工具 - 程序员的瑞士军刀</AssemblyTitle> <AssemblyTitle>功能全面的实用工具 - 程序员的瑞士军刀</AssemblyTitle>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1"/> <PackageReference Include="CommandLineParser" Version="2.9.1"/>
<PackageReference Include="NSExt" Version="1.0.6"/> <PackageReference Include="NSExt" Version="1.0.8"/>
<PackageReference Include="Spectre.Console" Version="0.45.1-preview.0.46"/> <PackageReference Include="Spectre.Console" Version="0.45.1-preview.0.46"/>
<PackageReference Include="TextCopy" Version="6.2.0"/> <PackageReference Include="TextCopy" Version="6.2.0"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="Lang\Str.resx"> <EmbeddedResource Update="Lang\Str.resx">
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Str.Designer.cs</LastGenOutput> <LastGenOutput>Str.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<Import Project="../GenerateResx.targets"/> <Import Project="../GenerateResx.targets"/>
</Project> </Project>