public CombineForm(TurneeData data, TurneeMainForm mainForm) { td = data; mf = mainForm; InitializeComponent(); foreach (TurneeData.RoundData rd in td.data) { RoundListBox1.Items.Add(rd); RoundListBox2.Items.Add(rd); } }
private void ButtonSave_Click(object sender, EventArgs e) { if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { try { TurneeData.WriteToXmlFile <TurneeData>(saveFileDialog1.FileName, td, false); unsavedChanges = false; } catch (Exception exception) { MessageBox.Show("There was an error saving the file: " + exception.GetType().ToString()); } } }
private void ButtonLoad_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { try { td = TurneeData.ReadFromXmlFile <TurneeData>(openFileDialog1.FileName); unsavedChanges = false; UpdateRounds(); } catch (Exception exception) { MessageBox.Show("There was an error loading the file: " + exception.GetType().ToString()); } } }
public TurneeMainForm() { td = new TurneeData(); InitializeComponent(); }