InputCommandsTests CountPressingAndReleasing Method Delta Engine Documentation

Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void CountPressingAndReleasing()
Examples

[Test, Timeout(5000)]
public void CountPressingAndReleasing()
{
    int pressed = 0;
    int released = 0;
    var fontText = new FontText(Font.Default,
        "MouseLeft pressed: " + pressed + " released: " + released, Rectangle.One);
    //ncrunch: no coverage start 
    new Command(
        () => fontText.Text = "MouseLeft pressed: " + ++pressed + " released: " + released).Add(
            new MouseButtonTrigger());
    new Command(
        () => fontText.Text = "MouseLeft pressed: " + pressed + " released: " + ++released).Add(
            new MouseButtonTrigger(MouseButton.Left, State.Releasing));
    //ncrunch: no coverage end
}
See Also