mirror of
https://github.com/nsnail/dot.git
synced 2025-06-17 21:13:21 +08:00
<chore> + 增加t4模板自动生成resx.designer.cs
This commit is contained in:
parent
2ec7ec2628
commit
dc937912ea
12
.config/dotnet-tools.json
Normal file
12
.config/dotnet-tools.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-t4": {
|
||||
"version": "2.3.1",
|
||||
"commands": [
|
||||
"t4"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -803,3 +803,4 @@ FodyWeavers.xsd
|
||||
# User Define
|
||||
build/
|
||||
nuget.config
|
||||
*.[Dd]esigner.cs
|
@ -1,3 +1,4 @@
|
||||
dotnet tool restore
|
||||
dotnet build
|
||||
dotnet publish -c Release -r win-x64 --sc -p:"PublishSingleFile=true" -o ./build/win-x64
|
||||
Remove-Item -r ./build/temp
|
413
src/Lang/Str.Designer.cs
generated
413
src/Lang/Str.Designer.cs
generated
@ -1,413 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Dot.Lang {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Str {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Str() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Dot.Lang.Str", typeof(Str).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 单击鼠标左键复制颜色和坐标到剪贴板.
|
||||
/// </summary>
|
||||
public static string ClickCopyColor {
|
||||
get {
|
||||
return ResourceManager.GetString("ClickCopyColor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 转换换行符为LF.
|
||||
/// </summary>
|
||||
public static string ConvertEndOfLineToLF {
|
||||
get {
|
||||
return ResourceManager.GetString("ConvertEndOfLineToLF", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0}(已复制到剪贴板).
|
||||
/// </summary>
|
||||
public static string Copied {
|
||||
get {
|
||||
return ResourceManager.GetString("Copied", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 文件通配符.
|
||||
/// </summary>
|
||||
public static string FileSearchPattern {
|
||||
get {
|
||||
return ResourceManager.GetString("FileSearchPattern", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 要处理的目录路径.
|
||||
/// </summary>
|
||||
public static string FolderPath {
|
||||
get {
|
||||
return ResourceManager.GetString("FolderPath", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to GUID工具.
|
||||
/// </summary>
|
||||
public static string GuidTool {
|
||||
get {
|
||||
return ResourceManager.GetString("GuidTool", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 输入文本为空.
|
||||
/// </summary>
|
||||
public static string InputTextIsEmpty {
|
||||
get {
|
||||
return ResourceManager.GetString("InputTextIsEmpty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IP工具.
|
||||
/// </summary>
|
||||
public static string Ip {
|
||||
get {
|
||||
return ResourceManager.GetString("Ip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 执行命令后保留会话.
|
||||
/// </summary>
|
||||
public static string KeepSession {
|
||||
get {
|
||||
return ResourceManager.GetString("KeepSession", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Local clock offset.
|
||||
/// </summary>
|
||||
public static string LocalClockOffset {
|
||||
get {
|
||||
return ResourceManager.GetString("LocalClockOffset", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0}, 本机时钟偏移: {1} ms.
|
||||
/// </summary>
|
||||
public static string LocalTimeOffset {
|
||||
get {
|
||||
return ResourceManager.GetString("LocalTimeOffset", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 本机时间已同步.
|
||||
/// </summary>
|
||||
public static string LocalTimeSyncDone {
|
||||
get {
|
||||
return ResourceManager.GetString("LocalTimeSyncDone", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 没有需要处理的文件.
|
||||
/// </summary>
|
||||
public static string NoFileToBeProcessed {
|
||||
get {
|
||||
return ResourceManager.GetString("NoFileToBeProcessed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} 通信中....
|
||||
/// </summary>
|
||||
public static string NtpCalling {
|
||||
get {
|
||||
return ResourceManager.GetString("NtpCalling", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 成功 {0}/{1} , 本机时钟偏移平均值: {2} ms.
|
||||
/// </summary>
|
||||
public static string NtpReceiveDone {
|
||||
get {
|
||||
return ResourceManager.GetString("NtpReceiveDone", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0}/{1} 个 NTP 服务器.
|
||||
/// </summary>
|
||||
public static string NtpServerCount {
|
||||
get {
|
||||
return ResourceManager.GetString("NtpServerCount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to NTP 服务器标准时钟: {0}.
|
||||
/// </summary>
|
||||
public static string NtpServerTime {
|
||||
get {
|
||||
return ResourceManager.GetString("NtpServerTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 指定的路径“{0}”不存在.
|
||||
/// </summary>
|
||||
public static string PathNotFound {
|
||||
get {
|
||||
return ResourceManager.GetString("PathNotFound", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 按下任意键继续....
|
||||
/// </summary>
|
||||
public static string PressAnyKey {
|
||||
get {
|
||||
return ResourceManager.GetString("PressAnyKey", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Public network ip... .
|
||||
/// </summary>
|
||||
public static string PublicIP {
|
||||
get {
|
||||
return ResourceManager.GetString("PublicIP", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to BitSet 1:[0-9],2:[a-z],4:[A-Z],8:[ascii.0x21-0x2F].
|
||||
/// </summary>
|
||||
public static string PwdGenerateTypes {
|
||||
get {
|
||||
return ResourceManager.GetString("PwdGenerateTypes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 密码长度.
|
||||
/// </summary>
|
||||
public static string PwdLength {
|
||||
get {
|
||||
return ResourceManager.GetString("PwdLength", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 随机密码生成器.
|
||||
/// </summary>
|
||||
public static string RandomPasswordGenerator {
|
||||
get {
|
||||
return ResourceManager.GetString("RandomPasswordGenerator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 只读模式(仅做测试,不实际修改).
|
||||
/// </summary>
|
||||
public static string ReadOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("ReadOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 移除文件尾部换行和空格.
|
||||
/// </summary>
|
||||
public static string RemoveTrailingWhiteSpaces {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveTrailingWhiteSpaces", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 屏幕坐标颜色选取工具.
|
||||
/// </summary>
|
||||
public static string ScreenPixelTool {
|
||||
get {
|
||||
return ResourceManager.GetString("ScreenPixelTool", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 查找文件....
|
||||
/// </summary>
|
||||
public static string SearchingFile {
|
||||
get {
|
||||
return ResourceManager.GetString("SearchingFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} 个文件.
|
||||
/// </summary>
|
||||
public static string SearchingFileOK {
|
||||
get {
|
||||
return ResourceManager.GetString("SearchingFileOK", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Server.
|
||||
/// </summary>
|
||||
public static string Server {
|
||||
get {
|
||||
return ResourceManager.GetString("Server", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 同步本机时间.
|
||||
/// </summary>
|
||||
public static string ServerTime {
|
||||
get {
|
||||
return ResourceManager.GetString("ServerTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 已读取:{0}/{1},处理:{2},跳过:{3}.
|
||||
/// </summary>
|
||||
public static string ShowMessageTemp {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowMessageTemp", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Status.
|
||||
/// </summary>
|
||||
public static string Status {
|
||||
get {
|
||||
return ResourceManager.GetString("Status", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 同步本机时间.
|
||||
/// </summary>
|
||||
public static string SyncToLocalTime {
|
||||
get {
|
||||
return ResourceManager.GetString("SyncToLocalTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 要处理的文本(默认取取剪贴板值).
|
||||
/// </summary>
|
||||
public static string TextTobeProcessed {
|
||||
get {
|
||||
return ResourceManager.GetString("TextTobeProcessed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 文本编码工具.
|
||||
/// </summary>
|
||||
public static string TextTool {
|
||||
get {
|
||||
return ResourceManager.GetString("TextTool", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 连接NTP服务器超时时间 (毫秒).
|
||||
/// </summary>
|
||||
public static string TimeoutMillSecs {
|
||||
get {
|
||||
return ResourceManager.GetString("TimeoutMillSecs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 时间同步工具.
|
||||
/// </summary>
|
||||
public static string TimeTool {
|
||||
get {
|
||||
return ResourceManager.GetString("TimeTool", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 移除文件的uf8 bom.
|
||||
/// </summary>
|
||||
public static string TrimUtf8Bom {
|
||||
get {
|
||||
return ResourceManager.GetString("TrimUtf8Bom", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 使用大写输出.
|
||||
/// </summary>
|
||||
public static string UseUppercase {
|
||||
get {
|
||||
return ResourceManager.GetString("UseUppercase", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
86
src/Lang/Str.tt
Normal file
86
src/Lang/Str.tt
Normal file
@ -0,0 +1,86 @@
|
||||
<#@ template language="C#" #>
|
||||
<#@ import namespace="System.Xml" #>
|
||||
<#@ assembly name="System.Xml" #>
|
||||
<#@ output encoding="utf-8" extension="Designer.cs" #>
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Dot.Lang {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Str {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Str() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Dot.Lang.Str", typeof(Str).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
var xml = new XmlDocument();
|
||||
xml.Load("Str.resx");
|
||||
foreach (XmlNode data in xml.SelectNodes("//root/data")) {
|
||||
#>
|
||||
/// <summary>
|
||||
/// <#= data.SelectSingleNode("value").InnerText #>
|
||||
/// </summary>
|
||||
public static string <#= data.Attributes["name"].Value #> {
|
||||
get {
|
||||
return ResourceManager.GetString("<#= data.Attributes["name"].Value #>", resourceCulture);
|
||||
}
|
||||
}
|
||||
<#
|
||||
}
|
||||
#>
|
||||
|
||||
}
|
||||
}
|
@ -46,4 +46,11 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<ItemGroup Condition="!Exists('Lang\Str.Designer.cs')">
|
||||
<Compile Include="Lang\Str.Designer.cs" />
|
||||
</ItemGroup>
|
||||
<Exec WorkingDirectory="$(ProjectDir)\Lang" Command="dotnet t4 Str.tt" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user