Exemplo n.º 1
0
        public LayoutSiteList Clone(LayoutNode layout)
        {
            if (layout == null)
            {
                throw new ArgumentNullException(nameof(layout));
            }

            return(new LayoutSiteList(layout, this));
        }
Exemplo n.º 2
0
        public LayoutSiteList(LayoutNode layout, JToken json)
        {
            m_layout = layout ?? throw new ArgumentNullException(nameof(layout));

            foreach (var jsonLayoutSite in json ?? throw new ArgumentNullException(nameof(json)))
            {
                Add(new LayoutSite(m_layout, jsonLayoutSite));
            }
        }
Exemplo n.º 3
0
 private static void Style(LayoutNode layoutNode, ITheme theme, string stylePath)
 {
     foreach (var layoutSite in layoutNode.LayoutSites)
     {
         if (layoutSite.Node != null)
         {
             var layoutSylePath = AppendStyle(stylePath, layoutSite.Style);
             Style(layoutSite.Node, theme, layoutSylePath);
         }
     }
 }
Exemplo n.º 4
0
        protected LayoutSite(LayoutNode parent, LayoutSite prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_parent = parent ?? throw new ArgumentNullException(nameof(parent));
            m_path   = prototype.m_path.Clone();

            m_style           = prototype.m_style;
            m_pathOrientation = prototype.m_pathOrientation.Clone();
            m_node            = prototype.m_node?.Clone();
        }
Exemplo n.º 5
0
        public LayoutSite(LayoutNode parent, IPathGeometry pathGeometry)
        {
            if (pathGeometry == null)
            {
                throw new ArgumentNullException(nameof(pathGeometry));
            }

            m_parent = parent ?? throw new ArgumentNullException(nameof(parent));
            m_path   = pathGeometry.Prototype.Clone();

            m_style           = null;
            m_pathOrientation = PathOrientation.CreateDefault();
            m_node            = null;
        }
Exemplo n.º 6
0
        protected LayoutSiteList(LayoutNode layout, IList <LayoutSite> prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_layout = layout ?? throw new ArgumentNullException(nameof(layout));

            foreach (var layoutSite in prototype)
            {
                Add(layoutSite.Clone(m_layout));
            }
        }
Exemplo n.º 7
0
        public LayoutSite(LayoutNode parent, JToken json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            m_parent = parent ?? throw new ArgumentNullException(nameof(parent));
            m_path   = PathFactory.Create(json[JsonNames.Bounds]);

            m_style           = (string)json[JsonNames.Style];
            m_pathOrientation = new PathOrientation(json[JsonNames.PathOrientation]);

            var jsonNode = json[JsonNames.Node];

            if (jsonNode != null)
            {
                m_node = NodeFactory.Singleton.Create(jsonNode);
            }
        }
Exemplo n.º 8
0
 public LayoutSite Clone(LayoutNode layout)
 {
     return(new LayoutSite(layout, this));
 }
Exemplo n.º 9
0
 public LayoutSiteList(LayoutNode layout)
 {
     m_layout = layout ?? throw new ArgumentNullException(nameof(layout));
 }
Exemplo n.º 10
0
 protected LayoutNode(LayoutNode prototype) : base(prototype)
 {
 }