Beispiel #1
0
        public LayoutSiteList Clone(LayoutNode layout)
        {
            if (layout == null)
            {
                throw new ArgumentNullException(nameof(layout));
            }

            return(new LayoutSiteList(layout, this));
        }
Beispiel #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));
            }
        }
Beispiel #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);
         }
     }
 }
Beispiel #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();
        }
Beispiel #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;
        }
Beispiel #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));
            }
        }
Beispiel #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);
            }
        }
Beispiel #8
0
 public LayoutSite Clone(LayoutNode layout)
 {
     return(new LayoutSite(layout, this));
 }
Beispiel #9
0
 public LayoutSiteList(LayoutNode layout)
 {
     m_layout = layout ?? throw new ArgumentNullException(nameof(layout));
 }
Beispiel #10
0
 protected LayoutNode(LayoutNode prototype) : base(prototype)
 {
 }