//************************************************************************* // 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(); }
//************************************************************************* // Method: msiGridSize_Click() // /// <summary> /// Handles the Click event on the msiGridSize menu item. /// </summary> /// /// <param name="sender"> /// Standard event argument. /// </param> /// /// <param name="e"> /// Standard event argument. /// </param> //************************************************************************* protected void 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(); } }