Exemple #1
0
        /// <summary>
        /// Read console input informations
        /// 
        /// This method can only called if the program is a console application!
        /// </summary>
        /// <returns></returns>
        public static IList<NativeInput> ReadConsoleInput()
        {
            NativeInput[] list = new NativeInput[MAXREADINPUT];
            IList<NativeInput> result = new List<NativeInput>();

            uint readed;
            Kernel32.ReadConsoleInput(CMDHandle, list, MAXREADINPUT, out readed);

            for (int i = 0; i < readed; i++)
                result.Add(list[i]);

            return result;
        }
Exemple #2
0
        /// <summary>
        /// Read console input informations
        ///
        /// This method can only called if the program is a console application!
        /// </summary>
        /// <returns></returns>
        public static IList <NativeInput> ReadConsoleInput()
        {
            NativeInput[]       list   = new NativeInput[MAXREADINPUT];
            IList <NativeInput> result = new List <NativeInput>();

            uint readed;

            Kernel32.ReadConsoleInput(CMDHandle, list, MAXREADINPUT, out readed);

            for (int i = 0; i < readed; i++)
            {
                result.Add(list[i]);
            }

            return(result);
        }