Fixed code so that Right-Click is accounted for before going to an enhanced document
This commit is contained in:
parent
3d38002678
commit
b087ce9996
@ -342,7 +342,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
void MyStepRTB_OpenContextMenu(object sender, StepRTBLocationEventArgs args)
|
void MyStepRTB_OpenContextMenu(object sender, StepRTBLocationEventArgs args)
|
||||||
{
|
{
|
||||||
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.OpenContextMenu(args.Location);
|
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.OpenContextMenu(args.Location, sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyStepRTB_SetMenu(object sender, StepRTBMenuEventArgs args)
|
void MyStepRTB_SetMenu(object sender, StepRTBMenuEventArgs args)
|
||||||
|
@ -584,7 +584,7 @@ namespace Volian.Controls.Library
|
|||||||
if (args.MenuGroup == null)
|
if (args.MenuGroup == null)
|
||||||
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ClearContextMenu();
|
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ClearContextMenu();
|
||||||
else if (args.MenuGroup == "OpenContextMenu")
|
else if (args.MenuGroup == "OpenContextMenu")
|
||||||
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.SetContextMenu();
|
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.SetContextMenu(sender);
|
||||||
else
|
else
|
||||||
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.SetShortCutContextMenu(args.MenuGroup);
|
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.SetShortCutContextMenu(args.MenuGroup);
|
||||||
}
|
}
|
||||||
@ -708,7 +708,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
void _MyStepRTB_OpenContextMenu(object sender, StepRTBLocationEventArgs args)
|
void _MyStepRTB_OpenContextMenu(object sender, StepRTBLocationEventArgs args)
|
||||||
{
|
{
|
||||||
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.OpenContextMenu(args.Location);
|
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.OpenContextMenu(args.Location, sender);
|
||||||
}
|
}
|
||||||
void _MyStepRTB_DoMouseWheel(object sender, System.Windows.Forms.MouseEventArgs args)
|
void _MyStepRTB_DoMouseWheel(object sender, System.Windows.Forms.MouseEventArgs args)
|
||||||
{
|
{
|
||||||
|
@ -119,14 +119,14 @@ namespace Volian.Controls.Library
|
|||||||
#region Save ROs from Word Document jcb 20121221
|
#region Save ROs from Word Document jcb 20121221
|
||||||
private string MyLookupData;
|
private string MyLookupData;
|
||||||
private Dictionary<string, string> MyAvailableROs;
|
private Dictionary<string, string> MyAvailableROs;
|
||||||
public void SetContextMenu()
|
public void SetContextMenu(object sender)
|
||||||
{
|
{
|
||||||
AddEnhancedDocumentMenu(btnCMRtfEdit);
|
AddEnhancedDocumentMenu(btnCMRtfEdit, sender);
|
||||||
AddWROContext(btnCMRtfEdit);
|
AddWROContext(btnCMRtfEdit);
|
||||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
|
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddEnhancedDocumentMenu(DevComponents.DotNetBar.ButtonItem myButtonItem)
|
private void AddEnhancedDocumentMenu(DevComponents.DotNetBar.ButtonItem myButtonItem, object sender)
|
||||||
{
|
{
|
||||||
// get a list of all of the current enhanced buttons that been defined for context menu
|
// get a list of all of the current enhanced buttons that been defined for context menu
|
||||||
List<string> unusedEnhancedButtons = new List<string>();
|
List<string> unusedEnhancedButtons = new List<string>();
|
||||||
@ -136,7 +136,8 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
// for all enhanced documents, get the list of buttons as they should be for the
|
// for all enhanced documents, get the list of buttons as they should be for the
|
||||||
// selected step
|
// selected step
|
||||||
StepConfig sc = new StepConfig(_MyStepRTB.MyItemInfo.MyContent.Config);
|
StepRTB myStepRTB = sender as StepRTB ?? _MyStepRTB;
|
||||||
|
StepConfig sc = new StepConfig(myStepRTB.MyItemInfo.MyContent.Config);
|
||||||
DVEnhancedDocuments dveds = MyItemInfo.MyDocVersion.DocVersionConfig.MyEnhancedDocuments;
|
DVEnhancedDocuments dveds = MyItemInfo.MyDocVersion.DocVersionConfig.MyEnhancedDocuments;
|
||||||
foreach(EnhancedDocument ed in sc.MyEnhancedDocuments)
|
foreach(EnhancedDocument ed in sc.MyEnhancedDocuments)
|
||||||
{
|
{
|
||||||
@ -412,9 +413,9 @@ namespace Volian.Controls.Library
|
|||||||
if (rtabTableGridTools.Visible)
|
if (rtabTableGridTools.Visible)
|
||||||
_ContextMenuBar.SetContextMenuEx(MyFlexGrid, btnCMGrid);
|
_ContextMenuBar.SetContextMenuEx(MyFlexGrid, btnCMGrid);
|
||||||
}
|
}
|
||||||
public void OpenContextMenu(Point loc)
|
public void OpenContextMenu(Point loc, object sender)
|
||||||
{
|
{
|
||||||
AddEnhancedDocumentMenu(btnCMRtfEdit);
|
AddEnhancedDocumentMenu(btnCMRtfEdit,sender);
|
||||||
btnCMRtfEdit.Popup(loc);
|
btnCMRtfEdit.Popup(loc);
|
||||||
}
|
}
|
||||||
private int _MyLastFormatID = -1;
|
private int _MyLastFormatID = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user