Exemple #1
0
        public override object PublishClone(AutomaticSubtotalContext context)
        {
            ChartLegend chartLegend = (ChartLegend)base.PublishClone(context);

            if (this.m_position != null)
            {
                chartLegend.m_position = (ExpressionInfo)this.m_position.PublishClone(context);
            }
            if (this.m_layout != null)
            {
                chartLegend.m_layout = (ExpressionInfo)this.m_layout.PublishClone(context);
            }
            if (this.m_hidden != null)
            {
                chartLegend.m_hidden = (ExpressionInfo)this.m_hidden.PublishClone(context);
            }
            if (this.m_dockOutsideChartArea != null)
            {
                chartLegend.m_dockOutsideChartArea = (ExpressionInfo)this.m_dockOutsideChartArea.PublishClone(context);
            }
            if (this.m_chartLegendTitle != null)
            {
                chartLegend.m_chartLegendTitle = (ChartLegendTitle)this.m_chartLegendTitle.PublishClone(context);
            }
            if (this.m_autoFitTextDisabled != null)
            {
                chartLegend.m_autoFitTextDisabled = (ExpressionInfo)this.m_autoFitTextDisabled.PublishClone(context);
            }
            if (this.m_minFontSize != null)
            {
                chartLegend.m_minFontSize = (ExpressionInfo)this.m_minFontSize.PublishClone(context);
            }
            if (this.m_headerSeparator != null)
            {
                chartLegend.m_headerSeparator = (ExpressionInfo)this.m_headerSeparator.PublishClone(context);
            }
            if (this.m_headerSeparatorColor != null)
            {
                chartLegend.m_headerSeparatorColor = (ExpressionInfo)this.m_headerSeparatorColor.PublishClone(context);
            }
            if (this.m_columnSeparator != null)
            {
                chartLegend.m_columnSeparator = (ExpressionInfo)this.m_columnSeparator.PublishClone(context);
            }
            if (this.m_columnSeparatorColor != null)
            {
                chartLegend.m_columnSeparatorColor = (ExpressionInfo)this.m_columnSeparatorColor.PublishClone(context);
            }
            if (this.m_columnSpacing != null)
            {
                chartLegend.m_columnSpacing = (ExpressionInfo)this.m_columnSpacing.PublishClone(context);
            }
            if (this.m_interlacedRows != null)
            {
                chartLegend.m_interlacedRows = (ExpressionInfo)this.m_interlacedRows.PublishClone(context);
            }
            if (this.m_interlacedRowsColor != null)
            {
                chartLegend.m_interlacedRowsColor = (ExpressionInfo)this.m_interlacedRowsColor.PublishClone(context);
            }
            if (this.m_equallySpacedItems != null)
            {
                chartLegend.m_equallySpacedItems = (ExpressionInfo)this.m_equallySpacedItems.PublishClone(context);
            }
            if (this.m_reversed != null)
            {
                chartLegend.m_reversed = (ExpressionInfo)this.m_reversed.PublishClone(context);
            }
            if (this.m_maxAutoSize != null)
            {
                chartLegend.m_maxAutoSize = (ExpressionInfo)this.m_maxAutoSize.PublishClone(context);
            }
            if (this.m_textWrapThreshold != null)
            {
                chartLegend.m_textWrapThreshold = (ExpressionInfo)this.m_textWrapThreshold.PublishClone(context);
            }
            if (this.m_chartLegendCustomItems != null)
            {
                chartLegend.m_chartLegendCustomItems = new List <ChartLegendCustomItem>(this.m_chartLegendCustomItems.Count);
                foreach (ChartLegendCustomItem chartLegendCustomItem in this.m_chartLegendCustomItems)
                {
                    chartLegend.m_chartLegendCustomItems.Add((ChartLegendCustomItem)chartLegendCustomItem.PublishClone(context));
                }
            }
            if (this.m_chartLegendColumns != null)
            {
                chartLegend.m_chartLegendColumns = new List <ChartLegendColumn>(this.m_chartLegendColumns.Count);
                foreach (ChartLegendColumn chartLegendColumn in this.m_chartLegendColumns)
                {
                    chartLegend.m_chartLegendColumns.Add((ChartLegendColumn)chartLegendColumn.PublishClone(context));
                }
            }
            if (this.m_chartElementPosition != null)
            {
                chartLegend.m_chartElementPosition = (ChartElementPosition)this.m_chartElementPosition.PublishClone(context);
            }
            return(chartLegend);
        }
 public ChartLegend(AspNetCore.ReportingServices.ReportIntermediateFormat.ChartLegend legendDef, Chart chart)
 {
     this.m_chart     = chart;
     this.m_legendDef = legendDef;
 }
 public override void DataRegionContentsSetExprHost(ObjectModelImpl reportObjectModel, bool traverseDataRegions)
 {
     if (this.m_chartExprHost != null)
     {
         IList <ChartAreaExprHost> chartAreasHostsRemotable = this.m_chartExprHost.ChartAreasHostsRemotable;
         if (this.m_chartAreas != null && chartAreasHostsRemotable != null)
         {
             for (int i = 0; i < this.m_chartAreas.Count; i++)
             {
                 ChartArea chartArea = this.m_chartAreas[i];
                 if (chartArea != null && chartArea.ExpressionHostID > -1)
                 {
                     chartArea.SetExprHost(chartAreasHostsRemotable[chartArea.ExpressionHostID], reportObjectModel);
                 }
             }
         }
         IList <ChartTitleExprHost> titlesHostsRemotable = this.m_chartExprHost.TitlesHostsRemotable;
         if (this.m_titles != null && titlesHostsRemotable != null)
         {
             for (int j = 0; j < this.m_titles.Count; j++)
             {
                 ChartTitle chartTitle = this.m_titles[j];
                 if (chartTitle != null && chartTitle.ExpressionHostID > -1)
                 {
                     chartTitle.SetExprHost(titlesHostsRemotable[chartTitle.ExpressionHostID], reportObjectModel);
                 }
             }
         }
         IList <ChartLegendExprHost> legendsHostsRemotable = this.m_chartExprHost.LegendsHostsRemotable;
         if (this.m_legends != null && legendsHostsRemotable != null)
         {
             for (int k = 0; k < this.m_legends.Count; k++)
             {
                 ChartLegend chartLegend = this.m_legends[k];
                 if (chartLegend != null && chartLegend.ExpressionHostID > -1)
                 {
                     chartLegend.SetExprHost(legendsHostsRemotable[chartLegend.ExpressionHostID], reportObjectModel);
                 }
             }
         }
         IList <ChartCustomPaletteColorExprHost> customPaletteColorHostsRemotable = this.m_chartExprHost.CustomPaletteColorHostsRemotable;
         if (this.m_customPaletteColors != null && customPaletteColorHostsRemotable != null)
         {
             for (int l = 0; l < this.m_customPaletteColors.Count; l++)
             {
                 ChartCustomPaletteColor chartCustomPaletteColor = this.m_customPaletteColors[l];
                 if (chartCustomPaletteColor != null && chartCustomPaletteColor.ExpressionHostID > -1)
                 {
                     chartCustomPaletteColor.SetExprHost(customPaletteColorHostsRemotable[chartCustomPaletteColor.ExpressionHostID], reportObjectModel);
                 }
             }
         }
         if (this.m_codeParameters != null && this.m_chartExprHost.CodeParametersHostsRemotable != null)
         {
             this.m_codeParameters.SetExprHost(this.m_chartExprHost.CodeParametersHostsRemotable, reportObjectModel);
         }
         if (this.m_borderSkin != null && this.m_chartExprHost.BorderSkinHost != null)
         {
             this.m_borderSkin.SetExprHost(this.m_chartExprHost.BorderSkinHost, reportObjectModel);
         }
         if (this.m_noDataMessage != null && this.m_chartExprHost.NoDataMessageHost != null)
         {
             this.m_noDataMessage.SetExprHost(this.m_chartExprHost.NoDataMessageHost, reportObjectModel);
         }
         IList <ChartSeriesExprHost>    seriesCollectionHostsRemotable = this.m_chartExprHost.SeriesCollectionHostsRemotable;
         IList <ChartDataPointExprHost> cellHostsRemotable             = this.m_chartExprHost.CellHostsRemotable;
         Global.Tracer.Assert(this.m_chartSeriesCollection != null, "(m_chartSeriesCollection != null)");
         for (int m = 0; m < this.m_chartSeriesCollection.Count; m++)
         {
             ChartSeries chartSeries = this.m_chartSeriesCollection[m];
             Global.Tracer.Assert(null != chartSeries, "(null != series)");
             if (seriesCollectionHostsRemotable != null && chartSeries.ExpressionHostID > -1)
             {
                 chartSeries.SetExprHost(seriesCollectionHostsRemotable[chartSeries.ExpressionHostID], reportObjectModel);
             }
             if (cellHostsRemotable != null)
             {
                 Global.Tracer.Assert(null != chartSeries.DataPoints, "(null != series.DataPoints)");
                 for (int n = 0; n < chartSeries.DataPoints.Count; n++)
                 {
                     ChartDataPoint chartDataPoint = chartSeries.DataPoints[n];
                     Global.Tracer.Assert(null != chartDataPoint, "(null != dataPoint)");
                     if (chartDataPoint.ExpressionHostID > -1)
                     {
                         chartDataPoint.SetExprHost(cellHostsRemotable[chartDataPoint.ExpressionHostID], reportObjectModel);
                     }
                 }
             }
         }
     }
 }