internal object PublishClone(AutomaticSubtotalContext context, bool isSubtotalMember)
        {
            Visibility visibility = null;

            if (isSubtotalMember)
            {
                visibility          = new Visibility();
                visibility.m_hidden = ExpressionInfo.CreateConstExpression(value: true);
            }
            else
            {
                visibility = (Visibility)MemberwiseClone();
                if (m_hidden != null)
                {
                    visibility.m_hidden = (ExpressionInfo)m_hidden.PublishClone(context);
                }
                if (m_toggle != null)
                {
                    context.AddVisibilityWithToggleToUpdate(visibility);
                    visibility.m_toggle = (string)m_toggle.Clone();
                }
            }
            visibility.m_isClone = true;
            return(visibility);
        }
 public void Parse(string name, List <string> defaultValues, string type, string nullable, ExpressionInfo prompt, string promptUser, string allowBlank, string multiValue, string usedInQuery, bool hidden, ErrorContext errorContext, CultureInfo language)
 {
     base.Parse(name, defaultValues, type, nullable, prompt, promptUser, allowBlank, multiValue, usedInQuery, hidden, errorContext, language);
     if (hidden)
     {
         this.m_prompt = ExpressionInfo.CreateConstExpression("");
     }
     else if (prompt == null)
     {
         this.m_prompt = ExpressionInfo.CreateConstExpression(name + ":");
     }
     else
     {
         this.m_prompt = prompt;
     }
     this.ValidateExpressionDataTypes(this.m_validValuesValueExpressions, errorContext, name, "ValidValue", true, language);
     this.ValidateExpressionDataTypes(this.m_defaultExpressions, errorContext, name, "DefaultValue", false, language);
 }
示例#3
0
        public void InsertAggregateIndicatorJoinCondition(Field field, int fieldIndex, Field aggregateIndicatorField, int aggregateIndicatorFieldIndex, InitializationContext context)
        {
            int num = -1;

            if (base.m_joinConditions != null)
            {
                for (int i = 0; i < base.m_joinConditions.Count; i++)
                {
                    JoinCondition joinCondition = base.m_joinConditions[i];
                    if (joinCondition.ForeignKeyExpression.Type == ExpressionInfo.Types.Field)
                    {
                        if (joinCondition.ForeignKeyExpression.FieldIndex == fieldIndex)
                        {
                            num = i;
                        }
                        else if (joinCondition.ForeignKeyExpression.FieldIndex == aggregateIndicatorFieldIndex)
                        {
                            return;
                        }
                    }
                }
            }
            bool   flag = num == -1;
            string text = this.FindRelatedAggregateIndicatorFieldName(field);

            if (text != null)
            {
                ExpressionInfo primaryKey     = ExpressionInfo.CreateConstExpression(flag);
                ExpressionInfo expressionInfo = new ExpressionInfo();
                expressionInfo.SetAsSimpleFieldReference(text);
                JoinCondition joinCondition2 = new JoinCondition(expressionInfo, primaryKey, SortDirection.Ascending);
                joinCondition2.Initialize(base.m_relatedDataSet, base.m_naturalJoin, context);
                if (flag)
                {
                    base.AddJoinCondition(joinCondition2);
                }
                else
                {
                    base.m_joinConditions.Insert(num, joinCondition2);
                }
            }
        }
示例#4
0
        internal void Initialize(InitializationContext context, string name)
        {
            context.ExprHostBuilder.ChartSeriesStart();
            if (m_customProperties != null)
            {
                m_customProperties.Initialize("ChartSeries" + name, context);
            }
            if (m_styleClass != null)
            {
                m_styleClass.Initialize(context);
            }
            if (m_action != null)
            {
                m_action.Initialize(context);
            }
            if (m_type == null)
            {
                m_type = ExpressionInfo.CreateConstExpression(ChartSeriesType.Column.ToString());
            }
            m_type.Initialize("Type", context);
            context.ExprHostBuilder.ChartSeriesType(m_type);
            if (m_subtype == null)
            {
                m_subtype = ExpressionInfo.CreateConstExpression(ChartSeriesSubtype.Plain.ToString());
            }
            m_subtype.Initialize("Subtype", context);
            context.ExprHostBuilder.ChartSeriesSubtype(m_subtype);
            if (m_chartSmartLabel != null)
            {
                m_chartSmartLabel.Initialize(context);
            }
            if (m_emptyPoints != null)
            {
                m_emptyPoints.Initialize(context);
            }
            if (m_legendName != null)
            {
                m_legendName.Initialize("LegendName", context);
                context.ExprHostBuilder.ChartSeriesLegendName(m_legendName);
            }
            if (m_legendText != null)
            {
                m_legendText.Initialize("LegendText", context);
                context.ExprHostBuilder.ChartSeriesLegendText(m_legendText);
            }
            if (m_chartAreaName != null)
            {
                m_chartAreaName.Initialize("ChartAreaName", context);
                context.ExprHostBuilder.ChartSeriesChartAreaName(m_chartAreaName);
            }
            if (m_valueAxisName != null)
            {
                m_valueAxisName.Initialize("ValueAxisName", context);
                context.ExprHostBuilder.ChartSeriesValueAxisName(m_valueAxisName);
            }
            if (m_categoryAxisName != null)
            {
                m_categoryAxisName.Initialize("CategoryAxisName", context);
                context.ExprHostBuilder.ChartSeriesCategoryAxisName(m_categoryAxisName);
            }
            if (m_hidden != null)
            {
                m_hidden.Initialize("Hidden", context);
                context.ExprHostBuilder.ChartSeriesHidden(m_hidden);
            }
            if (m_hideInLegend != null)
            {
                m_hideInLegend.Initialize("HideInLegend", context);
                context.ExprHostBuilder.ChartSeriesHideInLegend(m_hideInLegend);
            }
            if (m_dataLabel != null)
            {
                m_dataLabel.Initialize(context);
            }
            if (m_marker != null)
            {
                m_marker.Initialize(context);
            }
            List <ChartDerivedSeries> childrenDerivedSeries = ChildrenDerivedSeries;

            if (childrenDerivedSeries != null)
            {
                for (int i = 0; i < childrenDerivedSeries.Count; i++)
                {
                    childrenDerivedSeries[i].Initialize(context, i);
                }
            }
            if (m_toolTip != null)
            {
                m_toolTip.Initialize("ToolTip", context);
                context.ExprHostBuilder.ChartSeriesToolTip(m_toolTip);
            }
            if (m_chartItemInLegend != null)
            {
                m_chartItemInLegend.Initialize(context);
            }
            context.ExprHostBuilder.ChartSeriesEnd();
        }