public WindowSession(ApplicationSession applicationSession, InitializeOption initializeOption) { this.applicationSession = applicationSession; windowItemsMap = WindowItemsMap.Create(initializeOption, RectX.UnlikelyWindowPosition); if (windowItemsMap.LoadedFromFile) initializeOption.NonCached(); this.initializeOption = initializeOption; }
public virtual List<Window> DesktopWindows(Process process, ApplicationSession applicationSession) { return (from automationElement in FindAllWindowElements(process) let initializeOption = InitializeOption.NoCache select Create(automationElement, initializeOption, applicationSession.WindowSession(initializeOption))) .ToList(); }
private Application(Process process) { this.process = process; applicationSession = new ApplicationSession(); applicationSession.Register(this); windowFactory = WindowFactory.Desktop; }
public WindowSession(ApplicationSession applicationSession, InitializeOption initializeOption) { this.applicationSession = applicationSession; windowItemsMap = WindowItemsMap.Create(initializeOption, RectX.UnlikelyWindowPosition); if (windowItemsMap.LoadedFromFile) { initializeOption.NonCached(); } this.initializeOption = initializeOption; }
public virtual List<Window> DesktopWindows(Process process, ApplicationSession applicationSession) { BricksCollection<AutomationElement> collection = FindAllWindowElements(process); var list = new List<Window>(); foreach (AutomationElement automationElement in collection) { InitializeOption initializeOption = InitializeOption.NoCache; list.Add(Create(automationElement, initializeOption, applicationSession.WindowSession(initializeOption))); } return list; }