Inheritance: NodeXLApplicationSettingsBase
    //*************************************************************************
    //  Constructor: VertexGridSnapperUserSettingsDialog()
    //
    /// <summary>
    /// Initializes a new instance of the <see
    /// cref="VertexGridSnapperUserSettingsDialog" /> class.
    /// </summary>
    ///
    /// <param name="vertexGridSnapperUserSettings">
    /// The object being edited.
    /// </param>
    //*************************************************************************

    public VertexGridSnapperUserSettingsDialog
    (
        VertexGridSnapperUserSettings vertexGridSnapperUserSettings
    )
    {
        Debug.Assert(vertexGridSnapperUserSettings != null);
        vertexGridSnapperUserSettings.AssertValid();

        m_oVertexGridSnapperUserSettings = vertexGridSnapperUserSettings;

        // 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_oVertexGridSnapperUserSettingsDialogUserSettings =
            new VertexGridSnapperUserSettingsDialogUserSettings(this);

        InitializeComponent();
        DoDataExchange(false);

        AssertValid();
    }
        //*************************************************************************
        //  Constructor: VertexGridSnapperUserSettingsDialog()
        //
        /// <summary>
        /// Initializes a new instance of the <see
        /// cref="VertexGridSnapperUserSettingsDialog" /> class.
        /// </summary>
        ///
        /// <param name="vertexGridSnapperUserSettings">
        /// The object being edited.
        /// </param>
        //*************************************************************************

        public VertexGridSnapperUserSettingsDialog
        (
            VertexGridSnapperUserSettings vertexGridSnapperUserSettings
        )
        {
            Debug.Assert(vertexGridSnapperUserSettings != null);
            vertexGridSnapperUserSettings.AssertValid();

            m_oVertexGridSnapperUserSettings = vertexGridSnapperUserSettings;

            // 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_oVertexGridSnapperUserSettingsDialogUserSettings =
                new VertexGridSnapperUserSettingsDialogUserSettings(this);

            InitializeComponent();
            DoDataExchange(false);

            AssertValid();
        }
    msiGridSize_Click
    (
        object sender,
        EventArgs e
    )
    {
        AssertValid();

        if (oNodeXLControl.IsLayingOutGraph)
        {
            return;
        }

        VertexGridSnapperUserSettings oVertexGridSnapperUserSettings =
            new VertexGridSnapperUserSettings();

        VertexGridSnapperUserSettingsDialog
            oVertexGridSnapperUserSettingsDialog =
                new VertexGridSnapperUserSettingsDialog(
                    oVertexGridSnapperUserSettings);

        if (oVertexGridSnapperUserSettingsDialog.ShowDialog() ==
            DialogResult.OK)
        {
            oVertexGridSnapperUserSettings.Save();
        }
    }