public static XElement ToXml(this ICombinedFragment fragment)
 {
     return(new XElement("CombinedFragment",
                         new XElement("Level", fragment.Title),
                         new XElement("OperatorType", fragment.OperatorType),
                         new XElement("Operands", fragment.Operands.Select(ToXml))));
 }
Exemplo n.º 2
0
 public static IArea GetArea(this ICombinedFragment fragment)
 {
     if (fragment == null)
     {
         throw new ArgumentNullException("fragment");
     }
     return(new AreaContainer(fragment.Operands.Select(GetArea), true));
 }
 public RootFragmentVisual(IStyle style, ICombinedFragment fragment, GridLayout gridLayout)
     : base(style, fragment, gridLayout)
 {
     TopRow      = gridLayout.HeaderRow;
     BottomRow   = gridLayout.FooterRow;
     LeftColumn  = gridLayout.Columns[0];
     RightColumn = gridLayout.Columns[gridLayout.Columns.Count - 1];
     Initialize();
 }
Exemplo n.º 4
0
        public FragmentVisual(IStyle style, ICombinedFragment fragment, GridLayout gridLayout)
            : base(style, fragment, gridLayout)
        {
            TopRow    = gridLayout.Rows[Area.Top];
            BottomRow = gridLayout.Rows[Area.Bottom];

            LeftColumn  = gridLayout.Columns[Area.Left];
            RightColumn = gridLayout.Columns[Area.Right];
            Initialize();
        }
Exemplo n.º 5
0
        protected FragmentVisualBase(IStyle style, ICombinedFragment fragment, GridLayout gridLayout)
            : base(style)
        {
            m_Fragment   = fragment;
            m_GridLayout = gridLayout;
            m_Area       = m_Fragment.GetArea();

            int topDepth  = m_Area.TopDepth();
            int leftDepth = m_Area.LeftDepth();

            int bottomDepth = m_Area.BottomDepth();
            int rightDepth  = m_Area.RightDepth();

            m_PaddingDepth =
                new Padding(
                    leftDepth,
                    rightDepth,
                    topDepth,
                    bottomDepth);
        }
Exemplo n.º 6
0
 public void Add(ICombinedFragment child)
 {
     m_Children.Push(child);
 }