private void GetRowsAndColumnsToRender(out bool[] rowsToRender, out bool[] columnsToRender)
        {
            ReportParameterInfoCollection paramInfos           = m_paramInfos;
            GridLayoutDefinition          gridLayoutDefinition = m_paramLayout.GridLayoutDefinition;
            ParameterControlCollection    paramControls        = m_paramControls;
            int num  = -1;
            int num2 = -1;
            Dictionary <string, GridLayoutCellDefinition> dictionary = new Dictionary <string, GridLayoutCellDefinition>();

            bool?[] array  = new bool?[gridLayoutDefinition.NumberOfRows];
            bool?[] array2 = new bool?[gridLayoutDefinition.NumberOfColumns];
            rowsToRender    = new bool[gridLayoutDefinition.NumberOfRows];
            columnsToRender = new bool[gridLayoutDefinition.NumberOfColumns];
            foreach (GridLayoutCellDefinition cellDefinition in gridLayoutDefinition.CellDefinitions)
            {
                dictionary.Add(cellDefinition.ParameterName, cellDefinition);
            }
            foreach (ReportParameterInfo item in paramInfos)
            {
                GridLayoutCellDefinition gridLayoutCellDefinition = dictionary[item.Name];
                if (paramControls.ContainsKey(item.Name))
                {
                    array[gridLayoutCellDefinition.Row]     = false;
                    array2[gridLayoutCellDefinition.Column] = false;
                    num  = Math.Max(gridLayoutCellDefinition.Row, num);
                    num2 = Math.Max(gridLayoutCellDefinition.Column, num2);
                    continue;
                }
                if (!array[gridLayoutCellDefinition.Row].HasValue)
                {
                    array[gridLayoutCellDefinition.Row] = true;
                }
                if (!array2[gridLayoutCellDefinition.Column].HasValue)
                {
                    array2[gridLayoutCellDefinition.Column] = true;
                }
            }
            for (int i = 0; i < gridLayoutDefinition.NumberOfRows; i++)
            {
                if (i > num)
                {
                    rowsToRender[i] = false;
                }
                else
                {
                    rowsToRender[i] = (array[i] != true);
                }
            }
            for (int j = 0; j < gridLayoutDefinition.NumberOfColumns; j++)
            {
                if (j > num2)
                {
                    columnsToRender[j] = false;
                }
                else
                {
                    columnsToRender[j] = (array2[j] != true);
                }
            }
        }
Beispiel #2
0
 private static void SoapExecutionInfoToParametersLayout(ParametersPaneLayout paramPaneLayout, ExecutionInfo3 soapExecInfo3, ReportParameterInfoCollection paramInfoCollection)
 {
     if (soapExecInfo3.ParametersLayout.CellDefinitions != null)
     {
         int num = soapExecInfo3.ParametersLayout.CellDefinitions.Length;
         GridLayoutCellDefinition[] array = new GridLayoutCellDefinition[num];
         for (int i = 0; i < num; i++)
         {
             GridLayoutCellDefinition gridLayoutCellDefinition = new GridLayoutCellDefinition();
             gridLayoutCellDefinition.Column        = soapExecInfo3.ParametersLayout.CellDefinitions[i].ColumnsIndex;
             gridLayoutCellDefinition.Row           = soapExecInfo3.ParametersLayout.CellDefinitions[i].RowIndex;
             gridLayoutCellDefinition.ParameterName = soapExecInfo3.ParametersLayout.CellDefinitions[i].ParameterName;
             array[i] = gridLayoutCellDefinition;
         }
         GridLayoutDefinition gridLayoutDefinition = paramPaneLayout.GridLayoutDefinition = new GridLayoutDefinition(new GridLayoutCellDefinitionCollection(array), soapExecInfo3.ParametersLayout.NumberOfRows, soapExecInfo3.ParametersLayout.NumberOfColumns, paramInfoCollection);
     }
 }