Gets an alpha value from the user.
If Form.ShowDialog() returns DialogResult.OK, read the property to get the alpha value specified by the user.
Inheritance: ExcelTemplateForm
示例#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();

            base.SetVisualAttribute(e, selectedRange, colorColumnName,
                                    alphaColumnName);

            if (e.VisualAttributeSet)
            {
                return;
            }

            if (e.VisualAttribute == VisualAttributes.Alpha &&
                alphaColumnName != null)
            {
                AlphaDialog oAlphaDialog = new AlphaDialog();

                if (oAlphaDialog.ShowDialog() == DialogResult.OK)
                {
                    ExcelTableUtil.SetVisibleSelectedTableColumnData(
                        m_oTable.InnerObject, selectedRange, alphaColumnName,
                        oAlphaDialog.Alpha);

                    e.VisualAttributeSet = true;
                }
            }
        }
    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();

        base.SetVisualAttribute(e, selectedRange, colorColumnName,
            alphaColumnName);

        if (e.VisualAttributeSet)
        {
            return;
        }

        if (e.VisualAttribute == VisualAttributes.Alpha &&
            alphaColumnName != null)
        {
            AlphaDialog oAlphaDialog = new AlphaDialog();

            if (oAlphaDialog.ShowDialog() == DialogResult.OK)
            {
                ExcelTableUtil.SetVisibleSelectedTableColumnData(
                    m_oTable.InnerObject, selectedRange, alphaColumnName,
                    oAlphaDialog.Alpha);

                e.VisualAttributeSet = true;
            }
        }
    }