protected override void OnMouseUp(MouseEventArgs e) { if (Mode == ScreenTearingTestMode.VerticalLines) { Mode = ScreenTearingTestMode.HorizontalLines; } else { Close(); } }