public DialogResult CreateContentFromTabbedDialog(IWin32Window dialogOwner, ISmartContent content, int selectedTab)
        {
            bool youtubeEnabled = MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.YouTubeVideo);

            if (!youtubeEnabled)
            {
                return(DialogResult.Cancel);
            }

            IBlogContext blogContext = dialogOwner as IBlogContext;

            List <MediaTab> videoSources = new List <MediaTab>();

            videoSources.Add(new WebVideoSource());

            VideoPublishSource videoPublishSource = new VideoPublishSource(Options.GetString("Video.lastPermission", String.Empty));

            //videoPublishSource.SelectedPath = files[0];
            videoSources.Add(videoPublishSource);

            VideoServiceVideoSource source = new VideoServiceVideoSource();

            source.RegisterServices(new IVideoService[] { new YouTubeVideoService() });

            videoSources.Add(source);

            return(CreateContentForm(dialogOwner, content, videoSources, selectedTab));
        }
        public DialogResult CreateContentFromFile(IWin32Window dialogOwner, ISmartContent content, string[] files, object context)
        {
            bool youtubeEnabled = MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.YouTubeVideo);

            if (!youtubeEnabled)
            {
                return(DialogResult.Cancel);
            }

            Trace.Assert(files.Length == 1, "Cannot insert more then 1 video at once through drag and drop.");

            IBlogContext blogContext = dialogOwner as IBlogContext;

            List <MediaTab> videoSources = new List <MediaTab>();

            videoSources.Add(new WebVideoSource());

            VideoPublishSource videoPublishSource = new VideoPublishSource(Options.GetString("Video.lastPermission", String.Empty));

            videoPublishSource.SelectedPath = files[0];
            videoSources.Add(videoPublishSource);

            VideoServiceVideoSource source = new VideoServiceVideoSource();

            source.RegisterServices(new IVideoService[] { new YouTubeVideoService() });

            videoSources.Add(source);

            return(CreateContentForm(dialogOwner, content, videoSources, 1));
        }
        public DialogResult CreateContentFromTabbedDialog(IWin32Window dialogOwner, ISmartContent content, int selectedTab)
        {
            bool youtubeEnabled = MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.YouTubeVideo);
            if (!youtubeEnabled)
            {
                return DialogResult.Cancel;
            }

            IBlogContext blogContext = dialogOwner as IBlogContext;

            List<MediaTab> videoSources = new List<MediaTab>();

            videoSources.Add(new WebVideoSource());

            VideoPublishSource videoPublishSource = new VideoPublishSource(Options.GetString("Video.lastPermission", String.Empty));
            //videoPublishSource.SelectedPath = files[0];
            videoSources.Add(videoPublishSource);

            VideoServiceVideoSource source = new VideoServiceVideoSource();
            source.RegisterServices(new IVideoService[] { new YouTubeVideoService() });

            videoSources.Add(source);

            return CreateContentForm(dialogOwner, content, videoSources, selectedTab);
        }
        public DialogResult CreateContentFromFile(IWin32Window dialogOwner, ISmartContent content, string[] files, object context)
        {
            bool youtubeEnabled = MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.YouTubeVideo);
            if (!youtubeEnabled)
            {
                return DialogResult.Cancel;
            }

            Trace.Assert(files.Length == 1, "Cannot insert more then 1 video at once through drag and drop.");

            IBlogContext blogContext = dialogOwner as IBlogContext;

            List<MediaTab> videoSources = new List<MediaTab>();

            videoSources.Add(new WebVideoSource());

            VideoPublishSource videoPublishSource = new VideoPublishSource(Options.GetString("Video.lastPermission", String.Empty));
            videoPublishSource.SelectedPath = files[0];
            videoSources.Add(videoPublishSource);

            VideoServiceVideoSource source = new VideoServiceVideoSource();
            source.RegisterServices(new IVideoService[] { new YouTubeVideoService() });

            videoSources.Add(source);

            return CreateContentForm(dialogOwner, content, videoSources, 1);
        }