コード例 #1
0
 public TableGroupWin(List <UchastChamp> uchs, ChampionatConfig champ)
 {
     DataContext = champ;
     InitializeComponent();
     Fill(0, uchs, ref u1Win, ref u1Win2);
     WinGroup1.Content       = u1Win?.participants.Name;
     Place2WinGroup1.Content = u1Win2?.participants.Name;
     Fill(3, uchs, ref u2Win, ref u2Win2);
     WinGroup2.Content       = u2Win?.participants.Name;
     Place2WinGroup2.Content = u2Win2?.participants.Name;
 }
コード例 #2
0
ファイル: TableStat.xaml.cs プロジェクト: NinaILY/Judo
        public TableStat(ChampionatConfig conf)
        {
            InitializeComponent();
            if (conf == null)
            {
                return;
            }
            var uchs = new SortedDictionary <int?, UchastChamp>();

            foreach (var uch in conf.UchastChamp)
            {
                uchs.Add(uch.OrderNum, uch);
            }
            var luch = new List <UchastChamp>();

            foreach (var u in uchs)
            {
                luch.Add(u.Value);
            }
            for (int i = 0, j = 1; i < 6; i += 3)
            {
                if (i > luch.Count - 1)
                {
                    break;
                }
                var tb = new TbGroup()
                {
                    conf = conf, OrderGroup = j++
                };
                tb.uch1 = luch[i];
                if (luch.Count > i + 1)
                {
                    tb.uch2 = luch[i + 1];
                }
                if (luch.Count > i + 2)
                {
                    tb.uch3 = luch[i + 2];
                }
                gr.Children.Add(new TableGroup(tb));
            }
            if (luch.Count > 3)
            {
                gr.Children.Add(new TableGroupWin(luch, conf));
            }
        }
コード例 #3
0
 public void Update(ChampionatConfig champ)
 {
     sors    = champ.Sorevnovanie.OrderByDescending(r => r.NumGroup).ToList();
     current = -1;
     Next();
 }