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)); }