优化
This commit is contained in:
parent
08d175ae36
commit
a077d2082e
|
@ -28,6 +28,7 @@ public class ModeSwitch
|
||||||
var key = Console.ReadKey(true);
|
var key = Console.ReadKey(true);
|
||||||
Console.SetCursorPosition(CalculateActualLength($"{mode}.{str[mode]}") + 1, mode + 1);
|
Console.SetCursorPosition(CalculateActualLength($"{mode}.{str[mode]}") + 1, mode + 1);
|
||||||
Console.Write(' ');
|
Console.Write(' ');
|
||||||
|
// Console.Write(key.Key);
|
||||||
if (key.Key >= ConsoleKey.D0 && key.Key <= ConsoleKey.D9)
|
if (key.Key >= ConsoleKey.D0 && key.Key <= ConsoleKey.D9)
|
||||||
{
|
{
|
||||||
int v1 = int.Parse(key.KeyChar.ToString());
|
int v1 = int.Parse(key.KeyChar.ToString());
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Net;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Debug.ModelingMusic;
|
using Debug.ModelingMusic;
|
||||||
|
@ -54,10 +55,7 @@ public class Program
|
||||||
|
|
||||||
public Program()
|
public Program()
|
||||||
{
|
{
|
||||||
// MinLong.Main.ResetChars();
|
string[] str = ["退出", "抽卡", "搜索引擎", "下落字符", "小龙快跑"];
|
||||||
// _ = new MinLong.Main();
|
|
||||||
// return;
|
|
||||||
string[] str = ["退出", "抽卡", "搜索引擎", "音乐调试", "小龙快跑"];
|
|
||||||
var modeSwitch = new ModeSwitch("请选择你要执行的操作:", str, (a) =>
|
var modeSwitch = new ModeSwitch("请选择你要执行的操作:", str, (a) =>
|
||||||
{
|
{
|
||||||
switch (a)
|
switch (a)
|
||||||
|
|
54
README.md
54
README.md
|
@ -1,2 +1,54 @@
|
||||||
# ModelingMusic
|
# 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.模块
|
|
@ -29,7 +29,7 @@ public class Mod
|
||||||
"ramboplayGame", "QQ", "QQWORD","Microsoft SDKs","Creator","editors","AndroidSDK","SDK","Pr","PR","PS","Ps","WE",
|
"ramboplayGame", "QQ", "QQWORD","Microsoft SDKs","Creator","editors","AndroidSDK","SDK","Pr","PR","PS","Ps","WE",
|
||||||
"androidstudioword","xshell7"
|
"androidstudioword","xshell7"
|
||||||
];
|
];
|
||||||
private readonly bool isExcludeFile = false;
|
private readonly bool isExcludeFile = true;
|
||||||
public string FileDir = string.Empty;
|
public string FileDir = string.Empty;
|
||||||
public Mod()
|
public Mod()
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,6 @@ public class Mod
|
||||||
if (d.IsReady == true)
|
if (d.IsReady == true)
|
||||||
{
|
{
|
||||||
var name = d.Name;
|
var name = d.Name;
|
||||||
|
|
||||||
// if (name.Contains("C:\\"))//排除系统盘
|
// if (name.Contains("C:\\"))//排除系统盘
|
||||||
// {
|
// {
|
||||||
// continue;
|
// continue;
|
||||||
|
@ -96,8 +95,6 @@ public class Mod
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Console.WriteLine("正在搜索:" + path);
|
|
||||||
|
|
||||||
DirectoryInfo dirInfo = new(path);
|
DirectoryInfo dirInfo = new(path);
|
||||||
foreach (var directory in dirInfo.EnumerateDirectories())
|
foreach (var directory in dirInfo.EnumerateDirectories())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user