コード例 #1
0
        public ConsoleServer()
        {
            Sequence = new List <char>();

            ITextConsoleDevice txtDev;

            var fb = FrameBuffer.Create();

            if (fb != null)
            {
                var surface = new FramebufferSurface(fb);
                var gfx     = new GraphicsAdapter(surface);
                var fbTxt   = new FrameBufferTextScreenDevice(gfx);
                txtDev = fbTxt;
            }
            else
            {
                var biosScreen = new BiosTextConsoleDevice();
                biosScreen.Initialize();
                txtDev = biosScreen;
            }

            Dev = new ConsoleDevice();
            Dev.Initialize(txtDev);
        }
コード例 #2
0
 public unsafe ConsoleBuffer(ConsoleDevice dev)
 {
     Rows    = dev.Rows;
     Columns = dev.Columns;
     Chars   = (ConsoleChar *)RuntimeMemory.AllocateCleared(sizeof(ConsoleChar) * Rows * Columns);
 }