Ejemplo n.º 1
0
 public void EditTournament(ITournamentDialog itd)
 {
     itd.SetGameSystemIsChangeable(false);
     itd.SetTournament(ActiveTournament);
     itd.ShowDialog();
     if (itd.IsChanged())
     {
         ChangeTournament(itd.GetTournament());
     }
 }
Ejemplo n.º 2
0
 public void NewTournament(ITournamentDialog itd)
 {
     if (ActiveTournament != null)
     {
         if (!ActiveIO.ShowMessageWithOKCancel("The current tournament will be overwritten."))
         {
             return;
         }
     }
     itd.SetIO(ActiveIO);
     itd.ShowDialog();
     if (itd.GetDialogResult())
     {
         ActiveTournament        = itd.GetTournament();
         ActiveTimer.DefaultTime = ActiveTournament.Rule.DefaultTime;
     }
 }
Ejemplo n.º 3
0
 public void Import(ITournamentDialog itd, bool csv)
 {
     if (csv)
     {
         ActiveTournament = ActiveIO.CSVImport();
     }
     else
     {
         ActiveTournament = ActiveIO.GOEPPImport();
     }
     if (ActiveTournament != null)
     {
         itd.SetTournament(ActiveTournament);
         itd.SetIO(ActiveIO);
         itd.ShowDialog();
         if (itd.IsChanged())
         {
             ChangeTournament(itd.GetTournament());
         }
         ActiveTimer.DefaultTime = ActiveTournament.Rule.DefaultTime;
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Creates a new Tournament
        /// </summary>
        /// <param name="td">A tournament dialog of the current OS which implentes the interface</param>
        /// <returns>true: New Tournament created; false: no new tournament</returns>
        public bool NewTournament(ITournamentDialog td)
        {
            if (activeTournament != null)
            {
                if (!activeIO.ShowMessageWithOKCancel(ActiveLanguage.ExistingTournament))
                {
                    return false;
                }
            }

            td.Title = ActiveLanguage.NewTournament;
            td.TabTitleBasic = ActiveLanguage.Basic;
            td.TabTitleAdvanced = ActiveLanguage.Advanced;
            td.Controll = new TournamentController(activeIO, ActiveLanguage);
            td.SetPresets();
            if (td.ShowDialog() == true)
            {
                activeTournament = new Tournament();
                return true;
            }
            return false;
        }