Exemplo n.º 1
0
        public Coord GetFontSize(bool bMax)
        {
            if (disposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }
            ConsoleFontInfo cfi = new ConsoleFontInfo();

            if (!WinCon.GetCurrentConsoleFont(_handle, bMax, cfi))
            {
                throw new ApplicationException("Unable to get font information.");
            }
            return(cfi.dwFontSize);
        }
Exemplo n.º 2
0
 public Coord GetFontSize(bool bMax)
 {
     if (disposed)
     {
         throw new ObjectDisposedException(this.ToString());
     }
     ConsoleFontInfo cfi = new ConsoleFontInfo();
     if (!WinCon.GetCurrentConsoleFont(_handle, bMax, cfi))
     {
         throw new ApplicationException("Unable to get font information.");
     }
     return cfi.dwFontSize;
 }
Exemplo n.º 3
0
 public static extern bool GetCurrentConsoleFont(
     IntPtr hConsoleOutput,
     bool bMaximumWindow,
     [Out][MarshalAs(UnmanagedType.LPStruct)] ConsoleFontInfo lpConsoleCurrentFont);