public Diaporama(List <JPGFileInfo> listJpg) { InitializeComponent(); this._listJpg = listJpg; id = 0; mImage = _listJpg[id]; DataContext = mImage; timer = new DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 3); timer.Tick += new EventHandler(timer_Tick); timer.Start(); }
public void previousImage() { if (id > 0) { id--; } else { id = _listJpg.Count() - 1; } mImage = _listJpg[id]; DataContext = mImage; }
public void nextImage() { if (id < _listJpg.Count() - 1) { id++; } else { id = 0; } mImage = _listJpg[id]; DataContext = mImage; }