Ejemplo n.º 1
0
        protected override async void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            int serverPort = StartServer();

            _dsPlayerBridge = new DirectShowPlayerBridge(_appHost.LogManager, this, _config.CommonApplicationPaths,
                                                         _appHost.GetIsoManager(), _appHost.GetZipClient(), _appHost.GetHttpClient(), _config,
                                                         _appHost.JsonSerializer);

            _windowSync = new WindowSync(this, _electronProcess.MainWindowHandle, _logger);
        }
        public DirectShowPlayerBridge(ILogManager logManager
                                      , MainBaseForm hostForm
                                      , IApplicationPaths appPaths
                                      , IIsoManager isoManager
                                      , IZipClient zipClient
                                      , IHttpClient httpClient,
                                      IConfigurationManager configurationManager, IJsonSerializer json, WindowSync windowSync)
        {
            _json       = json;
            _windowSync = windowSync;
            _logger     = logManager.GetLogger("DirectShowPlayerBridge");
            _player     = new InternalDirectShowPlayer(logManager, hostForm, appPaths, isoManager, zipClient, httpClient, configurationManager);

            _player.PlayStateChanged += _player_PlayStateChanged;
        }