コード例 #1
0
        /// <summary>
        /// 用户输入运行对应的方法
        /// </summary>
        /// <param name="Read">传参</param>
        static public void ReadSelect(string Read = "")
        {
            CQ      cq      = new CQ();
            Main    main    = new Main();
            Monitor monitor = new Monitor();
            Helper  helper  = new Helper();

            string Put;

            switch (Read.ToLower())
            {
            case "exit":
                return;

            case "help":
                helper.Help();
                break;

            case "status":
                helper.AppCfg(Info);
                break;

            case "start":
                main.AsyncRun(Info);
                break;

            case "monitor":
                monitor.MonitorInit();
                break;

            case "set start time":
                break;

            case "clear":
                Console.Clear();
                break;

            case "":
                break;


            // Info[]
            // [0]=Type
            // [1]=Id
            // [2]=RankType
            // [3]=Total
            // [4]=ApiType
            case "type":
                Console.Write("(输入:q退出)Put Type=>");
                Put = Console.ReadLine();
                if (Put != "" && Put != ":q")
                {
                    Info[0] = Put;
                    Console.WriteLine("Now Type= " + Info[0]);
                }
                break;

            case "id":
                Console.Write("(输入:q退出)Put Id=>");
                Put = Console.ReadLine();
                if (Put != "" && Put != ":q")
                {
                    Info[1] = Put;
                    Console.WriteLine("Now Id= " + Info[1]);
                }
                break;

            case "ranktype":
                Console.Write("(输入:q退出)Put RankType=>");
                Put = Console.ReadLine();
                if (Put != "" && Put != ":q")
                {
                    Info[2] = Put;
                    Console.WriteLine("Now RankType= " + Info[2]);
                }
                break;

            case "total":
                Console.Write("(输入:q退出)Put Total=>");
                Put = Console.ReadLine();
                if (Put != "" && Put != ":q")
                {
                    Info[3] = Put;
                    Console.WriteLine("Now Total= " + Info[3]);
                }
                break;

            case "apitype":
                Console.Write("(输入:q退出)Put Api=>");
                Put = Console.ReadLine();
                if (Put != "" && Put != ":q")
                {
                    Info[4] = Put;
                    Console.WriteLine("Now Api= " + Info[4]);
                }
                break;

            case "path":
                Console.ReadLine();
                break;
            }
        }