ComponentFactory.Krypton.Docking.KryptonDockingWorkspace.RemovePages C# (CSharp) Method

RemovePages() public method

Remove the referenced pages.
public RemovePages ( KryptonPage pages, bool disposePage ) : void
pages ComponentFactory.Krypton.Navigator.KryptonPage Array of references to pages that should be removed.
disposePage bool Should the page be disposed when removed.
return void
        public void RemovePages(KryptonPage[] pages, bool disposePage)
        {
            // Cannot remove a null reference
            if (pages == null)
                throw new ArgumentNullException("pages");

            if (pages.Length > 0)
            {
                // Cannot remove a null page reference
                string[] uniqueNames = new string[pages.Length];
                for (int i = 0; i < uniqueNames.Length; i++)
                {
                    // Cannot show a null page reference
                    if (pages[i] == null)
                        throw new ArgumentException("pages array contains a null page reference");

                    uniqueNames[i] = pages[i].UniqueName;
                }

                RemovePages(uniqueNames, disposePage);
            }
        }

Same methods

KryptonDockingWorkspace::RemovePages ( string uniqueNames, bool disposePage ) : void