ConsoleAuth/Program.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace ConsoleAuth
{
class Program
{
static void Main(string[] args)
{
var arguments = Common.CommandLineArgumentParser.Parse(args);
if (arguments.Has("-u"))
{
Console.WriteLine("用户名:{0}", arguments.Get("-u").Next);
}
if (arguments.Has("-p"))
{
Console.WriteLine("密码:{0}", arguments.Get("-p").Next);
}
Console.WriteLine("run");
var consoleFunType = typeof(ConsoleFun);
while (true)
{
var cmd = Console.ReadLine();
//switch(cmd)
//{
// case "OpenForm":
// openForm();
// break;
//}
var method = consoleFunType.GetMethod(cmd, BindingFlags.Public| BindingFlags.IgnoreCase|BindingFlags.Static);
if (method == null)
{
Common.ConsoleHelper.ShowError("找不到对应的方法");
continue;
}
var attr = method.GetCustomAttributes(typeof(ColsoleMethod), false);
if(attr.Length<=0)
{
Common.ConsoleHelper.ShowError("找不到对应的方法");
continue;
}
method.Invoke(null, null);
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
