From 00ac5cb8672a36adb0df0cf371fb9683bcdb9428 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 6 Jun 2019 12:41:34 +0300 Subject: Redundant. --- .../Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs b/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs index 9574b4082..05fa0a651 100644 --- a/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs +++ b/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs @@ -120,7 +120,7 @@ namespace Tango.Graphics2D private HitTestResultBehavior MouseDownCallback(HitTestResult result) { - if (result.VisualHit.GetType() == typeof(System.Windows.Media.DrawingVisual)) + if (result.VisualHit.GetType() == typeof(DrawingVisual)) { var visual = result.VisualHit as DrawingVisual; @@ -139,7 +139,6 @@ namespace Tango.Graphics2D } } - // Stop the hit test enumeration of objects in the visual tree. return HitTestResultBehavior.Stop; } @@ -156,7 +155,7 @@ namespace Tango.Graphics2D private HitTestResultBehavior MouseUpCallback(HitTestResult result) { - if (result.VisualHit.GetType() == typeof(System.Windows.Media.DrawingVisual)) + if (result.VisualHit.GetType() == typeof(DrawingVisual)) { var visual = result.VisualHit as DrawingVisual; @@ -175,7 +174,6 @@ namespace Tango.Graphics2D } } - // Stop the hit test enumeration of objects in the visual tree. return HitTestResultBehavior.Stop; } @@ -189,7 +187,7 @@ namespace Tango.Graphics2D private HitTestResultBehavior MouseMoveCallback(HitTestResult result) { - if (result.VisualHit.GetType() == typeof(System.Windows.Media.DrawingVisual)) + if (result.VisualHit.GetType() == typeof(DrawingVisual)) { var visual = result.VisualHit as DrawingVisual; @@ -228,7 +226,6 @@ namespace Tango.Graphics2D } } - // Stop the hit test enumeration of objects in the visual tree. return HitTestResultBehavior.Stop; } @@ -291,9 +288,7 @@ namespace Tango.Graphics2D { var context = visual.RenderOpen(); - IVisualBinder binder = null; - - if (!_binders.TryGetValue(element.GetType(), out binder)) + if (!_binders.TryGetValue(element.GetType(), out IVisualBinder binder)) { throw new InvalidOperationException($"No visual binder is registered for element type '{element.GetType()}'"); } -- cgit v1.3.1