private void Next_enabled(object sender, CanExecuteRoutedEventArgs e) { if (FilePlayerManager.MediaControllerViewModel.IsfetchingRepeatItemAsync) { e.CanExecute = false; } e.CanExecute = MediaControllerViewModel.CanNext(); }
private void FastForward_executed(object sender, ExecutedRoutedEventArgs e) { ReWindFastForward(); MediaPlayerService.CurrentTimer += TimeSpan.FromMilliseconds(10000); MediaControllerViewModel.TimeChangeAction(); if (e.OriginalSource is Button) { RestoreMediaState(); } }
private void AddSubtitleFileAction(string[] filePathInfo) { for (int i = 0; i < filePathInfo.Length; i++) { FileInfo file = new FileInfo(filePathInfo[i]); if (file.Extension == ".srt") { MediaControllerViewModel.SetSubtitle(file.FullName); } } }
public void OnDrop(DragEventArgs e) { VideoFolder vf = (VideoFolder)e.Data.GetData(typeof(VideoFolder)); if (vf == null) { vf = (VideoFolder)e.Data.GetData(typeof(VideoFolderChild)); } if (vf == null) { if (MediaControllerViewModel.CurrentVideoItem != null) { String[] filePathInfo = (String[])e.Data.GetData("FileName", false); AddSubtitleFileAction(filePathInfo); return; } } if (vf.FileType == FileType.Folder) { VideoFolder vfc = null; foreach (VideoFolder item in vf.OtherFiles) { if (item.FileType == FileType.File) { vfc = item; break; } } if (vfc == null) { return; } MediaControllerViewModel.GetVideoItem(vfc as VideoFolderChild); return; } MediaControllerViewModel.GetVideoItem(vf as VideoFolderChild); CommandManager.InvalidateRequerySuggested(); }
private void ShiftRewind_executed(object sender, ExecutedRoutedEventArgs e) { ReWindFastForward(); MediaPlayerService.CurrentTimer -= TimeSpan.FromMilliseconds(1500); MediaControllerViewModel.TimeChangeAction(); }