コード例 #1
0
        private static void CurrentMarketOnChanged(DependencyObject doj, DependencyPropertyChangedEventArgs dp)
        {
            MarketDetails_BC uc3 = doj as MarketDetails_BC;

            if (uc3.CurrentMarket != null)
            {
                uc3.Grid[0].Text = uc3.CurrentMarket.MarketId;
                uc3.Grid[1].Text = uc3.CurrentMarket.TotalMatched.ToString("N0", CultureInfo.CurrentCulture);
                uc3.Grid[2].Text = uc3.CurrentMarket.CompetitionName;
                uc3.Grid[3].Text = uc3.CurrentMarket.EventType;
                uc3.Grid[4].Text = uc3.CurrentMarket.EventName;
                uc3.Grid[5].Text = uc3.CurrentMarket.MarketName;
                uc3.Grid[6].Text = uc3.CurrentMarket.Mbi.Last().Status.ToString();
                uc3.Grid[7].Text = uc3.CurrentMarket.Mbi.Last().NumberOfRunners.ToString();
                uc3.Grid[8].Text = uc3.CurrentMarket.Mbi.Last().NumberOfWinners.ToString();
                uc3.Grid[9].Text = uc3.CurrentMarket.StartMarketTime.ToString();

                bool b = uc3.CurrentMarket.Mbi.Last().IsInplay;
                if (b)
                {
                    uc3.Grid[11].Foreground = uc3.GreenColor;
                }
                else
                {
                    uc3.Grid[11].Foreground = uc3.BlackColor;
                }

                uc3.Grid[11].Text = b.ToString();
            }
        }
コード例 #2
0
        private static void TimeLeftOnChanged(DependencyObject doj, DependencyPropertyChangedEventArgs dp)
        {
            MarketDetails_BC uc3 = doj as MarketDetails_BC;

            uc3.Grid[10].Text = uc3.TimeLeft;
        }