コード例 #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();
        }
コード例 #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");
        }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: DaveCS1/Osu-Player
        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();
        }
コード例 #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");
        }