mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-05 06:30:36 +12:00
change to insert and delete
This commit is contained in:
parent
d828cc0ba0
commit
b1ef705824
|
@ -348,7 +348,7 @@ protected virtual void WriteTips(StringBuilder sb)
|
|||
|
||||
if (AreaManager.IsCreating)
|
||||
{
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips__End__Stop_region_selection);
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips__Insert__Stop_region_selection);
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips__Right_click__Cancel_region_selection);
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips__Esc__Cancel_capture);
|
||||
}
|
||||
|
@ -367,7 +367,6 @@ protected virtual void WriteTips(StringBuilder sb)
|
|||
|
||||
if (!Config.QuickCrop && !AreaManager.IsCreating && AreaManager.IsCurrentAreaValid)
|
||||
{
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips__End__Stop_region_editing);
|
||||
sb.AppendLine(string.Format(Resources.RectangleRegion_WriteTips__Arrow_keys__Resize_selected_region_from__0_, AreaManager.ResizeManager.IsBottomRightResizing ?
|
||||
Resources.RectangleRegion_WriteTips_bottom_right : Resources.RectangleRegion_WriteTips_top_left));
|
||||
sb.AppendLine(string.Format(Resources.RectangleRegion_WriteTips__Tab__Swap_resize_anchor_to__0_, AreaManager.ResizeManager.IsBottomRightResizing ?
|
||||
|
|
|
@ -291,24 +291,6 @@ internal class Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [End] Stop editing the region.
|
||||
/// </summary>
|
||||
internal static string RectangleRegion_WriteTips__End__Stop_region_editing {
|
||||
get {
|
||||
return ResourceManager.GetString("RectangleRegion_WriteTips__End__Stop_region_editing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [End] Stop region selection.
|
||||
/// </summary>
|
||||
internal static string RectangleRegion_WriteTips__End__Stop_region_selection {
|
||||
get {
|
||||
return ResourceManager.GetString("RectangleRegion_WriteTips__End__Stop_region_selection", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [Esc] Cancel capture.
|
||||
/// </summary>
|
||||
|
@ -381,6 +363,15 @@ internal class Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [Insert] Stop region selection.
|
||||
/// </summary>
|
||||
internal static string RectangleRegion_WriteTips__Insert__Stop_region_selection {
|
||||
get {
|
||||
return ResourceManager.GetString("RectangleRegion_WriteTips__Insert__Stop_region_selection", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [M] {0} magnifier.
|
||||
/// </summary>
|
||||
|
@ -490,7 +481,7 @@ internal class Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [Right click] [Insert] Cancel region selection.
|
||||
/// Looks up a localized string similar to [Right click] [Delete] Cancel region selection.
|
||||
/// </summary>
|
||||
internal static string RectangleRegion_WriteTips__Right_click__Cancel_region_selection {
|
||||
get {
|
||||
|
|
|
@ -177,7 +177,7 @@ X: {4} Y: {5}</value>
|
|||
<value>[F1] Hide tips</value>
|
||||
</data>
|
||||
<data name="RectangleRegion_WriteTips__Right_click__Cancel_region_selection" xml:space="preserve">
|
||||
<value>[Right click] [Insert] Cancel region selection</value>
|
||||
<value>[Right click] [Delete] Cancel region selection</value>
|
||||
</data>
|
||||
<data name="RectangleRegion_WriteTips__Esc__Cancel_capture" xml:space="preserve">
|
||||
<value>[Esc] Cancel capture</value>
|
||||
|
@ -290,10 +290,7 @@ X: {4} Y: {5}</value>
|
|||
<data name="RectangleRegion_WriteTips__Numpad___or____Change_triangle_angle" xml:space="preserve">
|
||||
<value>[Numpad + or -] Change triangle angle</value>
|
||||
</data>
|
||||
<data name="RectangleRegion_WriteTips__End__Stop_region_editing" xml:space="preserve">
|
||||
<value>[End] Stop editing the region</value>
|
||||
</data>
|
||||
<data name="RectangleRegion_WriteTips__End__Stop_region_selection" xml:space="preserve">
|
||||
<value>[End] Stop region selection</value>
|
||||
<data name="RectangleRegion_WriteTips__Insert__Stop_region_selection" xml:space="preserve">
|
||||
<value>[Insert] Stop region selection</value>
|
||||
</data>
|
||||
</root>
|
|
@ -149,22 +149,19 @@ private void surface_KeyDown(object sender, KeyEventArgs e)
|
|||
case Keys.Insert:
|
||||
if (IsCreating)
|
||||
{
|
||||
CancelRegionSelection();
|
||||
EndRegionSelection();
|
||||
}
|
||||
else
|
||||
{
|
||||
int areaIndex = SelectedAreaIndex;
|
||||
if (ResizeManager.Visible)
|
||||
{
|
||||
DeselectArea();
|
||||
}
|
||||
if (0 > areaIndex || areaIndex != AreaIntersect())
|
||||
{
|
||||
RegionSelection(InputManager.MousePosition);
|
||||
}
|
||||
break;
|
||||
case Keys.End:
|
||||
if (IsCreating)
|
||||
{
|
||||
EndRegionSelection();
|
||||
}
|
||||
else
|
||||
{
|
||||
DeselectArea();
|
||||
}
|
||||
break;
|
||||
case Keys.ShiftKey:
|
||||
|
@ -241,6 +238,10 @@ private void surface_KeyUp(object sender, KeyEventArgs e)
|
|||
break;
|
||||
case Keys.Delete:
|
||||
RemoveCurrentArea();
|
||||
if (IsCreating)
|
||||
{
|
||||
EndRegionSelection();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -356,10 +357,13 @@ private void CheckHover()
|
|||
private void surface_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (!IsCreating)
|
||||
{
|
||||
RegionSelection(e.Location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void surface_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue