public void InitLayout(ABCView view, XmlNode node)
        {
            foreach (XmlNode nodePanel in node.SelectNodes("C"))
            {
                DevExpress.XtraEditors.SplitGroupPanel panel = null;
                String strPanelName = nodePanel.Attributes["name"].Value.ToString();
                if (strPanelName.EndsWith("Panel1"))
                {
                    panel = this.Panel1;
                }
                else if (strPanelName.EndsWith("Panel2"))
                {
                    panel = this.Panel2;
                }
                else
                {
                    continue;
                }


                foreach (XmlNode nodeChild in nodePanel.ChildNodes)
                {
                    if (nodeChild.Name == "P")
                    {
                        if (nodeChild.Attributes["name"].Value.ToString() == "Size")
                        {
                            panel.Size  = (Size)TypeDescriptor.GetConverter(typeof(Size)).ConvertFromString(nodeChild.InnerText);
                            panel.Width = panel.Size.Width;
                        }
                    }
                    else if (nodeChild.Name == "C")
                    {
                        Component comp = ABCPresentHelper.LoadComponent(view, nodeChild);
                        if (comp is Control)
                        {
                            ((Control)comp).Parent = panel;
                        }
                    }
                }
            }
        }
Example #2
0
 internal NavigationUtils(DevExpress.XtraEditors.SplitGroupPanel container, MainForm main)
 {
     _main      = main;
     _container = container;
 }