ComponentFactory.Krypton.Docking.KryptonDockingManager.AddToWorkspace C# (CSharp) Метод

AddToWorkspace() публичный Метод

Add set of pages to a docking workspace.
public AddToWorkspace ( string path, KryptonPage pages ) : KryptonDockingWorkspace
path string Path for finding the target KryptonDockingWorkspace.
pages KryptonPage Array of pages to be added.
Результат KryptonDockingWorkspace
        public virtual KryptonDockingWorkspace AddToWorkspace(string path, KryptonPage[] pages)
        {
            // Cannot add a null array
            if (pages == null)
                throw new ArgumentNullException("pages");

            // Array must contain some values
            if (pages.Length == 0)
                throw new ArgumentException("pages cannot be zero length");

            // Cannot action a null page reference
            foreach (KryptonPage page in pages)
                if (page == null)
                    throw new ArgumentNullException("pages array contains a null page reference");

            // Resolve the given path to the expected docking workspace element
            KryptonDockingWorkspace workspace = ResolvePath(path) as KryptonDockingWorkspace;
            if (workspace == null)
                throw new ArgumentException("Path does not resolve to a KryptonDockingWorkspace");

            // Append pages to the workspace
            workspace.Append(pages);
            return workspace;
        }
KryptonDockingManager