Exemplo n.º 1
0
        protected void PopulateAncestors()
        {
            _children = new List<ScreenShotWindow>();

            IList<SystemWindow> childWindows;

            if (_systemWindow == null)
            {
                childWindows = SystemWindow.TopLevelWindows;
            }
            else
            {
                childWindows = _systemWindow.ChildWindows;
            }

            foreach (SystemWindow childSystemWindow in childWindows)
            {
                if (!childSystemWindow.IsVisible) continue;

                ScreenShotWindow window = new ScreenShotWindow(childSystemWindow);

                _children.Add(window);

                window.PopulateAncestors();
            }
        }