예제 #1
0
 public WindowSession(ApplicationSession applicationSession, InitializeOption initializeOption)
 {
     this.applicationSession = applicationSession;
     windowItemsMap = WindowItemsMap.Create(initializeOption, RectX.UnlikelyWindowPosition);
     if (windowItemsMap.LoadedFromFile) initializeOption.NonCached();
     this.initializeOption = initializeOption;
 }
예제 #2
0
 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();
 }
예제 #3
0
파일: Application.cs 프로젝트: ritro/White
 private Application(Process process)
 {
     this.process = process;
     applicationSession = new ApplicationSession();
     applicationSession.Register(this);
     windowFactory = WindowFactory.Desktop;
 }
예제 #4
0
 public WindowSession(ApplicationSession applicationSession, InitializeOption initializeOption)
 {
     this.applicationSession = applicationSession;
     windowItemsMap          = WindowItemsMap.Create(initializeOption, RectX.UnlikelyWindowPosition);
     if (windowItemsMap.LoadedFromFile)
     {
         initializeOption.NonCached();
     }
     this.initializeOption = initializeOption;
 }
예제 #5
0
 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;
 }