/// <summary> /// Cette classe s'occupe de la lecture des vidéos et également de ce qu'on appelle la maintenance. /// Elle s'occupe de supprimer les vidéos au fur et à mesure que le temps passe pour que l'oeuvre soit éphemère. /// </summary> /// <param name="videos"></param> /// <param name="mainWindow"></param> public MaintenanceVideo(MediaElement[] videos, MainWindow mainWindow) { this.videos = videos; this.mainWindow = mainWindow; currentNumberOfVideos = 14; playAllVideos(); Random rnd = new Random(DateTime.Now.Millisecond); for (int i = 0; i < 16; i++) { favorites[i] = rnd.Next(0,3); ratingVideos[i] = rnd.Next(10, 19); } ratingVideos[5] = 0; ratingVideos[11] = 0; timer10minutes = new DispatcherTimer(); timer10minutes.Tick += new EventHandler(tickSuppression); timer10minutes.Interval = new TimeSpan(0, 0, 7, 0, 0); timer10minutes.Start(); }
public PanelPreview(MainWindow mainWindow) { InitializeComponent(); this.mainWindow = mainWindow; }