예제 #1
0
        void UpdateData()
        {
            MainTree.Nodes.Clear();

            if (Projects.Length == 0)
            {
                return;
            }

            StartModelIndex.Items.Clear();
            if (ProjectsList.SelectedIndex != -1)
            {
                StartModelIndex.Items.AddRange(Projects[ProjectsList.SelectedIndex].Competition.Teams.TeamClumps.ToArray());
                StartModelIndex.SelectedIndex = 0;
                //return;
            }

            var CC = Projects[ProjectsList.SelectedIndex];
            var C  = CC.Competition;

            TeamsCount.Text  = "Количество команд: " + C.Teams.Count.ToString();
            PeopleCount.Text = "Количество участников: " + C.Teams.Participants().Count.ToString();
            ModelsCount.Text = "Количество моделей в соревновании: " + C.Teams.TeamClumps.Count.ToString();
            RoundsCount.Text = "Количество проведённых туров: ~" + C.Teams.GetTeams()[0].Rounds.Count;

            string MJ = (CC.MainJudge.Length < 5) ? ((CC.MainJudge == "" | CC.MainJudge.Length < 2) ? ("Не задан") : ("[!] " + CC.MainJudge)) : (CC.MainJudge);
            string SK = (CC.Scorekeeper.Length < 5) ? ((CC.Scorekeeper == "" | CC.Scorekeeper.Length < 2) ? ("Не задан") : ("[!] " + CC.Scorekeeper)) : (CC.Scorekeeper);
            string LS = (CC.LaunchSupervisor.Length < 5) ? ((CC.LaunchSupervisor == "" | CC.LaunchSupervisor.Length < 2) ? ("Не задан") : ("[!] " + CC.LaunchSupervisor)) : (CC.LaunchSupervisor);

            MainJudge.Text    = "Главный судья: " + MJ;
            Scorekeeper.Text  = "Секретарь: " + SK;
            HeadOfAStart.Text = "Начальник старта: " + LS;


            var TCs = C.Teams?.TeamClumps;

            TreeDrawer.DrawCompetitionStructure(MainTree, TCs, C);
        }
예제 #2
0
 void RedrawTree()
 {
     TreeDrawer.DrawCompetitionStructure(MainTree);
 }