private void picShow_MouseWheel(object sender, MouseEventArgs e) { if (e.Delta > 0) { // Previouse Picture EventPrev arg = new SimplePhotoShow.EventPrev(); EventHandler <EventPrev> handler = PrevPic; if (handler != null) { handler(null, arg); } SetPicture(arg.FileName); } else if (e.Delta < 0) { // Next Picture EventNext arg = new SimplePhotoShow.EventNext(); EventHandler <EventNext> handler = NextPic; if (handler != null) { handler(null, arg); } SetPicture(arg.FileName); } }
private void GetNextPicture() { if (wmp.playState != WMPLib.WMPPlayState.wmppsStopped) { wmp.Ctlcontrols.stop(); wmp.Visible = false; } EventNext arg = new SimplePhotoShow.EventNext(); EventHandler <EventNext> handler = NextPic; if (handler != null) { handler(null, arg); } SetPicture(arg.FileName); }