public DiashowPlayer(Diashow diashow, bool preferVLC = false) { this.diashow = diashow; diashow.PriorityMedia.ForEach((m) => priorityMediaLastTick.Add(m, 0)); player = new Form_Diashow(preferVLC); player.timer.Interval = diashow.IntervalTicks; player.timer.Tick += timertick; }
private void b_play_Click(object sender, EventArgs e) { var diashow = new DiashowPlayer.Diashow() { GlobalInterval = Decimal.ToInt32(nUD_interval.Value), }; foreach (DataGridViewRow row in dGV_diashowitems.Rows) { if ((row.Cells[2].Value as string).StartsWith("Image")) { diashow.Medias.Add(new Media(row.Cells[1].Value as string, row.Cells[3].Value as RepeationSetting, MediaType.STILLIMAGE)); } else { diashow.Medias.Add(new Media(row.Cells[1].Value as string, row.Cells[3].Value as RepeationSetting, MediaType.VIDEO)); } } (new DiashowPlayer.DiashowPlayer(diashow, rB_useVLC.Checked)).play(); }