Stores information about one graph metric.
Call GetAllGraphMetricInformation to get information about each graph metric in the GraphMetrics enumeration.
コード例 #1
0
        //*************************************************************************
        //  Constructor: GraphMetricsDialog()
        //
        /// <summary>
        /// Initializes a new instance of the <see cref="GraphMetricsDialog" />
        /// class.
        /// </summary>
        ///
        /// <param name="mode">
        /// Indicates the mode in which the dialog is being used.
        /// </param>
        ///
        /// <param name="workbook">
        /// Workbook containing the graph contents.
        /// </param>
        //*************************************************************************

        public GraphMetricsDialog
        (
            DialogMode mode,
            Microsoft.Office.Interop.Excel.Workbook workbook
        )
        {
            InitializeComponent();

            m_eMode     = mode;
            m_oWorkbook = workbook;
            m_oGraphMetricUserSettings = new GraphMetricUserSettings();

            // Instantiate an object that saves and retrieves the position of this
            // dialog.  Note that the object automatically saves the settings when
            // the form closes.

            m_oGraphMetricsDialogUserSettings =
                new GraphMetricsDialogUserSettings(this);

            if (m_eMode == DialogMode.EditOnly)
            {
                this.Text += " Options";
                btnOK.Text = "OK";
            }

            clbGraphMetrics.Items.AddRange(
                GraphMetricInformation.GetAllGraphMetricInformation());

            clbGraphMetrics.SetSelected(0, true);

            DoDataExchange(false);

            AssertValid();
        }
コード例 #2
0
        TryGetSelectedGraphMetricInformation
        (
            out GraphMetricInformation oSelectedGraphMetricInformation
        )
        {
            AssertValid();

            Int32 iSelectedIndex = clbGraphMetrics.SelectedIndex;

            if (iSelectedIndex >= 0)
            {
                oSelectedGraphMetricInformation = ItemToGraphMetricInformation(
                    clbGraphMetrics.Items[iSelectedIndex]);

                return(true);
            }

            oSelectedGraphMetricInformation = null;
            return(false);
        }
コード例 #3
0
    TryGetSelectedGraphMetricInformation
    (
        out GraphMetricInformation oSelectedGraphMetricInformation
    )
    {
        AssertValid();

        Int32 iSelectedIndex = clbGraphMetrics.SelectedIndex;

        if (iSelectedIndex >= 0)
        {
            oSelectedGraphMetricInformation = ItemToGraphMetricInformation(
                clbGraphMetrics.Items[iSelectedIndex] );

            return (true);
        }

        oSelectedGraphMetricInformation = null;
        return (false);
    }