Esempio n. 1
0
        //*************************************************************************
        //  Method: SetImageSize()
        //
        /// <summary>
        /// Shows a dialog for setting the size of images saved to a file.
        /// </summary>
        //*************************************************************************
        protected void SetImageSize()
        {
            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();
            }
        }