btnOK_Click ( object sender, EventArgs e ) { AssertValid(); if (!DoDataExchange(true)) { return; } if (m_eMode == DialogMode.Normal) { NodeXLGraphGalleryExporter oNodeXLGraphGalleryExporter = new NodeXLGraphGalleryExporter(); this.Cursor = Cursors.WaitCursor; try { Debug.Assert(m_oNodeXLControl != null); oNodeXLGraphGalleryExporter.ExportToNodeXLGraphGallery( m_oWorkbook, m_oNodeXLControl, txbTitle.Text, txbDescription.Text, m_oExportToNodeXLGraphGalleryUserSettings. SpaceDelimitedTags, m_oExportToNodeXLGraphGalleryUserSettings.Author, m_oExportToNodeXLGraphGalleryUserSettings.UseCredentials ? m_oPasswordUserSettings.NodeXLGraphGalleryPassword : null, m_oExportToNodeXLGraphGalleryUserSettings. ExportWorkbookAndSettings, m_oExportToNodeXLGraphGalleryUserSettings.ExportGraphML, m_oExportToNodeXLGraphGalleryUserSettings .UseFixedAspectRatio ); } catch (Exception oException) { String sMessage; if (NodeXLGraphGalleryExceptionHandler .TryGetMessageForRecognizedException(oException, out sMessage) ) { this.ShowWarning(sMessage); } else { ErrorUtil.OnException(oException); } return; } finally { this.Cursor = Cursors.Default; } } m_oExportToNodeXLGraphGalleryUserSettings.Save(); m_oPasswordUserSettings.Save(); this.DialogResult = DialogResult.OK; this.Close(); }
btnOK_Click ( object sender, EventArgs e ) { AssertValid(); if ( !DoDataExchange(true) ) { return; } if (m_eMode == DialogMode.Normal) { NodeXLGraphGalleryExporter oNodeXLGraphGalleryExporter = new NodeXLGraphGalleryExporter(); this.Cursor = Cursors.WaitCursor; try { Debug.Assert(m_oNodeXLControl != null); oNodeXLGraphGalleryExporter.ExportToNodeXLGraphGallery( m_oWorkbook, m_oNodeXLControl, m_oExportToNodeXLGraphGalleryUserSettings.Title, m_oExportToNodeXLGraphGalleryUserSettings.Description, m_oExportToNodeXLGraphGalleryUserSettings. SpaceDelimitedTags, m_oExportToNodeXLGraphGalleryUserSettings.Author, m_oExportToNodeXLGraphGalleryUserSettings.UseCredentials ? m_oPasswordUserSettings.NodeXLGraphGalleryPassword : null, m_oExportToNodeXLGraphGalleryUserSettings. ExportWorkbookAndSettings, m_oExportToNodeXLGraphGalleryUserSettings.ExportGraphML, m_oExportToNodeXLGraphGalleryUserSettings .UseFixedAspectRatio ); } catch (Exception oException) { String sMessage; if (NodeXLGraphGalleryExceptionHandler .TryGetMessageForRecognizedException(oException, out sMessage) ) { this.ShowWarning(sMessage); } else { ErrorUtil.OnException(oException); } return; } finally { this.Cursor = Cursors.Default; } } m_oExportToNodeXLGraphGalleryUserSettings.Save(); m_oPasswordUserSettings.Save(); this.DialogResult = DialogResult.OK; this.Close(); }