Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 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());
         }
     }
 }
Ejemplo n.º 3
0
 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());
         }
     }
 }
Ejemplo n.º 4
0
 public TurneeMainForm()
 {
     td = new TurneeData();
     InitializeComponent();
 }