Пример #1
0
        /// <summary>
        /// Return an array of the visible pages that are inside the cell that contains the provided unique name.
        /// </summary>
        /// <param name="uniqueName">Unique name of page that is inside the target cell.</param>
        /// <returns>Array of page references.</returns>
        public KryptonPage[] CellVisiblePages(string uniqueName)
        {
            List <KryptonPage> pages = new List <KryptonPage>();

            // Grab the cell that contains the provided unique name
            KryptonWorkspaceCell cell = SpaceControl.CellForUniqueName(uniqueName);

            if (cell != null)
            {
                // Only interested in visible pages that are not placeholders
                foreach (KryptonPage page in cell.Pages)
                {
                    if (!(page is KryptonStorePage) && page.LastVisibleSet)
                    {
                        pages.Add(page);
                    }
                }
            }

            return(pages.ToArray());
        }
Пример #2
0
 /// <summary>
 /// Return the workspace cell that contains the named page.
 /// </summary>
 /// <param name="uniqueName">Unique name for search.</param>
 /// <returns>Reference to KryptonWorkspaceCell if match found; otherwise null.</returns>
 public KryptonWorkspaceCell CellForPage(string uniqueName)
 {
     return(SpaceControl.CellForUniqueName(uniqueName));
 }