Ejemplo n.º 1
0
 //添加控制台快捷显示
 public static void addGmGMCommand(string command, eGmCommandType type, string helpInfo = "")
 {
     if (!mGms.ContainsKey(command))
     {
         mGms.Add(command, type);
         Console.AddCommand(command, Unuse, helpInfo);
     }
 }
Ejemplo n.º 2
0
        public static List <string> SplitCommands(IEnumerable <string> commands, eGmCommandType type)
        {
            var c1 = new List <string>();

            foreach (var command in commands)
            {
                var            cs = command.Split(',');
                eGmCommandType t;
                if (!Gms.TryGetValue(cs[0], out t))
                {
                    continue;
                }
                if (t == type)
                {
                    c1.Add(command);
                }
            }
            return(c1);
        }