private void loadResults_Click(object sender, EventArgs e) { DialogResult result = SelectSummaryFileDialog.ShowDialog(); if (result == DialogResult.OK) { try { String text = File.ReadAllText(SelectSummaryFileDialog.FileName); String summaryText = Utilities.compressText_(text); m_eventInformation = PairsGeneral.getEventInformation_(summaryText); m_eventInformation.databaseFileName = m_databaseFileName; m_eventInformation.webpagesDirectory = m_localWebpagesRoot; } catch (Exception exception) { resultsLoaded = false; updateButtonStatus(); MessageBox.Show("Exception when trying to read Summary file : " + exception.Message); } resultsLoaded = true; this.selectedResultsFile_textBox.Text = SelectSummaryFileDialog.FileName; this.eventInfo_textBox.Text = "Event Title : " + m_eventInformation.eventName + ", Event Date : " + m_eventInformation.eventDate.ToString("MMMM dd, yyyy"); updateButtonStatus(); } else { resultsLoaded = false; updateButtonStatus(); } }
private void SelectSummaryFileButton_Click(object sender, EventArgs e) { DialogResult result = SelectSummaryFileDialog.ShowDialog(); if (result == DialogResult.OK) { try { string text = File.ReadAllText(SelectSummaryFileDialog.FileName); Summary.Text = text; } catch (Exception exception) { MessageBox.Show("Exception when trying to read Summary file : " + exception.Message); } } }