Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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");
        }