Example #1
0
        /// <summary>
        /// Perform docking element specific actions for loading a child xml.
        /// </summary>
        /// <param name="xmlReader">Xml reader object.</param>
        /// <param name="pages">Collection of available pages.</param>
        /// <param name="child">Optional reference to existing child docking element.</param>
        protected virtual void LoadChildDockingElement(XmlReader xmlReader,
                                                       KryptonPageCollection pages,
                                                       IDockingElement child)
        {
            if (child != null)
            {
                child.LoadElementFromXml(xmlReader, pages);
            }
            else
            {
                string nodeName = xmlReader.Name;

                do
                {
                    // Read past this element
                    if (!xmlReader.Read())
                    {
                        throw new ArgumentException("An element was expected but could not be read in.");
                    }

                    // Finished when we hit the end element matching the incoming one
                    if ((xmlReader.NodeType == XmlNodeType.EndElement) && (xmlReader.Name == nodeName))
                    {
                        break;
                    }
                } while (true);
            }
        }
 /// <summary>
 /// Perform docking element specific actions for loading a child xml.
 /// </summary>
 /// <param name="xmlReader">Xml reader object.</param>
 /// <param name="pages">Collection of available pages.</param>
 /// <param name="child">Optional reference to existing child docking element.</param>
 protected override void LoadChildDockingElement(XmlReader xmlReader,
                                                 KryptonPageCollection pages,
                                                 IDockingElement child)
 {
     if (child != null)
     {
         child.LoadElementFromXml(xmlReader, pages);
     }
     else
     {
         // Create a new auto hidden group and then reload it
         KryptonDockingAutoHiddenGroup autoHiddenGroup = AppendAutoHiddenGroup(xmlReader.GetAttribute(@"N"));
         autoHiddenGroup.LoadElementFromXml(xmlReader, pages);
     }
 }
Example #3
0
 /// <summary>
 /// Perform docking element specific actions for loading a child xml.
 /// </summary>
 /// <param name="xmlReader">Xml reader object.</param>
 /// <param name="pages">Collection of available pages.</param>
 /// <param name="child">Optional reference to existing child docking element.</param>
 protected override void LoadChildDockingElement(XmlReader xmlReader,
                                                 KryptonPageCollection pages,
                                                 IDockingElement child)
 {
     if (child != null)
     {
         child.LoadElementFromXml(xmlReader, pages);
     }
     else
     {
         // Create a new floating window and then reload it
         KryptonDockingFloatingWindow floatingWindow = AddFloatingWindow(xmlReader.GetAttribute("N"));
         floatingWindow.LoadElementFromXml(xmlReader, pages);
     }
 }
Example #4
0
        /// <summary>
        /// Perform docking element specific actions for loading a child xml.
        /// </summary>
        /// <param name="xmlReader">Xml reader object.</param>
        /// <param name="pages">Collection of available pages.</param>
        /// <param name="child">Optional reference to existing child docking element.</param>
        protected override void LoadChildDockingElement(XmlReader xmlReader,
                                                        KryptonPageCollection pages,
                                                        IDockingElement child)
        {
            if (child != null)
            {
                child.LoadElementFromXml(xmlReader, pages);
            }
            else
            {
                Size   dockspaceSize = _defaultDockspaceSize;
                string elementSize   = xmlReader.GetAttribute("S");

                // Cache the loading size
                if (!string.IsNullOrEmpty(elementSize))
                {
                    dockspaceSize = CommonHelper.StringToSize(elementSize);
                }

                // Create a new dockspace and then reload it
                KryptonDockingDockspace dockspace = AppendDockspace(xmlReader.GetAttribute("N"), dockspaceSize);
                dockspace.LoadElementFromXml(xmlReader, pages);
            }
        }
Example #5
0
 /// <summary>
 /// Perform docking element specific actions for loading a child xml.
 /// </summary>
 /// <param name="xmlReader">Xml reader object.</param>
 /// <param name="pages">Collection of available pages.</param>
 /// <param name="child">Optional reference to existing child docking element.</param>
 protected override void LoadChildDockingElement(XmlReader xmlReader,
     KryptonPageCollection pages,
     IDockingElement child)
 {
     if (child != null)
         child.LoadElementFromXml(xmlReader, pages);
     else
     {
         // Create a new floating window and then reload it
         KryptonDockingFloatingWindow floatingWindow = AddFloatingWindow(xmlReader.GetAttribute("N"));
         floatingWindow.LoadElementFromXml(xmlReader, pages);
     }
 }
 /// <summary>
 /// Perform docking element specific actions for loading a child xml.
 /// </summary>
 /// <param name="xmlReader">Xml reader object.</param>
 /// <param name="pages">Collection of available pages.</param>
 /// <param name="child">Optional reference to existing child docking element.</param>
 protected override void LoadChildDockingElement(XmlReader xmlReader,
                                                 KryptonPageCollection pages,
                                                 IDockingElement child)
 {
     if (child != null)
         child.LoadElementFromXml(xmlReader, pages);
     else
     {
         // Create a new auto hidden group and then reload it
         KryptonDockingAutoHiddenGroup autoHiddenGroup = AppendAutoHiddenGroup(xmlReader.GetAttribute("N"));
         autoHiddenGroup.LoadElementFromXml(xmlReader, pages);
     }
 }
Example #7
0
        /// <summary>
        /// Perform docking element specific actions for loading a child xml.
        /// </summary>
        /// <param name="xmlReader">Xml reader object.</param>
        /// <param name="pages">Collection of available pages.</param>
        /// <param name="child">Optional reference to existing child docking element.</param>
        protected virtual void LoadChildDockingElement(XmlReader xmlReader, 
                                                       KryptonPageCollection pages, 
                                                       IDockingElement child)
        {
            if (child != null)
                child.LoadElementFromXml(xmlReader, pages);
            else
            {
                string nodeName = xmlReader.Name;

                do
                {
                    // Read past this element
                    if (!xmlReader.Read())
                        throw new ArgumentException("An element was expected but could not be read in.");

                    // Finished when we hit the end element matching the incoming one
                    if ((xmlReader.NodeType == XmlNodeType.EndElement) && (xmlReader.Name == nodeName))
                        break;

                } while (true);
            }
        }