static MenuItem SearchControl_GetCustomMenuItems(SearchControl sc) { if (!ChartPermission.ViewCharting.IsAuthorized()) { return(null); } var miResult = new MenuItem { Header = ChartMessage.Chart.NiceToString(), Icon = ExtensionsImageLoader.GetImageSortName("chartIcon.png").ToSmallImage() }; miResult.Click += delegate { var cr = new ChartRequest(sc.QueryName) { Filters = sc.FilterOptions.Select(fo => fo.ToFilter()).ToList(), }; ChartClient.OpenChartRequest(cr, null, null); }; return(miResult); }
public override void OnSelected(ChartOmniboxResult result, Window window) { if (result.QueryName == null) { return; } ChartClient.OpenChartRequest(new ChartRequest(result.QueryName), null, null); }