public static bool ShowSearchByPersonMenu(List<string> people, string title, string fanart) { var dlg = (IDialogbox)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); dlg.Reset(); dlg.SetHeading(Translation.SearchBy); GUIListItem pItem = null; int itemId = 0; pItem = new GUIListItem(Translation.SearchAll); dlg.Add(pItem); pItem.ItemId = itemId++; foreach (var person in people) { pItem = new GUIListItem(person); dlg.Add(pItem); pItem.ItemId = itemId++; } // Show Context Menu dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.SelectedId < 0) return false; // Trigger Search // If Search By 'All', the parse along list of all people if (dlg.SelectedLabelText == Translation.SearchAll) { var peopleInItem = new PersonSearch { People = people, Title = title, Fanart = fanart }; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.SearchPeople, peopleInItem.ToJSON()); } else { GUIWindowManager.ActivateWindow((int)TraktGUIWindows.PersonSummary, dlg.SelectedLabelText); } return true; }