Ejemplo n.º 1
0
 private void CommonInitialize(int level, DataCellsList dataRowCells, ref int currentIndex, ref int maxLevel, InitializationContext context)
 {
     Initialize(context);
     if (m_customProperties != null)
     {
         context.RegisterRunningValues(m_runningValues);
         m_customProperties.Initialize(null, isCustomProperty: true, context);
         context.UnRegisterRunningValues(m_runningValues);
     }
     if (m_innerHeadings != null)
     {
         Global.Tracer.Assert(context.AggregateEscalateScopes != null);
         if (m_grouping != null)
         {
             context.AggregateEscalateScopes.Add(m_grouping.Name);
         }
         m_headingSpan += m_innerHeadings.Initialize(level + 1, dataRowCells, ref currentIndex, ref maxLevel, context);
         if (m_grouping != null)
         {
             context.AggregateEscalateScopes.RemoveAt(context.AggregateEscalateScopes.Count - 1);
         }
     }
     else
     {
         currentIndex++;
     }
 }
Ejemplo n.º 2
0
        internal void Initialize(InitializationContext context, Mode mode)
        {
            if (m_styleClass != null)
            {
                m_styleClass.Initialize(context);
            }
            if (m_title != null)
            {
                m_title.Initialize(context);
            }
            if (m_minorGridLines != null)
            {
                context.ExprHostBuilder.MinorGridLinesStyleStart();
                m_minorGridLines.Initialize(context);
                context.ExprHostBuilder.MinorGridLinesStyleEnd();
            }
            if (m_majorGridLines != null)
            {
                context.ExprHostBuilder.MajorGridLinesStyleStart();
                m_majorGridLines.Initialize(context);
                context.ExprHostBuilder.MajorGridLinesStyleEnd();
            }
            string str = mode.ToString();

            if (m_min != null)
            {
                m_min.Initialize(str + ".Min", context);
                context.ExprHostBuilder.AxisMin(m_min);
            }
            if (m_max != null)
            {
                m_max.Initialize(str + ".Max", context);
                context.ExprHostBuilder.AxisMax(m_max);
            }
            if (m_crossAt != null)
            {
                m_crossAt.Initialize(str + ".CrossAt", context);
                context.ExprHostBuilder.AxisCrossAt(m_crossAt);
            }
            if (m_majorInterval != null)
            {
                m_majorInterval.Initialize(str + ".MajorInterval", context);
                context.ExprHostBuilder.AxisMajorInterval(m_majorInterval);
            }
            if (m_minorInterval != null)
            {
                m_minorInterval.Initialize(str + ".MinorInterval", context);
                context.ExprHostBuilder.AxisMinorInterval(m_minorInterval);
            }
            if (m_customProperties != null)
            {
                m_customProperties.Initialize(str + ".", isCustomProperty: true, context);
            }
        }
Ejemplo n.º 3
0
 internal void Initialize(InitializationContext context)
 {
     context.ExprHostBuilder.GroupingStart(m_name);
     DataRendererInitialize(context);
     if (m_groupExpressions != null)
     {
         for (int i = 0; i < m_groupExpressions.Count; i++)
         {
             ExpressionInfo expressionInfo = m_groupExpressions[i];
             expressionInfo.GroupExpressionInitialize(context);
             context.ExprHostBuilder.GroupingExpression(expressionInfo);
         }
     }
     if (m_groupLabel != null)
     {
         m_groupLabel.Initialize("Label", context);
         context.ExprHostBuilder.GenericLabel(m_groupLabel);
     }
     if (m_filters != null)
     {
         for (int j = 0; j < m_filters.Count; j++)
         {
             m_filters[j].Initialize(context);
         }
     }
     if (m_parent != null)
     {
         context.ExprHostBuilder.GroupingParentExpressionsStart();
         for (int k = 0; k < m_parent.Count; k++)
         {
             ExpressionInfo expressionInfo2 = m_parent[k];
             expressionInfo2.GroupExpressionInitialize(context);
             context.ExprHostBuilder.GroupingParentExpression(expressionInfo2);
         }
         context.ExprHostBuilder.GroupingParentExpressionsEnd();
     }
     if (m_customProperties != null)
     {
         m_customProperties.Initialize(null, isCustomProperty: true, context);
     }
     if (m_userSortExpressions != null)
     {
         context.ExprHostBuilder.UserSortExpressionsStart();
         for (int l = 0; l < m_userSortExpressions.Count; l++)
         {
             ExpressionInfo expression = m_userSortExpressions[l];
             context.ExprHostBuilder.UserSortExpression(expression);
         }
         context.ExprHostBuilder.UserSortExpressionsEnd();
     }
     context.ExprHostBuilder.GroupingEnd();
 }
Ejemplo n.º 4
0
        internal void Initialize(InitializationContext context)
        {
            ExprHostBuilder exprHostBuilder = context.ExprHostBuilder;

            exprHostBuilder.ChartDataPointStart();
            for (int i = 0; i < m_dataValues.Count; i++)
            {
                m_dataValues[i].Initialize("DataPoint", context);
                exprHostBuilder.ChartDataPointDataValue(m_dataValues[i]);
            }
            if (m_dataLabel != null)
            {
                m_dataLabel.Initialize(context);
            }
            if (m_action != null)
            {
                m_action.Initialize(context);
            }
            if (m_styleClass != null)
            {
                exprHostBuilder.DataPointStyleStart();
                m_styleClass.Initialize(context);
                exprHostBuilder.DataPointStyleEnd();
            }
            if (m_markerStyleClass != null)
            {
                exprHostBuilder.DataPointMarkerStyleStart();
                m_markerStyleClass.Initialize(context);
                exprHostBuilder.DataPointMarkerStyleEnd();
            }
            if (m_markerSize != null)
            {
                double size = context.ValidateSize(m_markerSize, "MarkerSize");
                m_markerSize = Converter.ConvertSize(size);
            }
            if (m_customProperties != null)
            {
                m_customProperties.Initialize(null, isCustomProperty: true, context);
            }
            DataRendererInitialize(context);
            m_exprHostID = exprHostBuilder.ChartDataPointEnd();
        }
Ejemplo n.º 5
0
 internal virtual bool Initialize(InitializationContext context)
 {
     if (m_top == null)
     {
         m_top      = "0mm";
         m_topValue = 0.0;
     }
     else
     {
         m_topValue = context.ValidateSize(ref m_top, "Top");
     }
     if (m_left == null)
     {
         m_left      = "0mm";
         m_leftValue = 0.0;
     }
     else
     {
         m_leftValue = context.ValidateSize(ref m_left, "Left");
     }
     if (m_parent != null)
     {
         bool flag = true;
         if (m_width == null)
         {
             if ((context.Location & LocationFlags.InMatrixOrTable) == 0)
             {
                 if (ObjectType.Table == context.ObjectType || ObjectType.Matrix == context.ObjectType)
                 {
                     m_width      = "0mm";
                     m_widthValue = 0.0;
                     flag         = false;
                 }
                 else if (ObjectType.PageHeader == context.ObjectType || ObjectType.PageFooter == context.ObjectType)
                 {
                     Report report = m_parent as Report;
                     m_widthValue = report.PageSectionWidth;
                     m_width      = Converter.ConvertSize(m_widthValue);
                 }
                 else
                 {
                     m_widthValue = Math.Round(m_parent.m_widthValue - m_leftValue, Validator.DecimalPrecision);
                     m_width      = Converter.ConvertSize(m_widthValue);
                 }
             }
             else
             {
                 flag = false;
             }
         }
         if (flag)
         {
             m_widthValue = context.ValidateSize(m_width, "Width");
         }
         flag = true;
         if (m_height == null)
         {
             if ((context.Location & LocationFlags.InMatrixOrTable) == 0)
             {
                 if (ObjectType.Table == context.ObjectType || ObjectType.Matrix == context.ObjectType)
                 {
                     m_height      = "0mm";
                     m_heightValue = 0.0;
                     flag          = false;
                 }
                 else
                 {
                     m_heightValue = Math.Round(m_parent.m_heightValue - m_topValue, Validator.DecimalPrecision);
                     m_height      = Converter.ConvertSize(m_heightValue);
                 }
             }
             else
             {
                 flag = false;
             }
         }
         if (flag)
         {
             m_heightValue = context.ValidateSize(m_height, "Height");
         }
     }
     else
     {
         m_widthValue  = context.ValidateSize(ref m_width, "Width");
         m_heightValue = context.ValidateSize(ref m_height, "Height");
     }
     if ((context.Location & LocationFlags.InMatrixOrTable) == 0)
     {
         ValidateParentBoundaries(context, context.ObjectType, context.ObjectName);
     }
     if (m_styleClass != null)
     {
         m_styleClass.Initialize(context);
     }
     if (m_label != null)
     {
         m_label.Initialize("Label", context);
         context.ExprHostBuilder.GenericLabel(m_label);
     }
     if (m_bookmark != null)
     {
         m_bookmark.Initialize("Bookmark", context);
         context.ExprHostBuilder.ReportItemBookmark(m_bookmark);
     }
     if (m_toolTip != null)
     {
         m_toolTip.Initialize("ToolTip", context);
         context.ExprHostBuilder.ReportItemToolTip(m_toolTip);
     }
     if (m_customProperties != null)
     {
         m_customProperties.Initialize(null, isCustomProperty: true, context);
     }
     DataRendererInitialize(context);
     return(false);
 }