public override void Init(ProductContext productContext) { productContext.ThemesFolderVirtualPath = String.Concat(PathProvider.BaseVirtualPath, "App_Themes"); productContext.ImageFolder = "images"; productContext.MasterPageFile = String.Concat(PathProvider.BaseVirtualPath, "Masters/BasicTemplate.Master").ToLower(); productContext.DisabledIconFileName = "product_disabled_logo.png"; productContext.IconFileName = "product_logo.png"; productContext.LargeIconFileName = "product_logolarge.png"; productContext.DefaultSortOrder = 30; productContext.UserActivityControlLoader = new UserActivityControlLoader(); productContext.UserActivityPublishers = new List <IUserActivityPublisher> { new FilesActivityPublisher() }; UserActivityManager.AddFilter(new FilesActivityPublisher()); productContext.SubscriptionManager = new SubscriptionManager(); productContext.SpaceUsageStatManager = new FilesSpaceUsageStatManager(); productContext.AdminOpportunities = GetAdminOpportunities; productContext.UserOpportunities = GetUserOpportunities; productContext.CanNotBeDisabled = true; _moduleContext = new ModuleContext { SearchHandler = new SearchHandler(), StatisticProvider = new StatisticProvider() }; _productContext = productContext; }
public override void Init(ProductContext productContext) { if (!DbRegistry.IsDatabaseRegistered(Global.DB_ID)) { DbRegistry.RegisterDatabase(Global.DB_ID, WebConfigurationManager.ConnectionStrings[Global.DB_ID]); } new SearchHandler(); ConfigurationManager.Configure(ID, PathProvider.BaseVirtualPath, String.Empty, Global.FileStorageModule); productContext.ThemesFolderVirtualPath = String.Concat(PathProvider.BaseVirtualPath, "App_Themes"); productContext.ImageFolder = "images"; productContext.MasterPageFile = String.Concat(PathProvider.BaseVirtualPath, "Masters/BasicTemplate.Master"); productContext.DisabledIconFileName = "product_disabled_logo.png"; productContext.IconFileName = "product_logo.png"; productContext.LargeIconFileName = "product_logolarge.png"; productContext.SubscriptionManager = new ProductSubscriptionManager(); productContext.UserActivityControlLoader = new ProjectActivity(); productContext.WhatsNewHandler = new WhatsNewHandler(); productContext.UserActivityPublishers = new List <IUserActivityPublisher>() { new TimeLinePublisher() }; productContext.DefaultSortOrder = 10; productContext.SpaceUsageStatManager = new ProjectsSpaceUsageStatManager(); productContext.AdminOpportunities = GetAdminOpportunities; productContext.UserOpportunities = GetUserOpportunities; productContext.HasComplexHierarchyOfAccessRights = true; context = productContext; NotifyClient.Instance.Client.RegisterSendMethod(SendMsgMilestoneDeadline, TimeSpan.FromDays(1), DateTime.UtcNow.Date.AddHours(7)); NotifyClient.Instance.Client.RegisterSendMethod(ReportHelper.SendAutoReports, TimeSpan.FromHours(1), DateTime.UtcNow.Date.AddHours(DateTime.UtcNow.Hour)); NotifyClient.Instance.Client.RegisterSendMethod(TaskHelper.SendAutoReminderAboutTask, TimeSpan.FromHours(1), DateTime.UtcNow.Date.AddHours(DateTime.UtcNow.Hour)); NotifyClient.Instance.Client.AddInterceptor(InterceptorSecurity); UserActivityManager.AddFilter(new WhatsNewHandler()); FilesIntegration.RegisterFileSecurityProvider("projects", "project", new SecurityAdapterProvider()); SearchHandlerManager.Registry(new SearchHandler()); }