public void SetTagToAssociatedWindow() { DocumentWindow docWindow = FunctionalTestExtensions.GetCurrentWindow(); foreach (Microsoft.Office.Tools.CustomTaskPane pane in FunctionalTestExtensions.GetAddIn().CustomTaskPanes) { if (pane.Control.Tag == null) { pane.Control.Tag = docWindow.HWND; } } }
public HashSet <Type> GetOpenPaneTypes() { DocumentWindow docWindow = FunctionalTestExtensions.GetCurrentWindow(); //.GetApplication().Windows[1]; HashSet <Type> result = new HashSet <Type>(); foreach (Microsoft.Office.Tools.CustomTaskPane pane in FunctionalTestExtensions.GetAddIn().CustomTaskPanes) { if (pane.Control.Tag is int && (int)pane.Control.Tag == docWindow.HWND) { result.Add(pane.Control.GetType()); } } return(result); }