Beispiel #1
0
        private static void LoadUnPinnedToolDataNodes(ILayoutFactory iLayoutFactory, Dictionary <string, UserControl> viewsMap, WindowLocation windowLocation, XmlElement xmlParentElement)
        {
            foreach (var xmlChildNode in xmlParentElement.ChildNodes)
            {
                if (xmlChildNode is XmlElement)
                {
                    if ((xmlChildNode as XmlElement).Name == "UnpinnedToolData")
                    {
                        XmlElement xmlUnpinnedToolData = xmlChildNode as XmlElement;

                        string guid         = GetStringAttribute(xmlUnpinnedToolData, "Sibling");
                        bool   isHorizontal = GetBooleanAttribute(xmlUnpinnedToolData, "IsHorizontal");
                        bool   isFirst      = GetBooleanAttribute(xmlUnpinnedToolData, "IsFirst");

                        foreach (var xmlUnpinnedToolDataChildNode in xmlUnpinnedToolData.ChildNodes)
                        {
                            if (xmlUnpinnedToolDataChildNode is XmlElement)
                            {
                                if ((xmlUnpinnedToolDataChildNode as XmlElement).Name == "ToolPaneGroup")
                                {
                                    ToolPaneGroup toolPaneGroup    = iLayoutFactory.MakeToolPaneGroup();
                                    XmlElement    xmlToolPaneGroup = xmlUnpinnedToolDataChildNode as XmlElement;
                                    LoadTools(viewsMap, xmlToolPaneGroup, toolPaneGroup.IViewContainer);
                                    iLayoutFactory.MakeUnpinnedToolPaneGroup(windowLocation, toolPaneGroup, guid, isHorizontal, isFirst);
                                }
                            }
                        }
                    }
                }
            }
        }