64 lines
1.9 KiB
C#
64 lines
1.9 KiB
C#
|
||
|
||
using System.Diagnostics;
|
||
using System.Runtime.InteropServices;
|
||
using Debug.ModelingMusic;
|
||
namespace Debug;
|
||
|
||
/// <summary>
|
||
/// 主程序入口 参考 https://blog.csdn.net/oscar999/article/details/141370223
|
||
/// 在VS Code的终端中,使用dotnet build命令来编译项目。这将在项目目录中生成一个bin文件夹,其中包含编译后的程序集。
|
||
/// 使用dotnet run命令来运行项目。这将编译项目(如果尚未编译)并运行编译后的程序。
|
||
/// </summary>
|
||
public class Program
|
||
{
|
||
public static void printf(object a)
|
||
{
|
||
Console.Write(a);
|
||
}
|
||
public static void printfLine(object a)
|
||
{
|
||
Console.WriteLine(a);
|
||
}
|
||
|
||
[DllImport("kernel32.dll")]
|
||
private static extern bool SetConsoleTitle(string title);
|
||
//开始计时
|
||
public static void Main(string[] args)
|
||
{
|
||
// 设置控制台标题为一个独特的字符串
|
||
SetConsoleTitle("Tools");
|
||
_ = new Program();
|
||
}
|
||
public Program()
|
||
{
|
||
do
|
||
{
|
||
printfLine("请选择你要执行的操作:"); printf(" 0.退出 ");
|
||
printf(" 1.抽拉 "); printf(" 2.铁锈位置搜索引擎 ");
|
||
Console.WriteLine();
|
||
var v = Console.ReadLine();
|
||
if (int.TryParse(v, out var i))
|
||
{
|
||
switch (i)
|
||
{
|
||
case 0:
|
||
Environment.Exit(0);
|
||
break;
|
||
case 1:
|
||
_ = new ChouKa();
|
||
break;
|
||
case 2:
|
||
_ = new Mod();
|
||
break;
|
||
case 3:
|
||
_ = new Music();
|
||
return;
|
||
default:
|
||
printfLine("还没有这个功能");
|
||
break;
|
||
}
|
||
}
|
||
} while (true);
|
||
}
|
||
} |