From c4725ec668bc0495f61b61af27296ebd7222f3bb Mon Sep 17 00:00:00 2001 From: Jaex Date: Sat, 1 Oct 2016 12:51:16 +0300 Subject: [PATCH] Remove tool text animations because not necessary anymore --- .../Forms/RegionCaptureForm.cs | 43 ------------------- .../Properties/Resources.Designer.cs | 9 ---- .../Properties/Resources.resx | 3 -- .../Properties/Resources.ru.resx | 3 -- .../Properties/Resources.zh-CN.resx | 3 -- .../RegionCaptureOptions.cs | 1 - ShareX.ScreenCaptureLib/RegionCaptureTasks.cs | 3 +- .../Shapes/ShapeManager.cs | 3 +- 8 files changed, 2 insertions(+), 66 deletions(-) diff --git a/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs b/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs index 107ac37c0..d379d1e43 100644 --- a/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs @@ -88,7 +88,6 @@ public Color CurrentColor private int frameCount; private bool pause, isKeyAllowed; private ColorBlinkAnimation colorBlinkAnimation; - private TextAnimation shapeTypeTextAnimation; private Bitmap bmpBackgroundImage; public RegionCaptureForm(RegionCaptureMode mode) @@ -106,7 +105,6 @@ public RegionCaptureForm(RegionCaptureMode mode) timerStart = new Stopwatch(); timerFPS = new Stopwatch(); colorBlinkAnimation = new ColorBlinkAnimation(); - shapeTypeTextAnimation = new TextAnimation(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(0.5)); borderPen = new Pen(Color.Black); borderDotPen = new Pen(Color.White) { DashPattern = new float[] { 5, 5 } }; @@ -199,13 +197,6 @@ public void Prepare(Image img) ShapeManager.WindowCaptureMode = Config.DetectWindows; ShapeManager.IncludeControls = Config.DetectControls; - if (IsAnnotationMode) - { - ShapeManager.CurrentShapeTypeChanged += ShapeManager_CurrentShapeTypeChanged; - - ShapeManager_CurrentShapeTypeChanged(ShapeManager.CurrentShapeType); - } - if (Mode == RegionCaptureMode.OneClick || ShapeManager.WindowCaptureMode) { IntPtr handle = Handle; @@ -225,11 +216,6 @@ public void Prepare(Image img) } } - private void ShapeManager_CurrentShapeTypeChanged(ShapeType shapeType) - { - shapeTypeTextAnimation.Start(shapeType.GetLocalizedDescription()); - } - private void RegionCaptureForm_Shown(object sender, EventArgs e) { this.ForceActivate(); @@ -548,20 +534,6 @@ private void Draw(Graphics g) DrawTips(g); } - if (IsAnnotationMode) - { - if (Config.ShowMenuTip) - { - // Draw right click menu tip - DrawMenuTip(g); - } - else - { - // If current shape changed then draw it temporary - DrawCurrentShapeText(g); - } - } - // Draw magnifier if (Config.ShowMagnifier || Config.ShowInfo) { @@ -687,21 +659,6 @@ private void DrawTopCenterTip(Graphics g, string text, double opacity = 1) } } - private void DrawMenuTip(Graphics g) - { - DrawTopCenterTip(g, Resources.RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu); - } - - private void DrawCurrentShapeText(Graphics g) - { - shapeTypeTextAnimation.Update(); - - if (shapeTypeTextAnimation.Active) - { - DrawTopCenterTip(g, shapeTypeTextAnimation.Text, shapeTypeTextAnimation.Opacity); - } - } - private void WriteTips(StringBuilder sb) { sb.AppendLine(Resources.RectangleRegion_WriteTips__F1__Hide_tips); diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs b/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs index 3a584834f..f12d8b2d3 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs +++ b/ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs @@ -818,15 +818,6 @@ internal static string RectangleRegion_WriteTips__Space__Fullscreen_capture { } } - /// - /// Looks up a localized string similar to Tip: Right click to open options menu. - /// - internal static string RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu { - get { - return ResourceManager.GetString("RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu", resourceCulture); - } - } - /// /// Looks up a localized string similar to [Ctrl + Mouse wheel] Change current tool. /// diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.resx b/ShareX.ScreenCaptureLib/Properties/Resources.resx index 39bf942a5..15f626576 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.resx @@ -342,9 +342,6 @@ Distance: {6:0.00} px / Angle: {7:0.00}° ..\Resources\counter-reset.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Tip: Right click to open options menu - [Right click] [Menu] Open options menu diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx b/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx index 6e883e238..d346fa758 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.ru.resx @@ -338,9 +338,6 @@ Цвет подсветки... - - Совет: Кликните ПКМ, чтобы открыть меню опций - Размер пикселя: diff --git a/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx b/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx index e6207e483..39d8a1082 100644 --- a/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx +++ b/ShareX.ScreenCaptureLib/Properties/Resources.zh-CN.resx @@ -236,9 +236,6 @@ [Ctrl +鼠标滚轮] 更改画笔大小 - - 提示:右键点击打开选项菜单 - [点击右键] [菜单] 打开选项菜单 diff --git a/ShareX.ScreenCaptureLib/RegionCaptureOptions.cs b/ShareX.ScreenCaptureLib/RegionCaptureOptions.cs index 1c05286af..e513f2d20 100644 --- a/ShareX.ScreenCaptureLib/RegionCaptureOptions.cs +++ b/ShareX.ScreenCaptureLib/RegionCaptureOptions.cs @@ -70,6 +70,5 @@ public class RegionCaptureOptions public AnnotationOptions AnnotationOptions = new AnnotationOptions(); public ShapeType LastRegionTool = ShapeType.RegionRectangle; public ShapeType LastAnnotationTool = ShapeType.DrawingRectangle; - public bool ShowMenuTip = true; } } \ No newline at end of file diff --git a/ShareX.ScreenCaptureLib/RegionCaptureTasks.cs b/ShareX.ScreenCaptureLib/RegionCaptureTasks.cs index d3b9b5b4c..a538cae35 100644 --- a/ShareX.ScreenCaptureLib/RegionCaptureTasks.cs +++ b/ShareX.ScreenCaptureLib/RegionCaptureTasks.cs @@ -250,8 +250,7 @@ private static RegionCaptureOptions GetRegionCaptureOptions(RegionCaptureOptions MagnifierPixelCount = options.MagnifierPixelCount, MagnifierPixelSize = options.MagnifierPixelSize, ShowCrosshair = options.ShowCrosshair, - AnnotationOptions = options.AnnotationOptions, - ShowMenuTip = options.ShowMenuTip + AnnotationOptions = options.AnnotationOptions }; } } diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs index 3e9dd5057..0a46687a6 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs @@ -784,9 +784,8 @@ private void SwapShapeType() private void OpenOptionsMenu() { + // TODO SelectIntersectShape(); - - Config.ShowMenuTip = false; } public Point SnapPosition(Point posOnClick, Point posCurrent)