private
void
buttonAutoPlay_Click
(
object
sender
,
EventArgs
e
)
{
if ( isAuto == 0 ) {
isAuto = 1 ;
} else
{
isAuto = 0 ;
}
this . timer1 . Interval = 1000 ;
this . timer1 . Start ();
}
private void timer1_Tick ( object sender , EventArgs e )
{
if ( mlist . Count > 0 )
{
if ( pictureNum < mlist . Count - 1 )
{
pictureNum ++;
}
else
{
pictureNum = 0 ;
}
this . pictureBox1 . Image = mlist [ pictureNum ];
pictureNum ++;
} else
{
//提示选择图片,或弹出文件选择对话框
}
}
{
if ( isAuto == 0 ) {
isAuto = 1 ;
} else
{
isAuto = 0 ;
}
this . timer1 . Interval = 1000 ;
this . timer1 . Start ();
}
private void timer1_Tick ( object sender , EventArgs e )
{
if ( mlist . Count > 0 )
{
if ( pictureNum < mlist . Count - 1 )
{
pictureNum ++;
}
else
{
pictureNum = 0 ;
}
this . pictureBox1 . Image = mlist [ pictureNum ];
pictureNum ++;
} else
{
//提示选择图片,或弹出文件选择对话框
}
}