示例#1
0
        private void SetCursorInfo(bool visible, int size)
        {
            if (disposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }

            ConsoleCursorInfo cci = new ConsoleCursorInfo(visible, size);

            if (!WinCon.SetConsoleCursorInfo(_handle, cci))
            {
                throw new ApplicationException("Error setting cursor information.");
            }
        }
示例#2
0
        private ConsoleCursorInfo GetCursorInfo()
        {
            if (disposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }
            ConsoleCursorInfo cci = new ConsoleCursorInfo();

            if (!WinCon.GetConsoleCursorInfo(_handle, cci))
            {
                throw new ApplicationException("Error getting cursor information.");
            }
            return(cci);
        }
示例#3
0
 public static extern bool SetConsoleCursorInfo(
     IntPtr hConsoleOutput,
     [In][MarshalAs(UnmanagedType.LPStruct)] ConsoleCursorInfo lpConsoleCursorInfo);