日期:2014-05-18 浏览次数:20914 次
 private int count = 1;
        private int num=0;
        
        public void StartTime()
        {
            if (num==0)
            {
                xmlServer.GetXmlInfo();
                num++;
            }
            timer.Tick += new EventHandler(timer_Tick);
            timer.Interval = 1000;
            timer.Start();
            
        }
        void timer_Tick(object sender, EventArgs e)
        { 
            string path = xmlServer.IsInfo.DicImage1[count];
            //我想知道,这里怎么写,才能让picPlayer得到form中的PictureBox
            picPlayer.Load(path);
            count++;
        }
 /// <summary>
    /// 定义1个构造函数来
    /// 对picture进行传值
    /// </summary>
    public class ShowPicture
    {
        private PictureBox pb;
        public ShowPicture()
        {}
        public ShowPicture(PictureBox picPlayer)
        {
            this.pb = picPlayer;       
        }
    }
time.StartTime(); BLL.ShowPicture sp = new BLL.ShowPicture(picPlayer);