Edits a GraphImageUserSettings object.
Pass a GraphImageUserSettings object to the constructor. If the user edits the object, Form.ShowDialog() returns DialogResult.OK. Otherwise, the object is not modified and returns DialogResult.Cancel.
Inheritance: ExcelTemplateForm
コード例 #1
0
    SetImageOptions()
    {
        AssertValid();

        if (oNodeXLControl.IsLayingOutGraph)
        {
            return;
        }

        // Allow the user to edit the graph image settings.

        GraphImageUserSettings oGraphImageUserSettings =
            new GraphImageUserSettings();

        Size oNodeXLControlSizePx = ehNodeXLControlHost.ClientSize;

        GraphImageUserSettingsDialog oGraphImageUserSettingsDialog =
            new GraphImageUserSettingsDialog(oGraphImageUserSettings,
                oNodeXLControlSizePx);

        if (oGraphImageUserSettingsDialog.ShowDialog() == DialogResult.OK)
        {
            // Save the new settings.

            oGraphImageUserSettings.Save();
        }
    }