From debe640d4a10697984d8a4fdc7908755bf58dc45 Mon Sep 17 00:00:00 2001 From: bicijinlian Date: Tue, 30 May 2023 18:56:08 +0800 Subject: [PATCH] =?UTF-8?q?feats:=20=E6=B7=BB=E5=8A=A0=E6=96=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Docs/说明.md | 26 ++++++ SpectreConsoleStudy.461App/App.config | 6 ++ SpectreConsoleStudy.461App/Program.cs | 12 +++ .../Properties/AssemblyInfo.cs | 36 +++++++ .../SpectreConsoleStudy.461App.csproj | 73 +++++++++++++++ SpectreConsoleStudy.461App/packages.config | 7 ++ SpectreConsoleStudy.47App/App.config | 6 ++ SpectreConsoleStudy.47App/Program.cs | 12 +++ .../Properties/AssemblyInfo.cs | 36 +++++++ .../SpectreConsoleStudy.47App.csproj | 73 +++++++++++++++ SpectreConsoleStudy.47App/packages.config | 7 ++ SpectreConsoleStudy.481App/App.config | 6 ++ SpectreConsoleStudy.481App/Program.cs | 12 +++ .../Properties/AssemblyInfo.cs | 36 +++++++ .../SpectreConsoleStudy.481App.csproj | 73 +++++++++++++++ SpectreConsoleStudy.481App/packages.config | 7 ++ SpectreConsoleStudy.Core2.1App/Program.cs | 12 +++ .../SpectreConsoleStudy.Core2.1App.csproj | 13 +++ SpectreConsoleStudy.Core31App/Program.cs | 12 +++ .../SpectreConsoleStudy.Core31App.csproj | 12 +++ SpectreConsoleStudy.Core5App/Program.cs | 12 +++ .../SpectreConsoleStudy.Core5App.csproj | 12 +++ SpectreConsoleStudy.Core6App/Program.cs | 11 +++ .../SpectreConsoleStudy.Core6App.csproj | 14 +++ SpectreConsoleStudy.Core7App/Program.cs | 11 +++ .../SpectreConsoleStudy.Core7App.csproj | 14 +++ .../SpectreConsoleRunner.cs | 27 ++++++ .../SpectreConsoleStudy.Shared.csproj | 11 +++ SpectreConsoleStudy.sln | 93 +++++++++++++++++++ 29 files changed, 682 insertions(+) create mode 100644 Docs/说明.md create mode 100644 SpectreConsoleStudy.461App/App.config create mode 100644 SpectreConsoleStudy.461App/Program.cs create mode 100644 SpectreConsoleStudy.461App/Properties/AssemblyInfo.cs create mode 100644 SpectreConsoleStudy.461App/SpectreConsoleStudy.461App.csproj create mode 100644 SpectreConsoleStudy.461App/packages.config create mode 100644 SpectreConsoleStudy.47App/App.config create mode 100644 SpectreConsoleStudy.47App/Program.cs create mode 100644 SpectreConsoleStudy.47App/Properties/AssemblyInfo.cs create mode 100644 SpectreConsoleStudy.47App/SpectreConsoleStudy.47App.csproj create mode 100644 SpectreConsoleStudy.47App/packages.config create mode 100644 SpectreConsoleStudy.481App/App.config create mode 100644 SpectreConsoleStudy.481App/Program.cs create mode 100644 SpectreConsoleStudy.481App/Properties/AssemblyInfo.cs create mode 100644 SpectreConsoleStudy.481App/SpectreConsoleStudy.481App.csproj create mode 100644 SpectreConsoleStudy.481App/packages.config create mode 100644 SpectreConsoleStudy.Core2.1App/Program.cs create mode 100644 SpectreConsoleStudy.Core2.1App/SpectreConsoleStudy.Core2.1App.csproj create mode 100644 SpectreConsoleStudy.Core31App/Program.cs create mode 100644 SpectreConsoleStudy.Core31App/SpectreConsoleStudy.Core31App.csproj create mode 100644 SpectreConsoleStudy.Core5App/Program.cs create mode 100644 SpectreConsoleStudy.Core5App/SpectreConsoleStudy.Core5App.csproj create mode 100644 SpectreConsoleStudy.Core6App/Program.cs create mode 100644 SpectreConsoleStudy.Core6App/SpectreConsoleStudy.Core6App.csproj create mode 100644 SpectreConsoleStudy.Core7App/Program.cs create mode 100644 SpectreConsoleStudy.Core7App/SpectreConsoleStudy.Core7App.csproj create mode 100644 SpectreConsoleStudy.Shared/SpectreConsoleRunner.cs create mode 100644 SpectreConsoleStudy.Shared/SpectreConsoleStudy.Shared.csproj create mode 100644 SpectreConsoleStudy.sln diff --git a/Docs/说明.md b/Docs/说明.md new file mode 100644 index 0000000..2e92747 --- /dev/null +++ b/Docs/说明.md @@ -0,0 +1,26 @@ +说明 +========= +## 兼容性说明 ++ Spectre.Console 最低兼容到 .NET Standard 2.0 + ++ .NET Standard 2.0 兼容性如下图 + + | **.NET 实现** | **版本支持** | + | ----------------- | -------------------------------------------- | + | .NET 和.NET Core | 2.0、2.1、 2.2、 3.0、 3.1、 5.0、 6.0、 7.0 | + | .NET Framework | 4.6.1、4.6.2、4.7、4.7.1、4.7.2、4.8、4.8.1 | + | Mono | 5.4、6.4 | + | Xamarin.iOS | 10.14、12.16 | + | Xamarin.Mac | 3.8、5.16 | + | Xamarin.Android | 8.0、10.0 | + | 通用 Windows 平台 | 10.0.16299,待定 | + | Unity | 2018 年 1 月 | + +## 作用 ++ 使用 Rich 启发的标记语言轻松输出具有不同颜色甚至样式(如粗体、斜体和闪烁)的文本。 ++ 支持终端中的 ///-位颜色,并自动检测当前终端的功能。34824 ++ 渲染复杂的小部件,如表、树,甚至 ASCII 图像。 ++ 通过实时显示进度和状态控件来显示长时间运行的任务的进度。 ++ 使用强类型文本输入或通过单项选择和多项选择控件提示用户输入。 ++ 使用自定义颜色编码的主题和样式设置格式 .NET 例外。 ++ 在编写时考虑了单元测试。 diff --git a/SpectreConsoleStudy.461App/App.config b/SpectreConsoleStudy.461App/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/SpectreConsoleStudy.461App/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.461App/Program.cs b/SpectreConsoleStudy.461App/Program.cs new file mode 100644 index 0000000..48e6a1d --- /dev/null +++ b/SpectreConsoleStudy.461App/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace SpectreConsoleStudy._461App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} diff --git a/SpectreConsoleStudy.461App/Properties/AssemblyInfo.cs b/SpectreConsoleStudy.461App/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..baaeeb4 --- /dev/null +++ b/SpectreConsoleStudy.461App/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SpectreConsoleStudy.461App")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SpectreConsoleStudy.461App")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("2a924c9e-44ba-40c1-a433-63f7ccbf8008")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SpectreConsoleStudy.461App/SpectreConsoleStudy.461App.csproj b/SpectreConsoleStudy.461App/SpectreConsoleStudy.461App.csproj new file mode 100644 index 0000000..04402b9 --- /dev/null +++ b/SpectreConsoleStudy.461App/SpectreConsoleStudy.461App.csproj @@ -0,0 +1,73 @@ + + + + + Debug + AnyCPU + {2A924C9E-44BA-40C1-A433-63F7CCBF8008} + Exe + SpectreConsoleStudy._461App + SpectreConsoleStudy.461App + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + + + + + + + + + + + + + + + + {e0faad4e-ff38-40f7-9dd7-699d39cf0445} + SpectreConsoleStudy.Shared + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.461App/packages.config b/SpectreConsoleStudy.461App/packages.config new file mode 100644 index 0000000..f573820 --- /dev/null +++ b/SpectreConsoleStudy.461App/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.47App/App.config b/SpectreConsoleStudy.47App/App.config new file mode 100644 index 0000000..016d28f --- /dev/null +++ b/SpectreConsoleStudy.47App/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.47App/Program.cs b/SpectreConsoleStudy.47App/Program.cs new file mode 100644 index 0000000..5036dc4 --- /dev/null +++ b/SpectreConsoleStudy.47App/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace SpectreConsoleStudy._47App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} diff --git a/SpectreConsoleStudy.47App/Properties/AssemblyInfo.cs b/SpectreConsoleStudy.47App/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..78b73c7 --- /dev/null +++ b/SpectreConsoleStudy.47App/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SpectreConsoleStudy.47App")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SpectreConsoleStudy.47App")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("6bbf7d72-bba1-4601-ac7b-f0d3e40d17bd")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SpectreConsoleStudy.47App/SpectreConsoleStudy.47App.csproj b/SpectreConsoleStudy.47App/SpectreConsoleStudy.47App.csproj new file mode 100644 index 0000000..0e939c7 --- /dev/null +++ b/SpectreConsoleStudy.47App/SpectreConsoleStudy.47App.csproj @@ -0,0 +1,73 @@ + + + + + Debug + AnyCPU + {6BBF7D72-BBA1-4601-AC7B-F0D3E40D17BD} + Exe + SpectreConsoleStudy._47App + SpectreConsoleStudy.47App + v4.7 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + + + + + + + + + + + + + + + + {e0faad4e-ff38-40f7-9dd7-699d39cf0445} + SpectreConsoleStudy.Shared + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.47App/packages.config b/SpectreConsoleStudy.47App/packages.config new file mode 100644 index 0000000..6012a84 --- /dev/null +++ b/SpectreConsoleStudy.47App/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.481App/App.config b/SpectreConsoleStudy.481App/App.config new file mode 100644 index 0000000..aee9adf --- /dev/null +++ b/SpectreConsoleStudy.481App/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.481App/Program.cs b/SpectreConsoleStudy.481App/Program.cs new file mode 100644 index 0000000..e5f8a1d --- /dev/null +++ b/SpectreConsoleStudy.481App/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace SpectreConsoleStudy._481App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} diff --git a/SpectreConsoleStudy.481App/Properties/AssemblyInfo.cs b/SpectreConsoleStudy.481App/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..085d188 --- /dev/null +++ b/SpectreConsoleStudy.481App/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SpectreConsoleStudy.481App")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SpectreConsoleStudy.481App")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("336bf2b9-63bb-4497-9b3d-8574b50b610f")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SpectreConsoleStudy.481App/SpectreConsoleStudy.481App.csproj b/SpectreConsoleStudy.481App/SpectreConsoleStudy.481App.csproj new file mode 100644 index 0000000..76dfd18 --- /dev/null +++ b/SpectreConsoleStudy.481App/SpectreConsoleStudy.481App.csproj @@ -0,0 +1,73 @@ + + + + + Debug + AnyCPU + {336BF2B9-63BB-4497-9B3D-8574B50B610F} + Exe + SpectreConsoleStudy._481App + SpectreConsoleStudy.481App + v4.8.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + + + + + + + + + + + + + + + + {e0faad4e-ff38-40f7-9dd7-699d39cf0445} + SpectreConsoleStudy.Shared + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.481App/packages.config b/SpectreConsoleStudy.481App/packages.config new file mode 100644 index 0000000..5119b85 --- /dev/null +++ b/SpectreConsoleStudy.481App/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SpectreConsoleStudy.Core2.1App/Program.cs b/SpectreConsoleStudy.Core2.1App/Program.cs new file mode 100644 index 0000000..755f8fd --- /dev/null +++ b/SpectreConsoleStudy.Core2.1App/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace SpectreConsoleStudy.Core2._1App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} diff --git a/SpectreConsoleStudy.Core2.1App/SpectreConsoleStudy.Core2.1App.csproj b/SpectreConsoleStudy.Core2.1App/SpectreConsoleStudy.Core2.1App.csproj new file mode 100644 index 0000000..a20490f --- /dev/null +++ b/SpectreConsoleStudy.Core2.1App/SpectreConsoleStudy.Core2.1App.csproj @@ -0,0 +1,13 @@ + + + + Exe + netcoreapp2.1 + SpectreConsoleStudy.Core2._1App + + + + + + + diff --git a/SpectreConsoleStudy.Core31App/Program.cs b/SpectreConsoleStudy.Core31App/Program.cs new file mode 100644 index 0000000..b7db1ed --- /dev/null +++ b/SpectreConsoleStudy.Core31App/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace SpectreConsoleStudy.Core31App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} diff --git a/SpectreConsoleStudy.Core31App/SpectreConsoleStudy.Core31App.csproj b/SpectreConsoleStudy.Core31App/SpectreConsoleStudy.Core31App.csproj new file mode 100644 index 0000000..537fd5c --- /dev/null +++ b/SpectreConsoleStudy.Core31App/SpectreConsoleStudy.Core31App.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp3.1 + + + + + + + diff --git a/SpectreConsoleStudy.Core5App/Program.cs b/SpectreConsoleStudy.Core5App/Program.cs new file mode 100644 index 0000000..7c7f9c1 --- /dev/null +++ b/SpectreConsoleStudy.Core5App/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace SpectreConsoleStudy.Core5App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} diff --git a/SpectreConsoleStudy.Core5App/SpectreConsoleStudy.Core5App.csproj b/SpectreConsoleStudy.Core5App/SpectreConsoleStudy.Core5App.csproj new file mode 100644 index 0000000..e4f9689 --- /dev/null +++ b/SpectreConsoleStudy.Core5App/SpectreConsoleStudy.Core5App.csproj @@ -0,0 +1,12 @@ + + + + Exe + net5.0 + + + + + + + diff --git a/SpectreConsoleStudy.Core6App/Program.cs b/SpectreConsoleStudy.Core6App/Program.cs new file mode 100644 index 0000000..19bbea0 --- /dev/null +++ b/SpectreConsoleStudy.Core6App/Program.cs @@ -0,0 +1,11 @@ + +namespace SpectreConsoleStudy.Core6App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} \ No newline at end of file diff --git a/SpectreConsoleStudy.Core6App/SpectreConsoleStudy.Core6App.csproj b/SpectreConsoleStudy.Core6App/SpectreConsoleStudy.Core6App.csproj new file mode 100644 index 0000000..6a38719 --- /dev/null +++ b/SpectreConsoleStudy.Core6App/SpectreConsoleStudy.Core6App.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + enable + + + + + + + diff --git a/SpectreConsoleStudy.Core7App/Program.cs b/SpectreConsoleStudy.Core7App/Program.cs new file mode 100644 index 0000000..592b5cf --- /dev/null +++ b/SpectreConsoleStudy.Core7App/Program.cs @@ -0,0 +1,11 @@ + +namespace SpectreConsoleStudy.Core7App +{ + internal class Program + { + static void Main(string[] args) + { + Shared.SpectreConsoleRunner.Run(); + } + } +} \ No newline at end of file diff --git a/SpectreConsoleStudy.Core7App/SpectreConsoleStudy.Core7App.csproj b/SpectreConsoleStudy.Core7App/SpectreConsoleStudy.Core7App.csproj new file mode 100644 index 0000000..c436156 --- /dev/null +++ b/SpectreConsoleStudy.Core7App/SpectreConsoleStudy.Core7App.csproj @@ -0,0 +1,14 @@ + + + + Exe + net7.0 + enable + enable + + + + + + + diff --git a/SpectreConsoleStudy.Shared/SpectreConsoleRunner.cs b/SpectreConsoleStudy.Shared/SpectreConsoleRunner.cs new file mode 100644 index 0000000..c33c55d --- /dev/null +++ b/SpectreConsoleStudy.Shared/SpectreConsoleRunner.cs @@ -0,0 +1,27 @@ +using System; + +using Spectre.Console; + +namespace SpectreConsoleStudy.Shared +{ + /// + /// 执行器 + /// + public class SpectreConsoleRunner + { + public static void Run() + { + //简单应用 + Hello(); + } + + public static void Hello() + { + AnsiConsole.MarkupLine("[green]Hello[/] Spectre.Console!!"); + while (!AnsiConsole.Confirm("退出应用?")) + { + + } + } + } +} diff --git a/SpectreConsoleStudy.Shared/SpectreConsoleStudy.Shared.csproj b/SpectreConsoleStudy.Shared/SpectreConsoleStudy.Shared.csproj new file mode 100644 index 0000000..ae4b7ba --- /dev/null +++ b/SpectreConsoleStudy.Shared/SpectreConsoleStudy.Shared.csproj @@ -0,0 +1,11 @@ + + + + netstandard2.0 + + + + + + + diff --git a/SpectreConsoleStudy.sln b/SpectreConsoleStudy.sln new file mode 100644 index 0000000..ce607db --- /dev/null +++ b/SpectreConsoleStudy.sln @@ -0,0 +1,93 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33723.286 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpectreConsoleStudy.Core7App", "SpectreConsoleStudy.Core7App\SpectreConsoleStudy.Core7App.csproj", "{64D80CF6-00F9-4F9E-B768-FFF9E2C678E7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{2B92F9A3-E5C2-4C99-A6EC-4E3183995C2E}" + ProjectSection(SolutionItems) = preProject + Docs\说明.md = Docs\说明.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{5D162CAB-0F9D-48FB-B6DA-26210B4E2695}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{73A99800-46E6-4214-9DA1-289C479C5F15}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpectreConsoleStudy.Core6App", "SpectreConsoleStudy.Core6App\SpectreConsoleStudy.Core6App.csproj", "{DD230889-E7FE-435B-B770-07C1A87B87E8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpectreConsoleStudy.Core5App", "SpectreConsoleStudy.Core5App\SpectreConsoleStudy.Core5App.csproj", "{E7FD0B0B-E3AC-4661-81A0-823130BABB18}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpectreConsoleStudy.Core31App", "SpectreConsoleStudy.Core31App\SpectreConsoleStudy.Core31App.csproj", "{F66FA6F8-10B0-4DB1-A6A9-FDF214D1F09D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpectreConsoleStudy.Core2.1App", "SpectreConsoleStudy.Core2.1App\SpectreConsoleStudy.Core2.1App.csproj", "{A151D629-E817-4DCD-83A2-7F3E4E1FD52F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpectreConsoleStudy.47App", "SpectreConsoleStudy.47App\SpectreConsoleStudy.47App.csproj", "{6BBF7D72-BBA1-4601-AC7B-F0D3E40D17BD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpectreConsoleStudy.481App", "SpectreConsoleStudy.481App\SpectreConsoleStudy.481App.csproj", "{336BF2B9-63BB-4497-9B3D-8574B50B610F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpectreConsoleStudy.461App", "SpectreConsoleStudy.461App\SpectreConsoleStudy.461App.csproj", "{2A924C9E-44BA-40C1-A433-63F7CCBF8008}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpectreConsoleStudy.Shared", "SpectreConsoleStudy.Shared\SpectreConsoleStudy.Shared.csproj", "{E0FAAD4E-FF38-40F7-9DD7-699D39CF0445}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64D80CF6-00F9-4F9E-B768-FFF9E2C678E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64D80CF6-00F9-4F9E-B768-FFF9E2C678E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64D80CF6-00F9-4F9E-B768-FFF9E2C678E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64D80CF6-00F9-4F9E-B768-FFF9E2C678E7}.Release|Any CPU.Build.0 = Release|Any CPU + {DD230889-E7FE-435B-B770-07C1A87B87E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD230889-E7FE-435B-B770-07C1A87B87E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD230889-E7FE-435B-B770-07C1A87B87E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD230889-E7FE-435B-B770-07C1A87B87E8}.Release|Any CPU.Build.0 = Release|Any CPU + {E7FD0B0B-E3AC-4661-81A0-823130BABB18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7FD0B0B-E3AC-4661-81A0-823130BABB18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7FD0B0B-E3AC-4661-81A0-823130BABB18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7FD0B0B-E3AC-4661-81A0-823130BABB18}.Release|Any CPU.Build.0 = Release|Any CPU + {F66FA6F8-10B0-4DB1-A6A9-FDF214D1F09D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F66FA6F8-10B0-4DB1-A6A9-FDF214D1F09D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F66FA6F8-10B0-4DB1-A6A9-FDF214D1F09D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F66FA6F8-10B0-4DB1-A6A9-FDF214D1F09D}.Release|Any CPU.Build.0 = Release|Any CPU + {A151D629-E817-4DCD-83A2-7F3E4E1FD52F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A151D629-E817-4DCD-83A2-7F3E4E1FD52F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A151D629-E817-4DCD-83A2-7F3E4E1FD52F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A151D629-E817-4DCD-83A2-7F3E4E1FD52F}.Release|Any CPU.Build.0 = Release|Any CPU + {6BBF7D72-BBA1-4601-AC7B-F0D3E40D17BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BBF7D72-BBA1-4601-AC7B-F0D3E40D17BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BBF7D72-BBA1-4601-AC7B-F0D3E40D17BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BBF7D72-BBA1-4601-AC7B-F0D3E40D17BD}.Release|Any CPU.Build.0 = Release|Any CPU + {336BF2B9-63BB-4497-9B3D-8574B50B610F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {336BF2B9-63BB-4497-9B3D-8574B50B610F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {336BF2B9-63BB-4497-9B3D-8574B50B610F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {336BF2B9-63BB-4497-9B3D-8574B50B610F}.Release|Any CPU.Build.0 = Release|Any CPU + {2A924C9E-44BA-40C1-A433-63F7CCBF8008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A924C9E-44BA-40C1-A433-63F7CCBF8008}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A924C9E-44BA-40C1-A433-63F7CCBF8008}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A924C9E-44BA-40C1-A433-63F7CCBF8008}.Release|Any CPU.Build.0 = Release|Any CPU + {E0FAAD4E-FF38-40F7-9DD7-699D39CF0445}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0FAAD4E-FF38-40F7-9DD7-699D39CF0445}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0FAAD4E-FF38-40F7-9DD7-699D39CF0445}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0FAAD4E-FF38-40F7-9DD7-699D39CF0445}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {64D80CF6-00F9-4F9E-B768-FFF9E2C678E7} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {DD230889-E7FE-435B-B770-07C1A87B87E8} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {E7FD0B0B-E3AC-4661-81A0-823130BABB18} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {F66FA6F8-10B0-4DB1-A6A9-FDF214D1F09D} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {A151D629-E817-4DCD-83A2-7F3E4E1FD52F} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {6BBF7D72-BBA1-4601-AC7B-F0D3E40D17BD} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {336BF2B9-63BB-4497-9B3D-8574B50B610F} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {2A924C9E-44BA-40C1-A433-63F7CCBF8008} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + {E0FAAD4E-FF38-40F7-9DD7-699D39CF0445} = {5D162CAB-0F9D-48FB-B6DA-26210B4E2695} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C5DD1007-4456-47EB-BFCF-44C2B5DFC21F} + EndGlobalSection +EndGlobal