Пример #1
0
        internal void SetExprHost(ChartLegendExprHost exprHost, ObjectModelImpl reportObjectModel)
        {
            Global.Tracer.Assert(exprHost != null && reportObjectModel != null, "(exprHost != null && reportObjectModel != null)");
            base.SetExprHost(exprHost, reportObjectModel);
            m_exprHost = exprHost;
            if (m_chartLegendTitle != null && exprHost.TitleExprHost != null)
            {
                m_chartLegendTitle.SetExprHost(exprHost.TitleExprHost, reportObjectModel);
            }
            IList <ChartLegendCustomItemExprHost> chartLegendCustomItemsHostsRemotable = m_exprHost.ChartLegendCustomItemsHostsRemotable;

            if (m_chartLegendCustomItems != null && chartLegendCustomItemsHostsRemotable != null)
            {
                for (int i = 0; i < m_chartLegendCustomItems.Count; i++)
                {
                    ChartLegendCustomItem chartLegendCustomItem = m_chartLegendCustomItems[i];
                    if (chartLegendCustomItem != null && chartLegendCustomItem.ExpressionHostID > -1)
                    {
                        chartLegendCustomItem.SetExprHost(chartLegendCustomItemsHostsRemotable[chartLegendCustomItem.ExpressionHostID], reportObjectModel);
                    }
                }
            }
            IList <ChartLegendColumnExprHost> chartLegendColumnsHostsRemotable = m_exprHost.ChartLegendColumnsHostsRemotable;

            if (m_chartLegendColumns != null && chartLegendColumnsHostsRemotable != null)
            {
                for (int j = 0; j < m_chartLegendColumns.Count; j++)
                {
                    ChartLegendColumn chartLegendColumn = m_chartLegendColumns[j];
                    if (chartLegendColumn != null && chartLegendColumn.ExpressionHostID > -1)
                    {
                        chartLegendColumn.SetExprHost(chartLegendColumnsHostsRemotable[chartLegendColumn.ExpressionHostID], reportObjectModel);
                    }
                }
            }
            if (m_chartElementPosition != null && m_exprHost.ChartElementPositionHost != null)
            {
                m_chartElementPosition.SetExprHost(m_exprHost.ChartElementPositionHost, reportObjectModel);
            }
        }