首页 新闻 会员 周边

怎样让图片显示的时间为读取服务器传过来的时间,图片依次显示

0
悬赏园豆:10 [已关闭问题] 关闭于 2013-09-10 15:15

 public void ProcessAdvert(string[] result)    

     {          

      string resu = "";             

       for (int i = 0; i < result.Length; i++)    

         {                        

           string adPic = array[2].Trim();         

            int duration = Convert.ToInt32(array[4].Trim());   广告显示的时间    

             DispatcherTimer timer = new DispatcherTimer();     

            timer.Interval = TimeSpan.FromSeconds(duration);    

             timer.Tick += timer_Tick;           

             timer.Start();

            }     

     }

  void timer_Tick(object sender, EventArgs e)         {              imgAdvertisement.Source = new BitmapImage(new Uri(("http://192.168.1.1/advert/" + adPic), UriKind.Absolute));      }

菜鸟_001的主页 菜鸟_001 | 初学一级 | 园豆:70
提问于:2013-09-09 13:59
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册