private void CreateSampleWorker(object[] args)
        {
            ConfigManager.Executed += this.ConfigManager_Executed;

            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            var result = SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplateMasterPage, SamplesThemeName);

            if (result)
            {
                var navigationControl = new NavigationControl();
                navigationControl.NavigationMode   = NavigationModes.HorizontalDropDownMenu;
                navigationControl.NavigationAction = NavigationAction.OnMouseOver;
                navigationControl.Skin             = "WebBlue";

                SampleUtilities.AddControlToTemplate(new Guid(SamplesTemplateId), navigationControl, "Menu", "Navigation");
            }

            // add aa custom events provider
            var eventsConfig = Config.Get <EventsConfig>();

            if (!eventsConfig.Providers.Elements.Any(p => p.Name == CustomEventsProviderName))
            {
                var customProvider = new DataProviderSettings(eventsConfig.Providers)
                {
                    Name         = CustomEventsProviderName,
                    Description  = "Alternate provider for storing Events data in database using OpenAccess ORM.",
                    ProviderType = typeof(OpenAccessEventProvider)
                };
                var values = new NameValueCollection();
                values.Add("applicationName", "/CustomEvents");
                customProvider.Parameters = values;
                eventsConfig.Providers.Add(customProvider);
                ConfigManager.GetManager().SaveSection(eventsConfig);
            }
            //create the default calendar for the custom events provier
            EventsManager eventsManager         = EventsManager.GetManager(CustomEventsProviderName);
            Calendar      defaultCustomCalendar = eventsManager.CreateCalendar();

            defaultCustomCalendar.Title   = "Custom Calendar";
            defaultCustomCalendar.UrlName = "custom-calendar";
            eventsManager.SaveChanges();

            this.CreateNewsItems();
            this.CreateBlogPosts();
            this.CreateEvents(string.Empty);
            this.CreateEvents(CustomEventsProviderName);

            this.CreateHomePage();
            this.CreateAboutUsPage();
            this.CreateNewsPage();
            this.CreateBlogAPage();
            this.CreateBlogBPage();
            this.CreateEventsPage();
            this.CreateCustomEventsPage();
            this.CreateContactUsPage();
        }