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

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