public MainWindow() { PlayerViewModel.InitViewModel(); InitializeComponent(); ViewModel = (MainWindowViewModel)DataContext; ViewModel.Player = PlayerViewModel.Current; LyricWindow = new LyricWindow(this); if (AppSettings.Default.Lyric.EnableLyric) { LyricWindow.Show(); } OverallKeyHook = new OverallKeyHook(this); Animation.Loaded += Animation_Loaded; MiniPlayController.CloseButtonClicked += () => { if (AppSettings.Default.General.ExitWhenClosed == null) { Show(); } Close(); }; MiniPlayController.MaxButtonClicked += () => { Topmost = true; Topmost = false; Show(); PlayerViewModel.Current.EnableVideo = true; GetCurrentFirst <MiniWindow>()?.Close(); }; TryBindHotKeys(); }
public MainWindow() { InitializeComponent(); ViewModel = (MainWindowViewModel)DataContext; PlayerViewModel.InitViewModel(); ViewModel.Player = PlayerViewModel.Current; LyricWindow = new LyricWindow(this); LyricWindow.Show(); OverallKeyHook = new OverallKeyHook(this); TryBindHotkeys(); Unosquare.FFME.MediaElement.FFmpegDirectory = Path.Combine(Domain.PluginPath, "ffmpeg"); }
public MainWindow() { PlayerViewModel.InitViewModel(); InitializeComponent(); ViewModel = (MainWindowViewModel)DataContext; ViewModel.Player = PlayerViewModel.Current; LyricWindow = new LyricWindow(this); if (AppSettings.Current.Lyric.EnableLyric) { LyricWindow.Show(); } OverallKeyHook = new OverallKeyHook(this); Animation.Loaded += Animation_Loaded; TryBindHotKeys(); }
public MainWindow() { InitializeComponent(); ViewModel = (MainWindowViewModel)DataContext; WelcomeViewModel = (WelcomeViewModel)WelcomeArea.DataContext; PlayerViewModel.InitViewModel(); ViewModel.Player = PlayerViewModel.Current; LyricWindow = new LyricWindow(this); if (PlayerConfig.Current.Lyric.EnableLyric) { LyricWindow.Show(); } OverallKeyHook = new OverallKeyHook(this); TryBindHotkeys(); Unosquare.FFME.Library.FFmpegDirectory = Path.Combine(Domain.PluginPath, "ffmpeg"); }