/** * * * VIDEOS * * **/ #region "Play video" // Play video function public void playVideo(String videoName) { try { if (!String.IsNullOrEmpty(wFile.ToString())) { WMP.URL = wFile.Path + wFile.Extension; } else { MetroMessageBox.Show(this, Langs.selectVideo, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { MetroMessageBox.Show(this, ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
// Refresh left list public void refreshList() { try { inListView.Items.Clear(); // Clear list foreach (String path in Directory.GetFiles(Reference.PlaylistsPath + playlistsList.Text)) { String ext = Path.GetExtension(path); if (ext != ".info" && ext != ".playinfo") { WatchFile file = new WatchFile(Path.GetFileNameWithoutExtension(path), Path.GetExtension(path)); ListViewItem item = new ListViewItem(file.ToString()); item.Tag = file; item.SubItems.Add(file.Description); item.SubItems.Add(file.Duration); inListView.Items.Add(item); } } } catch (Exception ex) { MetroMessageBox.Show(this, ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }