public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent content)
        {
            IBlogContext blogContext = dialogOwner as IBlogContext;

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

            videoSources.Add(new WebVideoSource());

            bool youtubeEnabled = MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.YouTubeVideo);

            if (youtubeEnabled)
            {
                videoSources.Add(new VideoPublishSource(Options.GetString("Video.lastPermission", String.Empty)));

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

                videoSources.Add(source);
            }

            return CreateContentForm(dialogOwner, content, videoSources, 0);
        }
        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);
        }