OnLayoutChanged ( LayoutType eLayout ) { AssertValid(); if (m_bHandlingLayoutChanged) { // Prevent an endless loop when the layout managers are // synchronized. return; } m_bHandlingLayoutChanged = true; // Save and apply the new layout. LayoutUserSettings oLayoutUserSettings = new LayoutUserSettings(); oLayoutUserSettings.NotUseWorkbookSettings(); oLayoutUserSettings.Layout = eLayout; oLayoutUserSettings.Save(); ApplyLayoutUserSettings(oLayoutUserSettings); // If the layout was just changed from Null to something else and the // X and Y columns were autofilled, the X and Y autofill results need // to be cleared. m_bHandlingLayoutChanged = false; }
EditLayoutUserSettings() { AssertValid(); if (m_oNodeXLControl.IsLayingOutGraph) { return; } LayoutUserSettings oLayoutUserSettings = new LayoutUserSettings(); oLayoutUserSettings.NotUseWorkbookSettings(); LayoutUserSettingsDialog oLayoutUserSettingsDialog = new LayoutUserSettingsDialog(oLayoutUserSettings); if (oLayoutUserSettingsDialog.ShowDialog() == DialogResult.OK) { oLayoutUserSettings.Save(); ApplyLayoutUserSettings(oLayoutUserSettings); m_oNodeXLControl.DrawGraph(); } }