示例#1
0
        void Run()
        {
            var tmp = new List <StatItem>();
            var r   = new Random(1);

            while (true)
            {
                tmp.Clear();
                Statistic.Clear();
                tmp = MonitorManager.GetCurrencyStatictic(TickPeriod.ToInt(), ConnectionString);

                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.RUB));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.USD));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.EUR));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.CHF));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.JPY));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.GBP));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.CAD));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.CNY));
                Statistic.Add(GetByCurr(tmp, CurrencyTypeEnum.BRL));

                ClearStatServer();

                StatServer = MonitorManager.GetServerStatictic(TickPeriod.ToInt(), ConnectionString);

                RiseShowValueAndPriceEvent();
                Thread.Sleep(TickPeriod.ToInt());
            }
        }