public WindowLayoutGroup(WindowManagerService wndService)
        {
            CreatedDate  = DateTime.Now.ToShortTimeString();
            Name         = CreatedDate;
            SavedWindows = new List <SavedWindow>();

            _windowService = wndService;

            SaveAllWindows();
        }
        private void SaveAllWindows()
        {
            SavedWindows.Clear();

            var windows = _windowService.GetAllActiveWindows();

            foreach (var wnd in windows)
            {
                Rect rect = new Rect();
                if (WindowManagerService.GetWindowRect(wnd, ref rect))
                {
                    SavedWindows.Add(new SavedWindow(wnd, rect, WindowManagerService.IsWindowMaximized(wnd)));
                }
            }
        }