mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Disable annotation hotkeys in non annotation mode
This commit is contained in:
parent
8fe7a2ea37
commit
39dfd0cc88
2 changed files with 70 additions and 60 deletions
|
@ -480,36 +480,39 @@ protected virtual void WriteTips(StringBuilder sb)
|
|||
sb.AppendLine(Resources.RectangleRegion_WriteTips__1__2__3_____0__Monitor_capture);
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips_____Active_monitor_capture);
|
||||
|
||||
sb.AppendLine();
|
||||
if (Mode == RectangleRegionMode.Annotation)
|
||||
{
|
||||
sb.AppendLine();
|
||||
|
||||
// TODO: Translate
|
||||
sb.AppendLine("[Mouse wheel] Change current tool");
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.RegionRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 0", ShapeType.RegionRectangle.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.RegionRoundedRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(ShapeType.RegionRoundedRectangle.GetLocalizedDescription());
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.RegionEllipse) sb.Append("-> ");
|
||||
sb.AppendLine(ShapeType.RegionEllipse.GetLocalizedDescription());
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 1", ShapeType.DrawingRectangle.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingRoundedRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 2", ShapeType.DrawingRoundedRectangle.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingEllipse) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 3", ShapeType.DrawingEllipse.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingLine) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 4", ShapeType.DrawingLine.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingArrow) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 5", ShapeType.DrawingArrow.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingText) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 6", ShapeType.DrawingText.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingStep) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 7", ShapeType.DrawingStep.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingBlur) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 8", ShapeType.DrawingBlur.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingPixelate) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 9", ShapeType.DrawingPixelate.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingHighlight) sb.Append("-> ");
|
||||
sb.AppendLine(ShapeType.DrawingHighlight.GetLocalizedDescription());
|
||||
// TODO: Translate
|
||||
sb.AppendLine("[Mouse wheel] Change current tool");
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.RegionRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 0", ShapeType.RegionRectangle.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.RegionRoundedRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(ShapeType.RegionRoundedRectangle.GetLocalizedDescription());
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.RegionEllipse) sb.Append("-> ");
|
||||
sb.AppendLine(ShapeType.RegionEllipse.GetLocalizedDescription());
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 1", ShapeType.DrawingRectangle.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingRoundedRectangle) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 2", ShapeType.DrawingRoundedRectangle.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingEllipse) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 3", ShapeType.DrawingEllipse.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingLine) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 4", ShapeType.DrawingLine.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingArrow) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 5", ShapeType.DrawingArrow.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingText) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 6", ShapeType.DrawingText.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingStep) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 7", ShapeType.DrawingStep.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingBlur) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 8", ShapeType.DrawingBlur.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingPixelate) sb.Append("-> ");
|
||||
sb.AppendLine(string.Format("[{0}] {1}", "Numpad 9", ShapeType.DrawingPixelate.GetLocalizedDescription()));
|
||||
if (ShapeManager.CurrentShapeType == ShapeType.DrawingHighlight) sb.Append("-> ");
|
||||
sb.AppendLine(ShapeType.DrawingHighlight.GetLocalizedDescription());
|
||||
}
|
||||
}
|
||||
|
||||
private string GetAreaText(Rectangle area)
|
||||
|
|
|
@ -854,7 +854,7 @@ private void form_MouseWheel(object sender, MouseEventArgs e)
|
|||
if (Config.MagnifierPixelCount > 2) Config.MagnifierPixelCount -= 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (form.Mode == RectangleRegionMode.Annotation)
|
||||
{
|
||||
if (e.Delta > 0)
|
||||
{
|
||||
|
@ -895,36 +895,43 @@ private void form_KeyDown(object sender, KeyEventArgs e)
|
|||
case Keys.Menu:
|
||||
IsSnapResizing = true;
|
||||
break;
|
||||
case Keys.NumPad0:
|
||||
CurrentShapeType = ShapeType.RegionRectangle;
|
||||
break;
|
||||
case Keys.NumPad1:
|
||||
CurrentShapeType = ShapeType.DrawingRectangle;
|
||||
break;
|
||||
case Keys.NumPad2:
|
||||
CurrentShapeType = ShapeType.DrawingRoundedRectangle;
|
||||
break;
|
||||
case Keys.NumPad3:
|
||||
CurrentShapeType = ShapeType.DrawingEllipse;
|
||||
break;
|
||||
case Keys.NumPad4:
|
||||
CurrentShapeType = ShapeType.DrawingLine;
|
||||
break;
|
||||
case Keys.NumPad5:
|
||||
CurrentShapeType = ShapeType.DrawingArrow;
|
||||
break;
|
||||
case Keys.NumPad6:
|
||||
CurrentShapeType = ShapeType.DrawingText;
|
||||
break;
|
||||
case Keys.NumPad7:
|
||||
CurrentShapeType = ShapeType.DrawingStep;
|
||||
break;
|
||||
case Keys.NumPad8:
|
||||
CurrentShapeType = ShapeType.DrawingBlur;
|
||||
break;
|
||||
case Keys.NumPad9:
|
||||
CurrentShapeType = ShapeType.DrawingPixelate;
|
||||
break;
|
||||
}
|
||||
|
||||
if (form.Mode == RectangleRegionMode.Annotation)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.NumPad0:
|
||||
CurrentShapeType = ShapeType.RegionRectangle;
|
||||
break;
|
||||
case Keys.NumPad1:
|
||||
CurrentShapeType = ShapeType.DrawingRectangle;
|
||||
break;
|
||||
case Keys.NumPad2:
|
||||
CurrentShapeType = ShapeType.DrawingRoundedRectangle;
|
||||
break;
|
||||
case Keys.NumPad3:
|
||||
CurrentShapeType = ShapeType.DrawingEllipse;
|
||||
break;
|
||||
case Keys.NumPad4:
|
||||
CurrentShapeType = ShapeType.DrawingLine;
|
||||
break;
|
||||
case Keys.NumPad5:
|
||||
CurrentShapeType = ShapeType.DrawingArrow;
|
||||
break;
|
||||
case Keys.NumPad6:
|
||||
CurrentShapeType = ShapeType.DrawingText;
|
||||
break;
|
||||
case Keys.NumPad7:
|
||||
CurrentShapeType = ShapeType.DrawingStep;
|
||||
break;
|
||||
case Keys.NumPad8:
|
||||
CurrentShapeType = ShapeType.DrawingBlur;
|
||||
break;
|
||||
case Keys.NumPad9:
|
||||
CurrentShapeType = ShapeType.DrawingPixelate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue