hasokeric
8/31/2016 - 3:25 PM

Invoke Tool Click on Any EpiBaseForm

Invoke Tool Click on Any EpiBaseForm

// Kind of Cheating, does not seem to work in MES, but works in Dashboards and Epicor
baseToolbarsManager.Tools["RefreshTool"].SharedProps.Shortcut = (Shortcut)Shortcut.ShiftF9;
SendKeys.Send("+{F9}");
MethodInfo mi = typeof(EpiBaseForm).GetMethod("handleToolClick", BindingFlags.Instance | BindingFlags.NonPublic);
mi.Invoke(MasterPackPrintForm, new object[]{"PrintClientTool",new Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MasterPackPrintForm.MainToolManager.Tools["RefreshTool"],null)});