This commit is contained in:
parent
3b3a7141f4
commit
7df8f47ea7
@ -565,7 +565,10 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
string ostring = SelectedText;
|
string ostring = SelectedText;
|
||||||
if ((char.IsUpper(ostring, 0) && char.IsUpper(ostring, 1)) ||
|
if (ostring.Length == 0) return; // nothing selected
|
||||||
|
if (ostring.Length == 1)
|
||||||
|
type = char.IsUpper(ostring, 0) ? 'l' : 'U';
|
||||||
|
else if ((char.IsUpper(ostring, 0) && char.IsUpper(ostring, 1)) ||
|
||||||
(char.IsLower(ostring, 0) && char.IsUpper(ostring, 1))) type = 'l'; // lower case
|
(char.IsLower(ostring, 0) && char.IsUpper(ostring, 1))) type = 'l'; // lower case
|
||||||
else if ((char.IsUpper(ostring, 0) && char.IsLower(ostring, 1))) type = 'U'; // upper case
|
else if ((char.IsUpper(ostring, 0) && char.IsLower(ostring, 1))) type = 'U'; // upper case
|
||||||
else type = 'T'; // Title case
|
else type = 'T'; // Title case
|
||||||
@ -1056,7 +1059,7 @@ namespace Volian.Controls.Library
|
|||||||
private bool _HandlingCtrlA = false;
|
private bool _HandlingCtrlA = false;
|
||||||
private void HandleLocalSelectionChange()
|
private void HandleLocalSelectionChange()
|
||||||
{
|
{
|
||||||
if (MyStepItem.MyStepPanel.SelectedStepRTB != this)
|
if (MyStepItem != null && MyStepItem.MyStepPanel.SelectedStepRTB != this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HandleSelectionChange();
|
HandleSelectionChange();
|
||||||
@ -1692,8 +1695,15 @@ namespace Volian.Controls.Library
|
|||||||
SendKeys.Send("%H{ESC}");
|
SendKeys.Send("%H{ESC}");
|
||||||
break;
|
break;
|
||||||
case Keys.Tab:
|
case Keys.Tab:
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
if (MyStepItem == null)
|
||||||
|
{
|
||||||
|
Form frm = ParentForm(this);
|
||||||
|
if (frm != null)
|
||||||
|
frm.SelectNextControl(this, true, true, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
if (!e.Control && !e.Shift && !e.Alt)
|
if (!e.Control && !e.Shift && !e.Alt)
|
||||||
@ -1707,6 +1717,12 @@ namespace Volian.Controls.Library
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private static Form ParentForm(Control ctrl)
|
||||||
|
{
|
||||||
|
while (!(ctrl.Parent is Form)) ctrl = ctrl.Parent;
|
||||||
|
return ctrl.Parent as Form;
|
||||||
|
}
|
||||||
|
|
||||||
private void StepRTB_HomeEndPressed(KeyEventArgs keyargs)
|
private void StepRTB_HomeEndPressed(KeyEventArgs keyargs)
|
||||||
{
|
{
|
||||||
if (MyItemInfo.IsProcedure || MyItemInfo.IsSection) return;
|
if (MyItemInfo.IsProcedure || MyItemInfo.IsSection) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user