// Uncomment the method below to handle the event raised after a feature has been activated.

        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            VideoPlayer.VideoPlayer player = null;

            // Is the admin group created yet?
            using (SPWeb checkWeb = (SPWeb)properties.Feature.Parent)
            {
                if (Util.IsUserAnAdmin(checkWeb))
                {
                    // The user is in the admin group
                }
            }

            // Search
            //AddWebParts(properties, "Demo/SearchResults.aspx", MakeConsumerWebPart(new VideoSearch.VideoSearch(), "Brightcove Video Cloud Search"));

            // Player: Previewing
            //AddWebParts(properties, "Demo/VideoPlayer.aspx", MakeConsumerWebPart(new VideoPlayer.VideoPlayer(), "Brightcove Video Cloud Player"));

            // Add playlist player
            //player = new VideoPlayer.VideoPlayer();
            //player.PlayerWidth = "960";
            //player.PlayerHeight = "450";
            //AddWebParts(properties, "Demo/PlaylistPlayer.aspx", MakeConsumerWebPart(player, "Brightcove Video Cloud Player"));

            // Articles: Publishing
            player              = new VideoPlayer.VideoPlayer();
            player.PlayerWidth  = "320";
            player.PlayerHeight = "195";
            AddWebParts(properties, "Demo/Articles.aspx", new System.Web.UI.WebControls.WebParts.WebPart[] { MakeConsumerWebPart(player, "Brightcove Video Cloud Player") }, new string[] { "Header" });

            // Playlist
            AddWebParts(properties, "Demo/VideoPlaylist.aspx", new System.Web.UI.WebControls.WebParts.WebPart[] {
                MakeConsumerWebPart(new VideoPlaylist.VideoPlaylist(), "Brightcove Video Cloud Playlist"),
                MakeConsumerWebPart(new VideoPicklist.VideoPicklist(), "Brightcove Video Cloud Picklist", true)
            });

            // Playlist Editor
            AddWebParts(properties, "Demo/PlaylistEditor.aspx", new System.Web.UI.WebControls.WebParts.WebPart[] {
                MakeConsumerWebPart(new VideoPlaylist.VideoPlaylist(), "Brightcove Video Cloud Playlist"),
                MakeConsumerWebPart(new VideoPicklist.VideoPicklist(), "Brightcove Video Cloud Picklist", true)
            });

            // Editor
            //AddWebParts(properties, "Demo/VideoEditor.aspx", MakeConsumerWebPart(new VideoEditor.VideoEditor(), "Brightcove Video Cloud Editor"));

            // Upload
            //AddWebParts(properties, "Demo/VideoUpload.aspx", MakeConsumerWebPart(new VideoEditor.VideoEditor(), "Brightcove Video Cloud Editor"));
        }
        // Uncomment the method below to handle the event raised after a feature has been activated.
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            SPWeb checkWeb = (SPWeb)properties.Feature.Parent;
            VideoPlayer.VideoPlayer player = null;

            // Is the admin group created yet?
            if (Util.IsUserAnAdmin(checkWeb))
            {
                // The user is in the admin group
                checkWeb.Dispose();
            }

            // Search
            //AddWebParts(properties, "Demo/SearchResults.aspx", MakeConsumerWebPart(new VideoSearch.VideoSearch(), "Brightcove Video Cloud Search"));

            // Player: Previewing
            //AddWebParts(properties, "Demo/VideoPlayer.aspx", MakeConsumerWebPart(new VideoPlayer.VideoPlayer(), "Brightcove Video Cloud Player"));

            // Add playlist player
            //player = new VideoPlayer.VideoPlayer();
            //player.PlayerWidth = "960";
            //player.PlayerHeight = "450";
            //AddWebParts(properties, "Demo/PlaylistPlayer.aspx", MakeConsumerWebPart(player, "Brightcove Video Cloud Player"));

            // Articles: Publishing
            player = new VideoPlayer.VideoPlayer();
            player.PlayerWidth = "320";
            player.PlayerHeight = "195";
            AddWebParts(properties, "Demo/Articles.aspx", new System.Web.UI.WebControls.WebParts.WebPart[] { MakeConsumerWebPart(player, "Brightcove Video Cloud Player") }, new string[] { "Header"});

            // Playlist
            AddWebParts(properties, "Demo/VideoPlaylist.aspx", new System.Web.UI.WebControls.WebParts.WebPart[] {
                MakeConsumerWebPart(new VideoPlaylist.VideoPlaylist(), "Brightcove Video Cloud Playlist"),
                MakeConsumerWebPart(new VideoPicklist.VideoPicklist(), "Brightcove Video Cloud Picklist", true) });

            // Playlist Editor
            AddWebParts(properties, "Demo/PlaylistEditor.aspx", new System.Web.UI.WebControls.WebParts.WebPart[] {
                MakeConsumerWebPart(new VideoPlaylist.VideoPlaylist(), "Brightcove Video Cloud Playlist"),
                MakeConsumerWebPart(new VideoPicklist.VideoPicklist(), "Brightcove Video Cloud Picklist", true) });

            // Editor
            //AddWebParts(properties, "Demo/VideoEditor.aspx", MakeConsumerWebPart(new VideoEditor.VideoEditor(), "Brightcove Video Cloud Editor"));

            // Upload
            //AddWebParts(properties, "Demo/VideoUpload.aspx", MakeConsumerWebPart(new VideoEditor.VideoEditor(), "Brightcove Video Cloud Editor"));
        }