Smrf.NodeXL.ExcelTemplate.AutoFillResultsLegendControl.DrawColorColumnResults C# (CSharp) Method

DrawColorColumnResults() protected method

protected DrawColorColumnResults ( DrawingObjects oDrawingObjects, String sCaption, AutoFillColorColumnResults oColorResults, VertexShape eCategoryShape, Rectangle oColumnRectangle, Int32 iResultsLeft, Int32 iResultsRight, Int32 &iTop ) : void
oDrawingObjects DrawingObjects
sCaption String
oColorResults AutoFillColorColumnResults
eCategoryShape VertexShape
oColumnRectangle System.Drawing.Rectangle
iResultsLeft System.Int32
iResultsRight System.Int32
iTop System.Int32
return void
    DrawColorColumnResults
    (
        DrawingObjects oDrawingObjects,
        String sCaption,
        AutoFillColorColumnResults oColorResults,
        VertexShape eCategoryShape,
        Rectangle oColumnRectangle,
        Int32 iResultsLeft,
        Int32 iResultsRight,
        ref Int32 iTop
    )
    {
        Debug.Assert(oDrawingObjects != null);
        Debug.Assert( !String.IsNullOrEmpty(sCaption) );
        Debug.Assert(oColorResults != null);

        if (oColorResults.SourceColumnContainsNumbers)
        {
            DrawColorBarResults(oDrawingObjects,
                oColorResults.SourceColumnName, ColorCaption,
                oColorResults.SourceCalculationNumber1,
                oColorResults.SourceCalculationNumber2,
                oColorResults.DecimalPlaces,
                oColorResults.DestinationColor1,
                oColorResults.DestinationColor2,
                oColumnRectangle, iResultsLeft, iResultsRight,
                ref iTop);
        }
        else
        {
            DrawColorCategoryResults(oDrawingObjects,
                oColorResults.CategoryNames,

                (Int32 categoryIndex, out VertexShape categoryShape,
                    out Color categoryColor) =>
                {
                    categoryShape = eCategoryShape;

                    categoryColor = ColorUtil.GetUniqueColor(categoryIndex,
                        oColorResults.CategoryNames.Count);
                },

                oColumnRectangle, ref iTop
                );
        }
    }