Esempio n. 1
0
        public void Tick()
        {
            LinkedListNode <LiveTimingItem> node = Items.First;

            for (int i = 1; i <= Module.Items.Count; i++)
            {
                int pos = 1;
                if (i > 1)
                {
                    pos = i + (pageIndex * 21);
                }

                LiveStandingsItem item    = Module.Items.Find(it => it.PositionLive == pos);
                LiveTimingItem    current = node.Value;
                current.Tick(item, Mode);

                node = node.Next;
                if (node == null)
                {
                    break;
                }
            }

            if (dummyActive)
            {
                UpadeDummies();
            }

            int j = (((pageIndex + 1) * 21) + 1 < Module.Items.Count) ? pageIndex + 1 : 0;

            if (pageIndex < j && canUpdateButtons)
            {
                nextPageButton.IsEnabled = true;
            }

            foreach (LiveTimingItem item in Items)
            {
                if (item.OldPosition == -1)
                {
                    item.Visibility = Visibility.Hidden;
                }
                else
                {
                    item.Visibility = Visibility.Visible;
                }
            }
        }
Esempio n. 2
0
        private void UpadeDummies()
        {
            LinkedListNode <LiveTimingItem> node = Dummies.First;

            for (int i = 2; i <= Module.Items.Count; i++)
            {
                int pos = i + (dummyPageIndex * 21);

                LiveStandingsItem item    = Module.Items.Find(it => it.PositionLive == pos);
                LiveTimingItem    current = node.Value;
                current.Tick(item, Mode);

                node = node.Next;
                if (node == null)
                {
                    break;
                }
            }
        }