Exemplo n.º 1
0
        private PlayoutSettings GetPlayoutSettings()
        {
            var result = new PlayoutSettings();

            result.RendererSettings.VideoDevice = Properties.Settings.Default.RendererDeviceName;
            result.PlaylistSettings             = PlayoutRepository.GetMPlaylistSettings();
            result.CGItems = PlayoutRepository.GetCGItems();
            return(result);
        }
Exemplo n.º 2
0
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();
            this.Container.RegisterInstance(new InteractionRequests());

            this.Container.RegisterInstance <IUserService>(new UserServiceAdapter());
            this.Container.RegisterInstance <IMediaFileImageResolver>(new MediaFileImageResolver());
            this.Container.RegisterInstance <IMediaFilePathResolver>(new MediaFilePathResolver(MediaFileStorage.Primary));
            this.Container.RegisterInstance <IPlayoutConfiguration>(PlayoutConfiguration.Current);

            this.Container.RegisterInstance(PlayoutRepository.GetMPlaylistSettings());

            this.Container.RegisterInstance <IMediaFileService>(new DefaultMediaFileService(null));
        }
Exemplo n.º 3
0
        private void miFormatSettings_Click(object sender, RoutedEventArgs e)
        {
            //var videoFormatName = Settings.Default.VideoFormatName;
            //var audioFormatName = Settings.Default.AudioFormatName;
            var formatWindow = new FormatWindow(PlayoutRepository.GetMPlaylistSettings());

            //formatWindow.SetFormats(videoFormatName, audioFormatName);

            if (formatWindow.ShowDialog() == true)
            {
                PlayoutRepository.SaveMPlaylistSettings(formatWindow.MPlaylistSettings);

                //Settings.Default.VideoFormatName = formatWindow.VideoFormat;
                //Settings.Default.AudioFormatName = formatWindow.AudioFormat;
                //Settings.Default.Save();
            }
        }
Exemplo n.º 4
0
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();

            this.Container.RegisterInstance(PlayoutRepository.GetMPlaylistSettings());
            this.Container.RegisterInstance(new InteractionRequests());
            this.Container.RegisterInstance <IMediaFileImageResolver>(new MediaFileImageResolver());
            this.Container.RegisterInstance <IUserService>(new UserServiceAdapter());
            this.Container.RegisterInstance <IMediaFilePathResolver>(new MediaFilePathResolver(MediaFileStorage.Primary));

            this.Container.RegisterType <IDestinationStreamManager, FileSystemDestinationStreamManager>(new ContainerControlledLifetimeManager());
            this.Container.RegisterType <IFileUploader, DefaultFileUploader>(new ContainerControlledLifetimeManager());
            this.Container.RegisterType <IMediaFileService, DefaultMediaFileService>(new ContainerControlledLifetimeManager());

            this.Container.RegisterInstance <IImageSourceDecoder>(DefaultImageSourceDecoder.Instance);
            this.Container.RegisterInstance <IImagePlaceholderProvider>(new DefaultImagePlaceholderProvider(150, 150));
            this.Container.RegisterInstance <IMediaFileInfoExtractor>(MLMediaFileInfoExtractor.Instance);

            this.Container.RegisterType <MediaFileItemManager>(new ContainerControlledLifetimeManager());

            this.Container.RegisterInstance <MediaFileDurationGetter>(new MLMediaFileDurationGetter());
        }
Exemplo n.º 5
0
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();
            this.Container.RegisterInstance <IUserService>(new UserServiceAdapter());
            this.Container.RegisterInstance(new InteractionRequests());

            MediaFileStorage currentStorage =
                (MediaFileStorage)Enum.Parse(typeof(MediaFileStorage), ConfigurationManager.AppSettings["storageType"], true);

            this.Container.RegisterInstance <IMediaFilePathResolver>(new MediaFilePathResolver(currentStorage));
            this.Container.RegisterInstance <IMediaFileImageResolver>(new MediaFileImageResolver());

            this.Container.RegisterInstance <IPlayoutConfiguration>(PlayoutConfiguration.Current);
            this.Container.RegisterInstance(PlayoutRepository.GetMPlaylistSettings());

            this.Container.RegisterType <PlayItemCollection>(new ContainerControlledLifetimeManager());
            this.Container.RegisterType <IPlaylist3, Playlist3>();

            this.Container.RegisterInstance <ObservableCollection <BindablePlayItem> >("playedCollection",
                                                                                       new ObservableCollection <BindablePlayItem>());

            this.Container.RegisterInstance <IMediaFileService>(new DefaultMediaFileService(null));
        }