This commit is contained in:
muqing 2024-09-24 15:22:11 +08:00
parent 08d175ae36
commit a077d2082e
4 changed files with 57 additions and 9 deletions

View File

@ -28,6 +28,7 @@ public class ModeSwitch
var key = Console.ReadKey(true);
Console.SetCursorPosition(CalculateActualLength($"{mode}.{str[mode]}") + 1, mode + 1);
Console.Write(' ');
// Console.Write(key.Key);
if (key.Key >= ConsoleKey.D0 && key.Key <= ConsoleKey.D9)
{
int v1 = int.Parse(key.KeyChar.ToString());

View File

@ -1,6 +1,7 @@

using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using Debug.ModelingMusic;
@ -54,10 +55,7 @@ public class Program
public Program()
{
// MinLong.Main.ResetChars();
// _ = new MinLong.Main();
// return;
string[] str = ["退出", "抽卡", "搜索引擎", "音乐调试", "小龙快跑"];
string[] str = ["退出", "抽卡", "搜索引擎", "下落字符", "小龙快跑"];
var modeSwitch = new ModeSwitch("请选择你要执行的操作:", str, (a) =>
{
switch (a)

View File

@ -1,2 +1,54 @@
# ModelingMusic
基于WindowsForm的程序
### 一款C#的控制台程序
## 功能
1. 抽卡模拟器
2. 文件/文件夹搜索
3. 下落字符调试
4. 小龙快跑 简易游戏
## 集成和使用
内置选择模式
可自由添加模块
PgUp/W 上选择
PgDn/S 下选择
Enter(回车) 确定执行
### 方法
var 变量 = new ModeSwitch("string", string[], (a) =>
{
//在这里处理选择逻辑
});
### 例子
string[] str = ["退出", "模块", "模块", "模块", "模块"];
var modeSwitch = new ModeSwitch("请选择你要执行的操作:", str, (a) =>
{
switch (a)
{
case 0:
//需要执行的方法模块
break;
case 1:
//需要执行的方法模块
break;
case 2:
//需要执行的方法模块
break;
case 3:
//需要执行的方法模块
break;
case 4:
//需要执行的方法模块
break;
default:
printfLine("还没有这个功能");
break;
}
});
### 输出
请选择你要执行的操作:
0.退出 >
1.模块
2.模块
3.模块
4.模块

View File

@ -29,7 +29,7 @@ public class Mod
"ramboplayGame", "QQ", "QQWORD","Microsoft SDKs","Creator","editors","AndroidSDK","SDK","Pr","PR","PS","Ps","WE",
"androidstudioword","xshell7"
];
private readonly bool isExcludeFile = false;
private readonly bool isExcludeFile = true;
public string FileDir = string.Empty;
public Mod()
{
@ -79,7 +79,6 @@ public class Mod
if (d.IsReady == true)
{
var name = d.Name;
// if (name.Contains("C:\\"))//排除系统盘
// {
// continue;
@ -96,8 +95,6 @@ public class Mod
{
try
{
// Console.WriteLine("正在搜索:" + path);
DirectoryInfo dirInfo = new(path);
foreach (var directory in dirInfo.EnumerateDirectories())
{