Exemplo n.º 1
0
        public override void UpdateCursor()
        {
            if (!EnsureCursorVisibility())
            {
                return;
            }

            // Prevents the exception of size changing during resizing.
            try {
                if (ccol >= 0 && ccol < FakeConsole.BufferWidth && crow >= 0 && crow < FakeConsole.BufferHeight)
                {
                    FakeConsole.SetCursorPosition(ccol, crow);
                }
            } catch (System.IO.IOException) {
            } catch (ArgumentOutOfRangeException) {
            }
        }
Exemplo n.º 2
0
 public void CanWriteToAnyPosition()
 {
     Console.SetCursorPosition(0, 1);
     Console.Write('A');
     Assert.AreEqual('A', Console.BufferAt(0, 1));
 }