Inheritance: Smrf.AppLib.FormSettings
コード例 #1
0
        //*************************************************************************
        //  Constructor: ExportToEmailDialog()
        //
        /// <summary>
        /// Initializes a new instance of the <see cref="ExportToEmailDialog" />
        /// class.
        /// </summary>
        ///
        /// <param name="mode">
        /// Indicates the mode in which the dialog is being used.
        /// </param>
        ///
        /// <param name="workbook">
        /// Workbook containing the graph data.
        /// </param>
        ///
        /// <param name="nodeXLControl">
        /// NodeXLControl containing the graph.  This can be null if <paramref
        /// name="mode" /> is <see cref="DialogMode.EditOnly" />.
        /// </param>
        //*************************************************************************

        public ExportToEmailDialog
        (
            DialogMode mode,
            Microsoft.Office.Interop.Excel.Workbook workbook,
            NodeXLControl nodeXLControl
        )
        {
            Debug.Assert(workbook != null);
            Debug.Assert(nodeXLControl != null || mode == DialogMode.EditOnly);

            m_eMode                      = mode;
            m_oWorkbook                  = workbook;
            m_oNodeXLControl             = nodeXLControl;
            m_oExportToEmailUserSettings = new ExportToEmailUserSettings();
            m_oPasswordUserSettings      = new PasswordUserSettings();

            InitializeComponent();

            if (m_eMode == DialogMode.EditOnly)
            {
                InitializeForEditOnly();
            }

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

            m_oExportToEmailDialogUserSettings =
                new ExportToEmailDialogUserSettings(this);

            DoDataExchange(false);

            AssertValid();
        }
コード例 #2
0
    //*************************************************************************
    //  Constructor: ExportToEmailDialog()
    //
    /// <summary>
    /// Initializes a new instance of the <see cref="ExportToEmailDialog" />
    /// class.
    /// </summary>
    ///
    /// <param name="mode">
    /// Indicates the mode in which the dialog is being used.
    /// </param>
    ///
    /// <param name="workbook">
    /// Workbook containing the graph data.
    /// </param>
    ///
    /// <param name="nodeXLControl">
    /// NodeXLControl containing the graph.  This can be null if <paramref
    /// name="mode" /> is <see cref="DialogMode.EditOnly" />.
    /// </param>
    //*************************************************************************

    public ExportToEmailDialog
    (
        DialogMode mode,
        Microsoft.Office.Interop.Excel.Workbook workbook,
        NodeXLControl nodeXLControl
    )
    {
        Debug.Assert(workbook != null);
        Debug.Assert(nodeXLControl != null || mode == DialogMode.EditOnly);

        m_eMode = mode;
        m_oWorkbook = workbook;
        m_oNodeXLControl = nodeXLControl;
        m_oExportToEmailUserSettings = new ExportToEmailUserSettings();
        m_oPasswordUserSettings = new PasswordUserSettings();

        InitializeComponent();

        if (m_eMode == DialogMode.EditOnly)
        {
            InitializeForEditOnly();
        }

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

        m_oExportToEmailDialogUserSettings =
            new ExportToEmailDialogUserSettings(this);

        DoDataExchange(false);

        AssertValid();
    }