本文整理汇总了C#中PopupMenuShowingEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PopupMenuShowingEventArgs类的具体用法?C# PopupMenuShowingEventArgs怎么用?C# PopupMenuShowingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PopupMenuShowingEventArgs类属于命名空间,在下文中一共展示了PopupMenuShowingEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ASPxScheduler1_PopupMenuShowing
protected void ASPxScheduler1_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
{
e.Menu.Items.Clear();
e.Menu.Visible = false;
}
}
示例2: gridViewShowGridMenu
private void gridViewShowGridMenu(object sender, PopupMenuShowingEventArgs e)
{
try
{
m_popupMenu.ItemLinks.Clear();
GridView view = sender as GridView;
GridHitInfo hitInfo = view.CalcHitInfo(e.Point);
m_popupMenu.ItemLinks.Add(m_barButtonsMap[GUIConstants.BarButtonAddNewTaskCaption]);
if (hitInfo.InRowCell)
{
view.FocusedRowHandle = hitInfo.RowHandle;
m_currentNode = m_tableGridCaseAdapter.DataSourceList[view.FocusedRowHandle];
m_popupMenu.ItemLinks.Add(m_barButtonsMap[GUIConstants.BarButtonDeleteNodeCaption]);
}
else
{
m_currentNode = m_tableGridCaseAdapter.GetDataSourceListParent();
}
m_popupMenu.ShowPopup(m_barManager, view.GridControl.PointToScreen(e.Point));
}
catch (System.Exception ex)
{
Log.Logger.WriteErrorMessage(string.Format("Can't build TableGridPopupMenu, exception:\n\t{0}", ex.ToString()));
}
}
示例3: SchedulerControlOnPopupMenuShowing
void SchedulerControlOnPopupMenuShowing(object sender, PopupMenuShowingEventArgs popupMenuShowingEventArgs) {
var popupMenus = ((IModelListViewOptionsScheduler)View.Model).OptionsScheduler.PopupMenus;
var schedulerMenuItemIds = popupMenus.Select(popupMenu => new { ModelMenu = popupMenu, MenuId = (SchedulerMenuItemId)Enum.Parse(typeof(SchedulerMenuItemId), popupMenu.MenuId) });
var menus = schedulerMenuItemIds.Select(arg => new { arg.ModelMenu, Menu = popupMenuShowingEventArgs.Menu.GetPopupMenuById(arg.MenuId) });
foreach (var popupMenu in menus) {
new SchedulerPopupMenuModelSynchronizer(popupMenu.Menu, popupMenu.ModelMenu).ApplyModel();
}
}
示例4: approvalsGridView_PopupMenuShowing
void approvalsGridView_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e) {
DXPopupMenu popupMenu = (DXPopupMenu)e.Menu;
if (popupMenu == null)
return;
popupMenu.Items.Clear();
DXMenuItem item = new DXMenuItem("Approve", new EventHandler(this.ApproveShortSaleApproval));
popupMenu.Items.Add(item);
}
示例5: RaisePopupMenuShowingX
public static void RaisePopupMenuShowingX(this IXpandFilterControl filterControl,PopupMenuShowingEventArgs e){
if (e.MenuType == FilterControlMenuType.Clause && filterControl.ModelMembers != null){
var criteriaOperator = new XpandNodeToCriteriaProcessor().Process(e.CurrentNode);
var operandProperty = criteriaOperator.GetOperators().OfType<OperandProperty>().First();
var modelMember =filterControl.ModelMembers.Cast<IModelMemberFullTextContains>().FirstOrDefault(member => member.FullText && member.Name == operandProperty.PropertyName);
if (modelMember != null){
var dxMenuItem = new DXMenuItem(ClauseTypeEnumHelper.GetMenuStringByClauseType(ClauseTypeEnumHelper.FullText),filterControl.OnClauseClick){Tag = ClauseTypeEnumHelper.FullText};
e.Menu.Items.Add(dxMenuItem);
}
}
}
示例6: m_grv_ds_don_hang_dang_xu_ly_PopupMenuShowing
private void m_grv_ds_don_hang_dang_xu_ly_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
GridView view = sender as GridView;
// Check whether a row is right-clicked.
if (e.MenuType == DevExpress.XtraGrid.Views.Grid.GridMenuType.Row)
{
int rowHandle = e.HitInfo.RowHandle;
// Delete existing menu items, if any.
e.Menu.Items.Clear();
// Add a submenu with a single menu item.
e.Menu.Items.Add(WinFormControls.CreateRowSubMenu(view, rowHandle));
}
}
示例7: View_PopupMenuShowing
void View_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
if (e.MenuType == GridMenuType.Column) {
var view = (SmartGridView)sender;
var columns = FieldNames.Select(view.Columns.ColumnByFieldName);
var newVisiblity = !columns.First().Visible;
var caption = (newVisiblity ? "Show " : "Hide ") + Name;
var item = new DXMenuItem(caption, delegate {
foreach (var col in columns)
col.Visible = newVisiblity;
}, image: null);
e.Menu.Items.Add(item);
}
}
示例8: grwUnitList_PopupMenuShowing
private void grwUnitList_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
if (e.MenuType == GridMenuType.Row)
{
var menu = e.Menu;
menu.Items.Clear();
var itemReload = new DXMenuItem("Nạp lại")
{
Image = ImgCollection.Images["refresh2_16x16.png"],
Shortcut = Shortcut.F5
};
itemReload.Click += itemReload_Click;
menu.Items.Add(itemReload);
var itemAdd = new DXMenuItem("Thêm")
{
BeginGroup = true,
Image = ImgCollection.Images["new_16x16.png"],
Shortcut = Shortcut.CtrlN
};
itemAdd.Click += itemAdd_Click;
menu.Items.Add(itemAdd);
var itemEdit = new DXMenuItem("Sửa")
{
Image = ImgCollection.Images["edit_16x16.png"],
Shortcut = Shortcut.CtrlE
};
itemEdit.Click += itemEdit_Click;
menu.Items.Add(itemEdit);
var itemDelete = new DXMenuItem("Xóa")
{
Image = ImgCollection.Images["delete_16x16.png"],
Shortcut = Shortcut.CtrlDel
};
itemDelete.Click += itemDelete_Click;
menu.Items.Add(itemDelete);
}
}
示例9: schSchedule_OnPopupMenuShowing
protected void schSchedule_OnPopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
ASPxSchedulerPopupMenu menu = e.Menu;
menu.Items.Clear();
menu.ClientSideEvents.ItemClick =
String.Format("function(s, e) {{ DefaultAppointmentMenuHandler({0}, s, e.item.name); }}",
schSchedule.ClientID);
if (menu.Id.Equals(SchedulerMenuItemId.DefaultMenu))
{
menu.Items.Add(new DevExpress.Web.MenuItem("Створити", "NewEvent"));
}
else
{
if (menu.Id.Equals(SchedulerMenuItemId.AppointmentMenu))
{
menu.Items.Add(new DevExpress.Web.MenuItem("Редагувати", "EditOneEvent"));
menu.Items.Add(new DevExpress.Web.MenuItem("Видалити", "DeleteOneEvent"));
}
}
}
示例10: CustomMenuPopupMenuShowing
private void CustomMenuPopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
switch (e.Menu.MenuType)
{
case TreeListMenuType.Column:
HideCustomizationColumns(e.Menu);
CreateSelectLayoutSubmenu(e.Menu);
break;
case TreeListMenuType.Node:
if (CustomPopupMenu == null)
{
e.Menu.Items.Add(new DXMenuItem("Развернуть всё", ExpandAllItemClick, Resources.expand));
e.Menu.Items.Add(new DXMenuItem("Свернуть все ветки", CollapseAllItemClick, Resources.collapse));
}
else
{
if (bbiExpandAll.Links.Count == 0)
CustomPopupMenu.ItemLinks.Add(bbiExpandAll);
if (bbiCollapseAll.Links.Count == 0)
CustomPopupMenu.ItemLinks.Add(bbiCollapseAll);
ShowPopupMenu(e);
}
break;
}
}
示例11: bandedGridView1_PopupMenuShowing
private void bandedGridView1_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
if (e.HitInfo.InRow)
{
GridView view = sender as GridView;
view.FocusedRowHandle = e.HitInfo.RowHandle;
foreach (DXMenuItem item in menuItems)
e.Menu.Items.Add(item);
}
}
示例12: TreePopupMenuShowing
static void TreePopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
if (e.Menu.MenuType != TreeListMenuType.Column)
{
return;
}
foreach (var item in e.Menu.Items.Cast<DXMenuItem>().Where(item => item.Caption == "Column Chooser"))
{
item.Enabled = false;
break;
}
}
示例13: CustomMenuPopupMenuShowing
protected virtual void CustomMenuPopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
//При вызове обычного меню на клике по строке
switch (e.MenuType)
{
case GridMenuType.User:
case GridMenuType.Row:
RepositoryItem repository = null;
//Показать меню для выбора значения выделенных строк
if (OptionsBehavior.Editable && OptionsCustomization.ShowSelectedRowMenu && FocusedColumn != null &&
FocusedColumn.OptionsColumn.ShowEditorInPopupMenu && FocusedColumn.OptionsColumn.AllowEdit &&
!FocusedColumn.OptionsColumn.ReadOnly && SelectedRowsCount > 1)
{
repository = DXCustomMenuCreator.DXCreateBarItemByFocusedColumn(FocusedColumn);
var buttonRepository = repository as RepositoryItemButtonEdit;
if (buttonRepository != null && buttonRepository.Buttons.Count > 1)
{
buttonRepository.ButtonClick += ClearSelectedRowsFromMenu;
}
}
if (CustomPopupMenu != null)
{
AddButtonInPopupMenu();
DeleteButtonInPopupMenu();
var link = CustomPopupMenu.ItemLinks
.OfType<BarEditItemLink>()
.FirstOrDefault(bei => bei.Item.Id == -1);
if (link != null)
{
CustomPopupMenu.RemoveLink(link);
}
if (repository != null)
{
var bei = new BarEditItem
{
Edit = repository,
Id = -1,
Tag = FocusedColumn
};
bei.EditValueChanged += SelectedRowEditValueChanged;
CustomPopupMenu.AddItem(bei);
}
}
else
{
var dxmAdd = new DXMenuItem(AddCaption, AddRow, Resources.Add);
var dxmRemove = new DXMenuItem(RemoveCaption, RemoveRows, Resources.Remove);
if (e.MenuType == GridMenuType.User && e.Menu == null)
e.Menu = new GridViewMenu(this);
if (OptionsCustomization.AllowAdd)
e.Menu.Items.Add(dxmAdd);
if (OptionsCustomization.AllowDelete)
{
e.Menu.Items.Add(dxmRemove);
dxmRemove.Enabled = SelectedRowsCount != 0;
}
if (repository != null)
{
var bei = new DXEditMenuItem
{
Edit = repository,
Tag = FocusedColumn
};
bei.EditValueChanged += SelectedRowEditValueChanged;
e.Menu.Items.Add(bei);
}
}
break;
case GridMenuType.Column:
DXPopupMenu menu = e.Menu as GridViewColumnMenu;
if (menu == null)
{
return;
}
DXCustomMenuCreator.HideCustomizationColumns(menu);
DXCustomMenuCreator.DXCreateSelectSelectionMenu(menu, CustomItemClick, RowItemClick, CheckboxColumnItemClick);
DXCustomMenuCreator.DXCreateLayoutMenuItems(GridControl, ref menu);
break;
}
}
示例14: gvSPKSales_PopupMenuShowing
void gvSPKSales_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
GridView view = (GridView)sender;
GridHitInfo hitInfo = view.CalcHitInfo(e.Point);
if (hitInfo.InRow)
{
view.FocusedRowHandle = hitInfo.RowHandle;
cmsEditor.Show(view.GridControl, e.Point);
}
}
示例15: grdViewByTitle_PopupMenuShowing
/// <summary>
/// Handles the PopupMenuShowing event of the grdViewByTitle control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs"/> instance containing the event data.</param>
private void grdViewByTitle_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
var view = sender as GridView;
e.Allow = false;
this.popupMovieList.ShowPopup(this.barManager1, view.GridControl.PointToScreen(e.Point));
}