this.panel1.BackgroundImage = Image.FromFile(@"D:\TestDemo\WindowsFormsApp2\WindowsFormsApp2\黑箭头.png");
this.panel1.BackgroundImageLayout = ImageLayout.Stretch;
this.panel1.Tag = "img1";
teleTimer.Elapsed += (o,k)=> {
if (this.panel1.Tag.ToString() != "img1")
{
this.panel1.BackgroundImage = Image.FromFile(@"D:\TestDemo\WindowsFormsApp2\WindowsFormsApp2\黑箭头.png");
this.panel1.BackgroundImageLayout = ImageLayout.Stretch;
this.panel1.Tag = "img1";
}
else
{
this.panel1.BackgroundImage = Image.FromFile(@"D:\TestDemo\WindowsFormsApp2\WindowsFormsApp2\红箭头.png");
this.panel1.BackgroundImageLayout = ImageLayout.Stretch;
this.panel1.Tag = "img2";
}
};
teleTimer.Start();