TryGetColor() public static method

public static TryGetColor ( String &color ) : System.Boolean
color String
return System.Boolean
Example #1
0
        SetVisualAttribute
        (
            RunSetVisualAttributeCommandEventArgs e,
            Range selectedRange,
            String colorColumnName,
            String alphaColumnName
        )
        {
            Debug.Assert(e != null);
            Debug.Assert(selectedRange != null);
            Debug.Assert(ExcelUtil.WorksheetIsActive(m_oWorksheet.InnerObject));
            AssertValid();

            if (e.VisualAttribute == VisualAttributes.Color &&
                colorColumnName != null)
            {
                String sColor;

                // Get a color from the user.

                if (NodeXLWorkbookUtil.TryGetColor(out sColor))
                {
                    ExcelTableUtil.SetVisibleSelectedTableColumnData(
                        m_oTable.InnerObject, selectedRange, colorColumnName,
                        sColor);

                    e.VisualAttributeSet = true;
                }
            }
        }