private void GroupControl_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e) { BarItem item = e.Button.Properties.Tag as BarItem; if (item != null) { item.PerformClick(); } }
void OnSharedBarItemItemClick(object sender, ItemClickEventArgs e) { BarItem sharedBarItem = (BarItem)sender; BarItem activeBarItem = PrepareToClickAndGetActiveItem(sharedBarItem); if (activeBarItem != null) { activeBarItem.PerformClick(); } }
private void timer1_Tick(object sender, EventArgs e) { Sys_Button sys_Button = ButtonList.Find(b => b.Button_Sub == "Save"); if (sys_Button != null) { BarItem barItem = (BarItem)sys_Button.Button_BarItem; if (barItem != null) { barItem.PerformClick(); timer1.Enabled = false; } } }
void OnSharedBarItemItemClick(object sender, ItemClickEventArgs e) { try { BarItem sharedBarItem = (BarItem)sender; BarItem activeBarItem = PrepareToClickAndGetActiveItem(sharedBarItem); if (activeBarItem != null) { activeBarItem.PerformClick(); } } catch (Exception exc) { MessageBox.Show(exc.Message, "VideoRent", MessageBoxButton.OK, MessageBoxImage.Error); return; } }
public void PerformClick() { _barItem.PerformClick(); }