bug fix for B2011-070, the mouse and the enter key
This commit is contained in:
parent
87d3a95327
commit
85d4b1fafa
@ -1451,6 +1451,8 @@ namespace Volian.Controls.Library
|
||||
public void SetShortCutContextMenu(string menuName)
|
||||
{
|
||||
bool displayMenu = false;
|
||||
int moveDown = 0;
|
||||
int cnt = 0;
|
||||
E_AccStep? actable = 0;
|
||||
if (menuName.Contains("PSI")) Console.WriteLine("menu = {0}", menuName);
|
||||
|
||||
@ -1469,8 +1471,15 @@ namespace Volian.Controls.Library
|
||||
break;
|
||||
case "InsHLS":
|
||||
displayMenu = true;
|
||||
Cursor.Position = new Point(0, 0); // Enter Key hit, move mouse pointer out of way of context menu
|
||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsHLS);
|
||||
break;
|
||||
foreach (DevComponents.DotNetBar.ButtonItem bi in btnCMInsHLS.SubItems)
|
||||
{
|
||||
if (bi.Checked)
|
||||
moveDown = cnt;
|
||||
cnt++;
|
||||
}
|
||||
break;
|
||||
case "InsRNO":
|
||||
displayMenu = (actable & E_AccStep.AddingRNO) > 0;
|
||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsRNO);
|
||||
@ -1478,6 +1487,13 @@ namespace Volian.Controls.Library
|
||||
case "InsSubStps":
|
||||
displayMenu = (actable & E_AccStep.AddingSub) > 0;
|
||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsSubStps);
|
||||
if (displayMenu) Cursor.Position = new Point(0, 0); // Enter Key hit, move mouse pointer out of way of context menu
|
||||
foreach (DevComponents.DotNetBar.ButtonItem bi in btnCMInsSubStps.SubItems)
|
||||
{
|
||||
if (bi.Checked)
|
||||
moveDown = cnt;
|
||||
cnt++;
|
||||
}
|
||||
break;
|
||||
case "InsCaution":
|
||||
displayMenu = (actable & E_AccStep.AddingCaution) > 0;
|
||||
@ -1506,6 +1522,11 @@ namespace Volian.Controls.Library
|
||||
if (displayMenu)
|
||||
{
|
||||
SendKeys.Send("+{F10}{DOWN}"); // Display Context menu
|
||||
while (moveDown > 0) // position to current type
|
||||
{
|
||||
SendKeys.Send("{DOWN}");
|
||||
moveDown--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user