public void PlayFileFromPlayList(PlaylistModel plm) { InitPlayerView(); MediaControlExtension.SetFileexpVisiblity(VideoElement.PlayListView as UIElement, Visibility.Visible); MediaControllerVM.Current.Playlist.PlayFromAList(plm); (IShell as Window).WindowState = WindowState.Minimized; }
//public Style StyleChanger //{ // get { return stylechanger; } // private set // { // stylechanger = value; // this.RaisePropertyChanged(() => this.StyleChanger); // } //} //public void SetStyleOnWindowState(WindowState state) //{ // if (state == WindowState.Normal) // { // StyleChanger = (Style)Application.Current.Resources["maxbtn"]; // MaxbtnTooltip = "Maximize"; // } // else // { // StyleChanger = (Style)Application.Current.Resources["normbtn"]; // MaxbtnTooltip = "Restore Down"; // } //} internal void Loaded() { IVideoElement.PlayListView.OnPlaylistClose += Plv_OnPlaylistClose; IVideoElement.IVideoPlayer.ScreenSettingsChanged += IVideoPlayer_ScreenSettingsChanged; MediaControlExtension.SetFileexpVisiblity(IVideoElement.PlayListView as UIElement, System.Windows.Visibility.Collapsed); // FocusManager.SetFocusedElement(IVideoElement as DependencyObject,Mouse.Captured); SystemEvents.PowerModeChanged += this.SystemEvents_PowerModeChanged; }
public void AddFiletoPlayList(object obj) { InitPlayerView(); MediaControlExtension.SetFileexpVisiblity(VideoElement.PlayListView as UIElement, Visibility.Visible); VideoFolderChild vfc = (VideoFolderChild)obj; MediaControllerVM.Current.Playlist.Add(vfc); }
void Plv_OnPlaylistClose(object sender, EventArgs e) { if (MediaControlExtension.GetFileexpVisiblity(IVideoElement.PlayListView as UIElement) == System.Windows.Visibility.Visible) { MediaControlExtension.SetFileexpVisiblity(IVideoElement.PlayListView as UIElement, System.Windows.Visibility.Collapsed); } else { MediaControlExtension.SetFileexpVisiblity(IVideoElement.PlayListView as UIElement, System.Windows.Visibility.Visible); } }
public void VisibilityAnimation() { MediaControlExtension.SetIsMouseOverMediaElement(IMediaController.MediaController as UIElement, null); (IVideoElement as Window).Cursor = Cursors.Arrow; if (Isloaded && ScreenSetting == SCREENSETTINGS.Normal && !IsFullScreenMode) { //MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, true); } this.MousemoveTimer.Start(); }
private void WindowsTab_MouseLeave(object sender, MouseEventArgs e) { MediaControlExtension.SetIsMouseOverMediaElement(ISubtitleMediaController.MediaController as UIElement, true); if (!IsFullScreenMode) { MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, true); } else { MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, false); } this.MousemoveTimer.Start(); }
public void NormalScreenSettings() { // if (screensetting == SCREENSETTINGS.Normal) return; MediaControlExtension.SetCanAnimateControl(ISubtitleMediaController.MediaController, false); MediaControllerVM.CanAnimate = false; // IVideoPlayer.CanvasEnvironment.Children.Remove(IVideoPlayer.MediaController); //IVideoPlayer.MediaController.Margin = new Thickness(0,0,0,0); // VideoPlayerView.ControlHolder.Children.Add(IVideoPlayer.MediaController); ResetVisibilityAnimation(); // VideoPlayerView.SubviewBox.Margin = new Thickness(3, 0, 3, 37); screensetting = SCREENSETTINGS.Normal; MinimizeMediaCtrlText = "Minimize MediaControl"; }
private void ResetVisibilityAnimation() { //if((IVideoElement as Window).Dispatcher.)//if () return; this.MousemoveTimer.Stop(); MediaControlExtension.SetIsMouseOverMediaElement(IMediaController.MediaController as UIElement, null); (IVideoElement as Window).Cursor = Cursors.Arrow; if (Isloaded && ScreenSetting == SCREENSETTINGS.Normal && !IsFullScreenMode) { // IVideoElement.WindowsTab.Visibility = Visibility.Visible; //MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, true); } //else { MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, false); } }
public void NormalScreenSettings() { MediaControlExtension.SetCanAnimateControl((IMediaController.MediaController as UserControl), false); MediaControllerViewModel.CanAnimate = false; screensetting = SCREENSETTINGS.Normal; MinimizeMediaCtrlText = "Minimize MediaControl"; if (IVideoElement != null) { (IVideoElement as MetroWindow).UseNoneWindowStyle = false; (IVideoElement as MetroWindow).ShowTitleBar = true; (IVideoElement as MetroWindow).IgnoreTaskbarOnMaximize = false; } }
public void FullScreenSettings() { if (screensetting == SCREENSETTINGS.Fullscreen) { return; } // VideoPlayerView.ControlHolder.Children.Remove(IVideoPlayer.MediaController); MediaControllerVM.CanAnimate = true; //IVideoPlayer.MediaController.Margin = new Thickness(5, 32, 10, 0); MediaControlExtension.SetCanAnimateControl(ISubtitleMediaController.MediaController, true); //IVideoPlayer.CanvasEnvironment.Children.Add(IVideoPlayer.MediaController); // VideoPlayerView.SubviewBox.Margin = new Thickness(3, 0, 3, 88); screensetting = SCREENSETTINGS.Fullscreen; MinimizeMediaCtrlText = "Restore MediaControl"; }
internal void Loaded() { //remember to fix dis IVideoElement.PlayListView.OnPlaylistClose += Plv_OnPlaylistClose; IVideoElement.IVideoPlayerController.ScreenSettingsChanged += IVideoPlayer_ScreenSettingsChanged; MediaControlExtension.SetFileexpVisiblity(IVideoElement.PlayListView as UIElement, System.Windows.Visibility.Collapsed); //FocusManager.SetFocusedElement(IVideoElement as DependencyObject,Mouse.Captured); SystemEvents.PowerModeChanged += this.SystemEvents_PowerModeChanged; FilePlayerManager.MediaControllerViewModel.SubtitleChanged += MediaControllerInstance_SubtitleChanged; MediaPlayerService.OnMediaOpened += new EventHandler(MediaPlayer_MediaOpened); (IVideoElement as Window).Closing += new System.ComponentModel.CancelEventHandler(VideoElementViewModel_Closing); }
public void FullScreenSettings() { if (screensetting == SCREENSETTINGS.Fullscreen) { return; } MediaControllerViewModel.CanAnimate = true; MediaControlExtension.SetCanAnimateControl((IMediaController.MediaController as UserControl), true); screensetting = SCREENSETTINGS.Fullscreen; MinimizeMediaCtrlText = "Restore MediaControl"; if (IVideoElement != null) { (IVideoElement as MetroWindow).UseNoneWindowStyle = true; (IVideoElement as MetroWindow).IgnoreTaskbarOnMaximize = true; } }
private void ResetVisibilityAnimation() { //(IVideoElement as Window).Dispatcher.Invoke(new Action(() => //{ if (!MediaControllerVM.IsPlaying) { return; } this.MousemoveTimer.Stop(); MediaControlExtension.SetIsMouseOverMediaElement(ISubtitleMediaController.MediaController as UIElement, null); (IVideoElement as Window).Cursor = Cursors.Arrow; if (Isloaded && ScreenSetting == SCREENSETTINGS.Normal && !IsFullScreenMode) { // IVideoElement.WindowsTab.Visibility = Visibility.Visible; MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, true); } //else { MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, false); } //}), null); }
void MousemoveTimer_Tick(object sender, EventArgs e) { if (!MediaControllerVM.IsPlaying) { this.MousemoveTimer.Stop(); return; } if (!MediaControllerVM.IsMouseControlOver) { (IVideoElement as Window).Cursor = Cursors.None; //if (!MediaControllerVM.Current.IsFullScreenMode) //{ //IVideoElement.WindowsTab.Visibility = Visibility.Collapsed; MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, false); //} MediaControlExtension.SetIsMouseOverMediaElement(ISubtitleMediaController.MediaController as UIElement, false); this.MousemoveTimer.Stop(); } else if (MediaControllerVM.IsMouseControlOver) { this.MousemoveTimer.Stop(); } else { (IVideoElement as Window).Cursor = Cursors.None; if (!IsFullScreenMode) { //IVideoElement.WindowsTab.Visibility = Visibility.Collapsed; MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, false); } else { MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, true); } this.MousemoveTimer.Stop(); } }
void MousemoveTimer_Tick(object sender, EventArgs e) { if (MediaControllerViewModel == null) { MousemoveTimer.Stop(); return; } if (!MediaControllerViewModel.IsPlaying) { this.MousemoveTimer.Stop(); return; } if (!MediaControllerViewModel.IsMouseControlOver) { (IVideoElement as Window).Cursor = Cursors.None; // MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, false); MediaControlExtension.SetIsMouseOverMediaElement(IMediaController.MediaController as UIElement, false); this.MousemoveTimer.Stop(); } else if (MediaControllerViewModel.IsMouseControlOver) { this.MousemoveTimer.Stop(); } else { (IVideoElement as Window).Cursor = Cursors.None; if (!IsFullScreenMode) { // MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, false); } else { //MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, true); } this.MousemoveTimer.Stop(); } }
private void WindowsTab_MouseEnter(object sender, MouseEventArgs e) { this.MousemoveTimer.Stop(); MediaControlExtension.SetIsMouseOverMediaElement(ISubtitleMediaController.MediaController as UIElement, null); MediaControlExtension.SetAnimateWindowsTab(IVideoElement.WindowsTab as UIElement, true); }
private void Mediacontrol_MouseEnter(object sender, MouseEventArgs e) { this.MousemoveTimer.Stop(); MediaControlExtension.SetIsMouseOverMediaElement(ISubtitleMediaController.MediaController as UIElement, null); }