private void scheduler_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) { // You can find out precisely which menu it is that's being shown now, like this: // if (e.Menu.Id == SchedulerMenuItemId.AppointmentMenu) e.Menu.RemoveMenuItem(SchedulerMenuItemId.EditSeries); e.Menu.RemoveMenuItem(SchedulerMenuItemId.StatusSubMenu); e.Menu.RemoveMenuItem(SchedulerMenuItemId.LabelSubMenu); e.Menu.RemoveMenuItem(SchedulerMenuItemId.NewAllDayEvent); e.Menu.RemoveMenuItem(SchedulerMenuItemId.NewRecurringAppointment); e.Menu.RemoveMenuItem(SchedulerMenuItemId.NewRecurringEvent); e.Menu.RemoveMenuItem(SchedulerMenuItemId.GotoDate); e.Menu.RemoveMenuItem(SchedulerMenuItemId.GotoThisDay); e.Menu.RemoveMenuItem(SchedulerMenuItemId.GotoToday); e.Menu.RemoveMenuItem(SchedulerMenuItemId.RestoreOccurrence); e.Menu.RemoveMenuItem(SchedulerMenuItemId.SwitchViewMenu); e.Menu.RemoveMenuItem(SchedulerMenuItemId.SplitAppointment); var item = e.Menu.GetMenuItemById(SchedulerMenuItemId.NewAppointment); if (item != null) { item.Caption = "New Capacity &Requirement"; } }
private void schedulerControl1_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) { //if (e.Menu.Id == SchedulerMenuItemId.AppointmentMenu) //{ // SchedulerPopupMenu menuLabel = e.Menu.GetPopupMenuById(SchedulerMenuItemId.LabelSubMenu, true); // SchedulerPopupMenu menuStatus = e.Menu.GetPopupMenuById(SchedulerMenuItemId.StatusSubMenu, true); // menuLabel.Visible = false; // menuStatus.Visible = false; // return; //} //if (e.Menu.Id == SchedulerMenuItemId.DefaultMenu || e.Menu.Id == SchedulerMenuItemId.RulerMenu) //{ // SchedulerMenuItem menuAllDay = e.Menu.GetMenuItemById(SchedulerMenuItemId.NewAllDayEvent, false); // SchedulerMenuItem menuRecurrentApp = e.Menu.GetMenuItemById(SchedulerMenuItemId.NewRecurringAppointment, false); // SchedulerMenuItem menuRecurrentEv = e.Menu.GetMenuItemById(SchedulerMenuItemId.NewRecurringEvent, false); // menuAllDay.Visible = false; // menuRecurrentApp.Visible = false; // menuRecurrentEv.Visible = false; // return; //} }
void schedulerControl_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) { if (e.Menu.Id == DevExpress.XtraScheduler.SchedulerMenuItemId.AppointmentMenu) { SplitAppointmentOperationCommand command = new SplitAppointmentOperationCommand(schedulerControl); SchedulerMenuItemCommandWinAdapter menuItemCommandAdapter = new SchedulerMenuItemCommandWinAdapter(command); DXMenuItem menuItem = (DXMenuItem)menuItemCommandAdapter.CreateMenuItem(DXMenuItemPriority.Normal); menuItem.BeginGroup = true; e.Menu.Items.Add(menuItem); } }
private void SchedulerMain_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) { e.Menu.Items.Clear(); if (e.Menu.Id == SchedulerMenuItemId.AppointmentMenu) { var popupAppointment = schedulerMain.SelectedAppointments.Single(); var popupAppointmentId = (int)popupAppointment.Id; _popupDeal = _model.GetDeal(popupAppointmentId); //TwinkleHelper.GetDeal(popupAppointmentId); var openItem = new SchedulerMenuItem("Просмотр", OnOpenItemClick, Properties.Resources.view_16x16); e.Menu.Items.Add(openItem); } }
static void CurrentScheduler_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) { Stream imageStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AgendViewComponent.Resources.Report.png"); foreach (DXMenuItem item in e.Menu.Items) { SchedulerPopupMenu menuItem = item as SchedulerPopupMenu; if (menuItem != null && menuItem.Id == SchedulerMenuItemId.SwitchViewMenu) { menuItem.Items.Add(new DXMenuItem("Agenda View", OnSwitchToAgendaView, new Bitmap(Image.FromStream(imageStream), new Size(16, 16)))); } } }
private void schedulerControl1_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) { if (e.Menu.Id == DevExpress.XtraScheduler.SchedulerMenuItemId.AppointmentMenu) { // Hide the "Change View To" menu item. //DevExpress.XtraScheduler.SchedulerPopupMenu itemChangeViewTo = e.Menu.GetPopupMenuById(DevExpress.XtraScheduler.SchedulerMenuItemId.SwitchViewMenu); //itemChangeViewTo.Visible = false; //e.Menu.RemoveMenuItem(DevExpress.XtraScheduler.SchedulerMenuItemId.NewRecurringEvent); e.Menu.RemoveMenuItem(DevExpress.XtraScheduler.SchedulerMenuItemId.OpenAppointment); } DevExpress.Utils.Menu.DXMenuItem itemAc = new DevExpress.Utils.Menu.DXMenuItem("Detay Gör", new EventHandler(item_Click_RandevuAc)); e.Menu.Items.Insert(0, itemAc); DevExpress.Utils.Menu.DXMenuItem itemA = new DevExpress.Utils.Menu.DXMenuItem("Arandı Yap", new EventHandler(item_Click_Arandi)); e.Menu.Items.Insert(0, itemA); DevExpress.Utils.Menu.DXMenuItem item = new DevExpress.Utils.Menu.DXMenuItem("Sms Gönder", new EventHandler(item_Click_sms_gonder)); e.Menu.Items.Insert(0, item); DevExpress.Utils.Menu.DXMenuItem iteme = new DevExpress.Utils.Menu.DXMenuItem("E-Posta Gönder", new EventHandler(item_Click_mail_gonder)); e.Menu.Items.Insert(0, iteme); DevExpress.Utils.Menu.DXMenuItem item2 = new DevExpress.Utils.Menu.DXMenuItem("Müşteri Hareketleri", new EventHandler(item_Click_musteri_hareketleri)); e.Menu.Items.Insert(0, item2); DevExpress.Utils.Menu.DXMenuItem item0 = new DevExpress.Utils.Menu.DXMenuItem("Randevu Düzenle", new EventHandler(item_Click_RandevuDuzenle)); e.Menu.Items.Insert(0, item0); DevExpress.Utils.Menu.DXMenuItem itemYeni = new DevExpress.Utils.Menu.DXMenuItem("Yeni Özel Randevu", new EventHandler(item_Click_OzelRandevuEkle)); e.Menu.Items.Insert(0, itemYeni); DevExpress.Utils.Menu.DXMenuItem itemCopy = new DevExpress.Utils.Menu.DXMenuItem("Kopyala", new EventHandler(item_Click_Copy)); e.Menu.Items.Insert(0, itemCopy); DevExpress.Utils.Menu.DXMenuItem itemCut = new DevExpress.Utils.Menu.DXMenuItem("Kes", new EventHandler(item_Click_Cut)); e.Menu.Items.Insert(0, itemCut); DevExpress.Utils.Menu.DXMenuItem itemPaste = new DevExpress.Utils.Menu.DXMenuItem("Yapıştır", new EventHandler(item_Click_Paste)); e.Menu.Items.Insert(0, itemPaste); }
private void ctrlSchedule_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) { e.Menu.Items.Clear(); }