Console IsEnabled Property Delta Engine Documentation

Namespace: DeltaEngine.Scenes.Terminal
Assembly: DeltaEngine.Scenes.Terminal (in DeltaEngine.Scenes.Terminal.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public bool IsEnabled { get; set; }

Property Value

Type: Boolean
Remarks

Tests: DeltaEngine.Scenes.Terminal.Tests.ConsoleTests
Examples

3 unit tests call DeltaEngine.Scenes.Terminal.Console.IsEnabled
[Test]
public void CreateConsole()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage
    Assert.AreEqual(0.01f, console.DrawArea.Left);
    Assert.AreEqual(0.1f, console.DrawArea.Top);
    Assert.AreEqual(0.99f, console.DrawArea.Right);
    Assert.AreEqual(0.98f, console.DrawArea.Width);
    Assert.AreEqual(0.352f, console.DrawArea.Bottom);
    Assert.IsTrue(console.IsEnabled);
    Assert.AreEqual(Console.EnabledBackgroundColor, console.Color);
}
[Test, CloseAfterFirstFrame]
public void RenderDisabledConsole()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage
    console.IsEnabled = false;
}
[Test, CloseAfterFirstFrame]
public void TypingDoesNotGoIntoTheCommandLineIfNotEnabled()
{
    if (keyboard == null)
        return; //ncrunch: no coverage
    console.IsEnabled = false;
    PressKeys(new List<Key> { Key.A, Key.B, Key.C });
See Also