public void getResults(List <IInputData> inputDataList, List <ICatItem> resultsList) { if (!inputDataList[0].hasLabel(m_labelHash)) { return; } string windowNameToMatch = inputDataList[1].getText(); if (windowNameToMatch == "") { return; } m_windowNameMatcher.windowNameToMatch = windowNameToMatch; m_topLevelWindows = m_windowController.topLevelWindows(); foreach (string windowName in m_topLevelWindows.Keys) { if (m_windowNameMatcher.hasMatch(windowName)) { ICatItem result = m_catItemFactory.createCatItem( windowName + ".go-y", windowName, getID(), getIcon()); resultsList.Add(result); } } }
public WindowsDictionary topLevelWindows() { WindowsDictionary windowsDict = new WindowsDictionary(); SystemWindow[] allTopLevelWindows = SystemWindow.AllToplevelWindows; foreach (SystemWindow window in allTopLevelWindows) { if (window.HWnd == (IntPtr)0) { continue; } if (window.Title == "") { continue; } if (windowsDict.ContainsKey(window.Title)) { continue; } windowsDict.Add(window.Title, window.HWnd); } return(windowsDict); }
public void getResults(List<IInputData> inputDataList, List<ICatItem> resultsList) { if (!inputDataList[0].hasLabel(m_labelHash)) { return; } string windowNameToMatch = inputDataList[1].getText(); if (windowNameToMatch == "") { return; } m_windowNameMatcher.windowNameToMatch = windowNameToMatch; m_topLevelWindows = m_windowController.topLevelWindows(); foreach (string windowName in m_topLevelWindows.Keys) { if (m_windowNameMatcher.hasMatch(windowName)) { ICatItem result = m_catItemFactory.createCatItem( windowName + ".go-y", windowName, getID(), getIcon()); resultsList.Add(result); } } }