2025-01-12 09:26:16 +00:00
|
|
|
|
using System.Text;
|
2024-08-25 09:55:05 +00:00
|
|
|
|
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
|
|
|
|
|
{
|
2025-01-12 06:23:44 +00:00
|
|
|
|
|
2024-08-25 09:55:05 +00:00
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
2024-08-28 04:19:44 +00:00
|
|
|
|
Console.Title = "Tools";//设置窗口标题
|
2024-08-25 23:51:27 +00:00
|
|
|
|
// 设置控制台输出编码,以支持复杂字符
|
|
|
|
|
Console.OutputEncoding = Encoding.UTF8;
|
2024-08-30 06:48:22 +00:00
|
|
|
|
Console.CursorVisible = false;
|
2025-01-12 10:31:53 +00:00
|
|
|
|
// new MusicFrom();
|
|
|
|
|
_ = new Program();
|
2024-08-25 09:55:05 +00:00
|
|
|
|
}
|
2024-08-25 23:51:27 +00:00
|
|
|
|
|
2024-08-25 23:58:04 +00:00
|
|
|
|
//Y,X
|
|
|
|
|
public static readonly Point[,] chars = new Point[10, 50];
|
2024-08-25 23:51:27 +00:00
|
|
|
|
public static bool IsWhile = true;
|
2024-08-25 23:58:04 +00:00
|
|
|
|
|
2024-08-28 04:19:44 +00:00
|
|
|
|
public const char ShowChar = ' ';
|
2024-08-29 01:05:13 +00:00
|
|
|
|
public static Random random = new();
|
2024-08-25 23:58:04 +00:00
|
|
|
|
|
2024-08-25 09:55:05 +00:00
|
|
|
|
public Program()
|
|
|
|
|
{
|
2024-10-12 02:47:46 +00:00
|
|
|
|
Console.Clear();
|
2025-01-15 08:47:02 +00:00
|
|
|
|
// ResetChars();
|
2025-02-12 07:37:39 +00:00
|
|
|
|
string[] str = ["抽卡", "搜索引擎", Music.title, "小龙快跑", "贪吃蛇", "铁锈助手(联机模块)[未开发]", "服务器代理"];
|
2025-01-13 07:27:30 +00:00
|
|
|
|
var modeSwitch = new ModeSwitch("请选择你要执行的操作", str, (a) =>
|
2024-08-25 23:58:04 +00:00
|
|
|
|
{
|
2024-08-28 00:56:27 +00:00
|
|
|
|
switch (a)
|
2024-08-27 13:52:00 +00:00
|
|
|
|
{
|
|
|
|
|
case 0:
|
2025-01-12 10:31:53 +00:00
|
|
|
|
_ = new ChouKa();//抽卡
|
2024-08-27 13:52:00 +00:00
|
|
|
|
break;
|
|
|
|
|
case 1:
|
2025-01-12 10:31:53 +00:00
|
|
|
|
_ = new Mod();
|
2024-08-27 13:52:00 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2:
|
2025-01-12 10:31:53 +00:00
|
|
|
|
_ = new Music();
|
|
|
|
|
// _ = new MusicFrom();
|
2024-08-27 13:52:00 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3:
|
2024-08-28 04:19:44 +00:00
|
|
|
|
_ = new MinLong.Main();
|
|
|
|
|
break;
|
2025-01-12 10:31:53 +00:00
|
|
|
|
case 4:
|
2024-10-12 02:47:46 +00:00
|
|
|
|
_ = new Tanchishe.Main();
|
|
|
|
|
break;
|
2025-01-13 07:27:30 +00:00
|
|
|
|
case 5:
|
|
|
|
|
// _ = new Tanchishe.Main();
|
|
|
|
|
_ = new Program();
|
|
|
|
|
break;
|
2025-02-12 07:37:39 +00:00
|
|
|
|
case 6:
|
|
|
|
|
_ = new ProxySettingsHelper(this);
|
|
|
|
|
break;
|
2024-08-27 13:52:00 +00:00
|
|
|
|
}
|
2025-01-13 07:27:30 +00:00
|
|
|
|
}, "作者:MuQing\n使用语言:C#\n使用IDE:VS Code\n使用框架:.NET 8.0 \n测试运行平台:Windows11\n项目地址:https://git.coldmint.top/muqing/ModelingMusicForm.git");
|
2024-08-25 23:58:04 +00:00
|
|
|
|
}
|
|
|
|
|
public static void KeyEndThread()
|
|
|
|
|
{
|
|
|
|
|
new Thread(() =>
|
|
|
|
|
{
|
|
|
|
|
while (IsWhile)
|
|
|
|
|
{
|
|
|
|
|
ConsoleKeyInfo consoleKeyInfo = Console.ReadKey(true);
|
|
|
|
|
if (consoleKeyInfo.Key == ConsoleKey.Escape)
|
2024-08-25 09:55:05 +00:00
|
|
|
|
{
|
2024-08-25 23:58:04 +00:00
|
|
|
|
IsWhile = false;
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
|
Console.Clear();
|
|
|
|
|
Environment.Exit(0);
|
|
|
|
|
return;
|
2024-08-25 09:55:05 +00:00
|
|
|
|
}
|
2024-08-25 23:58:04 +00:00
|
|
|
|
Thread.Sleep(500);
|
2024-08-25 09:55:05 +00:00
|
|
|
|
}
|
2024-08-25 23:58:04 +00:00
|
|
|
|
// 等待用户按下任意键后退出
|
|
|
|
|
}).Start();
|
2024-08-25 09:55:05 +00:00
|
|
|
|
}
|
2025-01-12 10:31:53 +00:00
|
|
|
|
|
2024-10-12 02:47:46 +00:00
|
|
|
|
/// <summary>
|
2025-01-12 10:31:53 +00:00
|
|
|
|
/// 重置字符数组
|
2024-10-12 02:47:46 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
public static void ResetChars()
|
|
|
|
|
{
|
2025-01-12 10:31:53 +00:00
|
|
|
|
for (int i = 0; i < chars.GetLength(0); i++)
|
2024-10-12 02:47:46 +00:00
|
|
|
|
{
|
2025-01-12 10:31:53 +00:00
|
|
|
|
for (int j = 0; j < chars.GetLength(1); j++)
|
2024-10-12 02:47:46 +00:00
|
|
|
|
{
|
2025-01-12 10:31:53 +00:00
|
|
|
|
chars[i, j] = new Point();
|
2024-10-12 02:47:46 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-25 09:55:05 +00:00
|
|
|
|
}
|