Exemplo n.º 1
0
        void listBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListBox listBox           = (ListBox)sender;
            TournamentCreatorForm tcf = new TournamentCreatorForm((int)listBox.SelectedItem);

            tcf.Show();

            if (!listBox.IsDisposed)
            {
                listBox.Dispose();
            }
            this.Close();
        }
Exemplo n.º 2
0
 private void openExistingTourButton_Click(object sender, EventArgs e)
 {
     using (OpenFileDialog fileDialog = new OpenFileDialog())
     {
         fileDialog.Title  = "Select a tournament";
         fileDialog.Filter = "Tournament Files|*.tmst";
         if (fileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             TournamentCreatorForm tcf = new TournamentCreatorForm();
             tcf.LoadTournament(fileDialog.FileName);
             tcf.Show();
             this.Close();
         }
     }
 }