Smrf.NodeXL.ExcelTemplate.GraphImageUserSettingsDialog.GraphImageUserSettingsDialog C# (CSharp) Method

GraphImageUserSettingsDialog() public method

Initializes a new instance of the class.
public GraphImageUserSettingsDialog ( GraphImageUserSettings graphImageUserSettings, Size nodeXLControlSizePx ) : System
graphImageUserSettings GraphImageUserSettings /// The object being edited. ///
nodeXLControlSizePx System.Drawing.Size /// The size of the NodeXLControl, in pixels. ///
return System
    public GraphImageUserSettingsDialog
    (
        GraphImageUserSettings graphImageUserSettings,
        Size nodeXLControlSizePx
    )
    {
        Debug.Assert(graphImageUserSettings != null);
        graphImageUserSettings.AssertValid();
        Debug.Assert(nodeXLControlSizePx.Width >= 0);
        Debug.Assert(nodeXLControlSizePx.Height >= 0);

        InitializeComponent();

        m_oGraphImageUserSettings = graphImageUserSettings;
        m_oNodeXLControlSizePx = nodeXLControlSizePx;
        m_bCalculatingHeightOrWidth = false;

        // 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_oGraphImageUserSettingsDialogUserSettings =
            new GraphImageUserSettingsDialogUserSettings(this);

        m_oHeaderFooterFont = m_oGraphImageUserSettings.HeaderFooterFont;

        lblControlWidth.Text =
            nodeXLControlSizePx.Width.ToString(ExcelTemplateForm.Int32Format);

        lblControlHeight.Text =
            nodeXLControlSizePx.Height.ToString(ExcelTemplateForm.Int32Format);

        DoDataExchange(false);

        AssertValid();
    }