public MediaPlayer(int playListPos, List <string> playL)
        {
            InitializeComponent();
            myMedia.Source = new Uri(playL[playListPos], UriKind.Relative);

            DispatcherTimer timer = new DispatcherTimer();

            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += Timer_Tick;
            timer.Start();
            MedCont = new MediaPlayerController(this, myMedia, playL, playListPos);
        }
        private void DisplayFiles(List <string> FilesToDisplay)
        {
            List <CustomFileInfo> FileInfoList = new List <CustomFileInfo>();

            foreach (string item in FilesToDisplay)
            {
                CustomFileInfo file = new CustomFileInfo(new FileInfo(item));
                FileInfoList.Add(file);
            }
            MedCont                  = new MediaPlayerController(this, myMedia, FilesToDisplay, 0);
            FilesFromFolders2        = FilesToDisplay;
            FileListView.ItemsSource = FileInfoList;
        }
        internal void GetFilesFromFolders()
        {
            SelectedIndexListView = 0;
            List <string> folders           = PathManager.ReadFromFile();
            List <string> AllowedExtensions = new List <string> {
                ".mp3", ".jpg", ".mp4", ".avi", ".png"
            };                                                                                           //need query form DB

            FilesFromFolders  = null;
            FilesFromFolders  = Scanner.GetFiles(folders, AllowedExtensions);
            FilesFromFolders2 = FilesFromFolders;
            FillFilesToListView();
            AddFolderWatch(AllowedExtensions);
            MedCont = new MediaPlayerController(this, myMedia, FilesFromFolders, 0);
            PathManager.SaveToFile(folders);
        }
 private void MyWindow_Loaded(object sender, RoutedEventArgs e)
 {
     GetFilesFromFolders();
     MedCont = new MediaPlayerController(this, myMedia, FilesFromFolders, 0);
 }