From a3bf83e87c678ae40cea73047273f07a84b28e60 Mon Sep 17 00:00:00 2001 From: jlewin Date: Fri, 7 Jun 2019 11:02:08 -0700 Subject: [PATCH] Rename ArrowDirection Up/Down --- .../PartPreviewWindow/ArrowDirection.cs | 2 +- MatterControlLib/PartPreviewWindow/Popover.cs | 16 ++++++++-------- .../PartPreviewWindow/SystemWindowExtension.cs | 2 +- MatterControlLib/SetupWizard/TourPopover.cs | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/MatterControlLib/PartPreviewWindow/ArrowDirection.cs b/MatterControlLib/PartPreviewWindow/ArrowDirection.cs index 9a80d41c6..cb7592c84 100644 --- a/MatterControlLib/PartPreviewWindow/ArrowDirection.cs +++ b/MatterControlLib/PartPreviewWindow/ArrowDirection.cs @@ -30,5 +30,5 @@ either expressed or implied, of the FreeBSD Project. namespace MatterHackers.MatterControl.PartPreviewWindow { - public enum ArrowDirection { Right, Left, Top, Bottom, None } + public enum ArrowDirection { Right, Left, Up, Down, None } } diff --git a/MatterControlLib/PartPreviewWindow/Popover.cs b/MatterControlLib/PartPreviewWindow/Popover.cs index 9f2908b54..1df1d4d2f 100644 --- a/MatterControlLib/PartPreviewWindow/Popover.cs +++ b/MatterControlLib/PartPreviewWindow/Popover.cs @@ -83,11 +83,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow switch (_arrow) { - case ArrowDirection.Top: + case ArrowDirection.Up: this.Padding = originalPadding.Clone(top: originalPadding.Top + this.NotchSize); break; - case ArrowDirection.Bottom: + case ArrowDirection.Down: this.Padding = originalPadding.Clone(bottom: originalPadding.Bottom + this.NotchSize); break; @@ -146,18 +146,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow double x3 = x4 - radius; double y0 = rect.Top; - double y1 = y0 - (arrowDirection == ArrowDirection.Top ? notchSize : 0); + double y1 = y0 - (arrowDirection == ArrowDirection.Up ? notchSize : 0); double y2 = y1 - radius; double y5 = rect.Bottom; - double y4 = y5 + (arrowDirection == ArrowDirection.Bottom ? notchSize : 0); + double y4 = y5 + (arrowDirection == ArrowDirection.Down ? notchSize : 0); double y3 = y4 + radius; int p1, p3; switch (arrowDirection) { - case ArrowDirection.Bottom: + case ArrowDirection.Down: p2 = x1 + p2; p1 = (int)(p2 + notchSize); p3 = (int)(p2 - notchSize); @@ -169,7 +169,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow p3 = (int)(p2 - notchSize); break; - case ArrowDirection.Top: + case ArrowDirection.Up: p2 = x1 + p2; p1 = (int)(p2 - notchSize); p3 = (int)(p2 + notchSize); @@ -206,7 +206,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow tabShape.curve3(x1, y1, x2, y1); // C -> D - if (arrowDirection != ArrowDirection.Top) + if (arrowDirection != ArrowDirection.Up) { // D -> E tabShape.LineTo(x3, y1); @@ -242,7 +242,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow tabShape.curve3(x4, y4, x3, y4); // G -> H - if (arrowDirection != ArrowDirection.Bottom) + if (arrowDirection != ArrowDirection.Down) { // H -> A tabShape.LineTo(x2, y4); diff --git a/MatterControlLib/PartPreviewWindow/SystemWindowExtension.cs b/MatterControlLib/PartPreviewWindow/SystemWindowExtension.cs index b1b345992..e51ae2475 100644 --- a/MatterControlLib/PartPreviewWindow/SystemWindowExtension.cs +++ b/MatterControlLib/PartPreviewWindow/SystemWindowExtension.cs @@ -166,7 +166,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow if (settingsRow != null) { - settingsRow.ArrowDirection = settingsRow.ArrowDirection == ArrowDirection.Top ? ArrowDirection.Bottom: ArrowDirection.Top; + settingsRow.ArrowDirection = settingsRow.ArrowDirection == ArrowDirection.Up ? ArrowDirection.Down: ArrowDirection.Up; } } diff --git a/MatterControlLib/SetupWizard/TourPopover.cs b/MatterControlLib/SetupWizard/TourPopover.cs index d45bc5b42..9c3f47ee1 100644 --- a/MatterControlLib/SetupWizard/TourPopover.cs +++ b/MatterControlLib/SetupWizard/TourPopover.cs @@ -104,7 +104,7 @@ namespace MatterHackers.MatterControl.Tour if (targetBounds.Bottom - totalBounds.Height < 0) { // Down arrow - this.ArrowDirection = ArrowDirection.Bottom; + this.ArrowDirection = ArrowDirection.Down; // Arrow centered on target in x, to the right totalBounds = this.GetTotalBounds(); @@ -133,7 +133,7 @@ namespace MatterHackers.MatterControl.Tour else { // Up arrow - this.ArrowDirection = ArrowDirection.Top; + this.ArrowDirection = ArrowDirection.Up; // Arrow centered on target in x, to the right totalBounds = this.GetTotalBounds(); @@ -170,7 +170,7 @@ namespace MatterHackers.MatterControl.Tour } else { - this.ArrowDirection = ArrowDirection.Top; + this.ArrowDirection = ArrowDirection.Up; // Arrow centered on target in x, to the left totalBounds = this.GetTotalBounds();