Esempio n. 1
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            context.Create(
                AppFeatures.MaxUserCount,
                defaultValue: "0", //0 = unlimited
                displayName: L("MaximumUserCount"),
                inputType: new SingleLineStringInputType(new NumericValueValidator(0, int.MaxValue))
                );

            var chatFeature = context.Create(
                AppFeatures.ChatFeature,
                defaultValue: "false",
                displayName: L("ChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToTenantChatFeature,
                defaultValue: "false",
                displayName: L("TenantToTenantChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToHostChatFeature,
                defaultValue: "false",
                displayName: L("TenantToHostChatFeature"),
                inputType: new CheckboxInputType()
                );
        }
Esempio n. 2
0
        /// <summary>
        /// 特性设置
        /// </summary>
        /// <param name="context"></param>
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var productionFeature  = context.Create(AppFeatures.ProductionFeature, "false", scope: FeatureScopes.Edition);
            var supervisionFeature = context.Create(AppFeatures.SupervisionFeature, "false", scope: FeatureScopes.Edition);

            var chatFeature = context.Create(
                AppFeatures.ChatFeature,
                defaultValue: "false",
                displayName: L("ChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToTenantChatFeature,
                defaultValue: "false",
                displayName: L("TenantToTenantChatFeature"),
                inputType: new CheckboxInputType()
                );
            chatFeature.CreateChildFeature(
                AppFeatures.TenantToHostChatFeature,
                defaultValue: "false",
                displayName: L("TenantToHostChatFeature"),
                inputType: new CheckboxInputType()
                );
        }
Esempio n. 3
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var cms = context.Create(FeatureNames.Cms, "false", L("Cms"), scope: FeatureScopes.All, inputType: new CheckboxInputType());

            var basicReporting = context.Create("BasicReporting",
                                                "false",
                                                L("basicReporting"),
                                                L("BasicReportingDescription"),
                                                FeatureScopes.Edition, new CheckboxInputType());
            var advancedReporting = context.Create("AdvancedReporting",
                                                   "false",
                                                   L("AdvancedReporting"),
                                                   L("AdvancedReportingDescription"),
                                                   FeatureScopes.Edition, new CheckboxInputType());

            advancedReporting.CreateChildFeature("PrintData",
                                                 defaultValue: "false",
                                                 scope: FeatureScopes.Edition, inputType: new CheckboxInputType());
            advancedReporting.CreateChildFeature("PrintDataMaximum",
                                                 defaultValue: "false",
                                                 scope: FeatureScopes.Edition, inputType: new CheckboxInputType());

            advancedReporting.CreateChildFeature("MaxReportsPerMonth",
                                                 defaultValue: "100",
                                                 scope: FeatureScopes.Edition, inputType: new SingleLineStringInputType());

            advancedReporting.CreateChildFeature("HighCharts",
                                                 "false",
                                                 L("HighCharts"),
                                                 L("HighChartsDescription"),
                                                 FeatureScopes.Edition, new CheckboxInputType());
        }
Esempio n. 4
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            //var sampleBooleanFeature = context.Create("SampleBooleanFeature", defaultValue: "false");
            //sampleBooleanFeature.CreateChildFeature("SampleNumericFeature", defaultValue: "10");
            //context.Create("SampleSelectionFeature", defaultValue: "B");

            var sampleBooleanFeature = context.Create(
                CompareXFeatures.SampleBooleanFeature,
                defaultValue: "false",
                displayName: L("Sample boolean feature"),
                inputType: new CheckboxInputType()
                );

            sampleBooleanFeature.CreateChildFeature(
                CompareXFeatures.SampleNumericFeature,
                defaultValue: "10",
                displayName: L("Sample numeric feature"),
                inputType: new SingleLineStringInputType(new NumericValueValidator(1, 1000000))
                );

            context.Create(
                CompareXFeatures.SampleSelectionFeature,
                defaultValue: "B",
                displayName: L("Sample selection feature"),
                inputType: new ComboboxInputType(
                    new StaticLocalizableComboboxItemSource(
                        new LocalizableComboboxItem("A", L("Selection A")),
                        new LocalizableComboboxItem("B", L("Selection B")),
                        new LocalizableComboboxItem("C", L("Selection C"))
                        )
                    )
                );
        }
Esempio n. 5
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var chatFeature = context.Create(
                AppFeatures.ChatFeature,
                defaultValue: "false",
                displayName: L("ChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToTenantChatFeature,
                defaultValue: "false",
                displayName: L("TenantToTenantChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToHostChatFeature,
                defaultValue: "false",
                displayName: L("TenantToHostChatFeature"),
                inputType: new CheckboxInputType()
                );

            var articleFeature = context.Create(
                AppFeatures.ArticleFeature,
                defaultValue: "false",
                displayName: L("ArticleFeature"),
                inputType: new CheckboxInputType()
                );
        }
Esempio n. 6
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            context.Create(
                AppFeatures.MaxUserCount,
                defaultValue: "0", //0 = unlimited
                displayName: L("MaximumUserCount"),
                inputType: new SingleLineStringInputType(new NumericValueValidator(0, int.MaxValue))
                );

            var chatFeature = context.Create(
                AppFeatures.ChatFeature,
                defaultValue: "false",
                displayName: L("ChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToTenantChatFeature,
                defaultValue: "false",
                displayName: L("TenantToTenantChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToHostChatFeature,
                defaultValue: "false",
                displayName: L("TenantToHostChatFeature"),
                inputType: new CheckboxInputType()
                );

            var sampleBooleanFeature = context.Create(
                AppFeatures.SampleBooleanFeature,
                defaultValue: "false",
                displayName: L("Sample boolean feature"),
                inputType: new CheckboxInputType()
                );

            sampleBooleanFeature.CreateChildFeature(
                AppFeatures.SampleNumericFeature,
                defaultValue: "10",
                displayName: L("Sample numeric feature"),
                inputType: new SingleLineStringInputType(new NumericValueValidator(1, 1000000))
                );

            context.Create(
                AppFeatures.SampleSelectionFeature,
                defaultValue: "B",
                displayName: L("Sample selection feature"),
                inputType: new ComboboxInputType(
                    new StaticLocalizableComboboxItemSource(
                        new LocalizableComboboxItem("A", L("Selection A")),
                        new LocalizableComboboxItem("B", L("Selection B")),
                        new LocalizableComboboxItem("C", L("Selection C"))
                        )
                    )
                );
        }
Esempio n. 7
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            context.Create(
                AppFeatures.SimpleBooleanFeature,
                defaultValue: "false",
                displayName: L("SimpleBooleanFeature"),
                inputType: new CheckboxInputType()
                );

            context.Create(
                AppFeatures.SimpleIntFeature,
                defaultValue: "0",
                displayName: L("SimpleIntFeature")
                );
        }
Esempio n. 8
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var businessIntelligence = context.Create(
         BlogServiceFeatures.ProjectManagement,
         defaultValue: "false",
         displayName: L("BlogService.Features.BlogManagement"));
 }
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var smartSecurityFeature = context.Create(
                SmartSecurityFeature,
                displayName: new LocalizableString(SmartSecurityFeature, "Charon"),
                defaultValue: "false",
                inputType: new CheckboxInputType()
                );

            var smartPassFeature = context.Create(
                SmartPassFeature,
                displayName: new LocalizableString(SmartPassFeature, "Charon"),
                defaultValue: "false",
                inputType: new CheckboxInputType()
                );
        }
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     //租户上传的所有文件(包含附件之类的)总大小限制,单位Mb
     context.Create(
         BXJGFileConsts.MaxFileUploadSizeFeature,
         BXJGFileConsts.MaxFileUploadSizeFeatureDefault.ToString(),//2gb
         BXJGFileConsts.MaxFileUploadSizeFeatureDisplayNameLocalizableString.BXJGFileL(),
         BXJGFileConsts.MaxFileUploadSizeFeatureDiscriptionLocalizableString.BXJGFileL(),
         FeatureScopes.All,
         new SingleLineStringInputType(new NumericValueValidator(0, (int)BXJGFileConsts.MaxFileUploadSizeFeatureDefault)));
 }
Esempio n. 11
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     context.Create(
         MESFeatureNames.MESManufacture,
         defaultValue: "false",
         displayName: L("发包方"),
         inputType: new CheckboxInputType()
         );
     context.Create(
         MESFeatureNames.MESSupplier,
         defaultValue: "false",
         displayName: L("接包方"),
         inputType: new CheckboxInputType()
         );
     context.Create(
         MESFeatureNames.MESCustomer,
         defaultValue: "false",
         displayName: L("客户"),
         inputType: new CheckboxInputType()
         );
 }
Esempio n. 12
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var sampleBooleanFeature = context.Create(
         FeatureNames.ExcelInputTasksBooleanFeature,
         defaultValue: "false",
         displayName: L("Is allow Excel Input Tasks"),
         inputType: new CheckboxInputType()
     );
     sampleBooleanFeature.CreateChildFeature(
         FeatureNames.ExcelInputTasksNumericFeature,
         defaultValue: "10",
         displayName: L("allow Excel Input Tasks Amount"),
         inputType: new SingleLineStringInputType(new NumericValueValidator(1, 1000000))
     );
     context.Create(
         FeatureNames.CreateUsersNumericFeature,
         defaultValue: "50",
         displayName: L("allow Create Users Amount"),
         inputType: new SingleLineStringInputType(new NumericValueValidator(1, 1000000))
     );
 }
Esempio n. 13
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var contacts = context.Create(Names.Contacts, "false", new LocalizableString(Names.Contacts, SampleApplicationConsts.LocalizationSourceName));

            contacts.CreateChildFeature(Names.MaxContactCount, "100", inputType: new SingleLineStringInputType(new NumericValueValidator(1, 10000)));

            contacts.CreateChildFeature(Names.ChildFeatureToOverride, "ChildFeature");
            contacts.RemoveChildFeature(Names.ChildFeatureToOverride);
            contacts.CreateChildFeature(Names.ChildFeatureToOverride, "ChildFeatureToOverride");

            contacts.CreateChildFeature(Names.ChildFeatureToDelete, "ChildFeatureToDelete");
            contacts.RemoveChildFeature(Names.ChildFeatureToDelete);
        }
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            context.Create(
                AppFeatures.TestFeature,
                defaultValue: "false",
                displayName: L("TestFeature"),
                inputType: new CheckboxInputType()
                );

            context.Create(
                AppFeatures.ThemeFeature,
                defaultValue: "false",
                displayName: L("ChatFeature"),
                inputType: new CheckboxInputType()
                );

            context.Create(
                AppFeatures.WebhookFeature,
                defaultValue: "false",
                displayName: L("WebhookFeature"),
                inputType: new CheckboxInputType()
                );
        }
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var sampleBooleanFeature = context.Create(
                AppFeatures.SampleBooleanFeature,
                defaultValue: "false",
                displayName: L("Sample boolean feature"),
                inputType: new CheckboxInputType()
                );

            sampleBooleanFeature.CreateChildFeature(
                AppFeatures.SampleNumericFeature,
                defaultValue: "10",
                displayName: L("Sample numeric feature"),
                inputType: new SingleLineStringInputType(new NumericValueValidator(1, 1000000))
                );

            //Another sample feature, value is string
            //sampleBooleanFeature.CreateChildFeature(
            //    "SampleStringValue,
            //    defaultValue: "axb",
            //    displayName: new FixedLocalizableString("Sample string feature"),
            //    inputType: new SingleLineStringInputType(new StringValueValidator(2, 10, "^a.*b$"))
            //    );

            context.Create(
                AppFeatures.SampleSelectionFeature,
                defaultValue: "B",
                displayName: L("Sample selection feature"),
                inputType: new ComboboxInputType(
                    new StaticLocalizableComboboxItemSource(
                        new LocalizableComboboxItem("A", L("Selection A")),
                        new LocalizableComboboxItem("B", L("Selection B")),
                        new LocalizableComboboxItem("C", L("Selection C"))
                        )
                    )
                );
        }
Esempio n. 16
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var sampleBooleanFeature = context.Create(
                AppFeatures.SampleBooleanFeature,
                defaultValue: "false",
                displayName: L("Sample boolean feature"),
                inputType: new CheckboxInputType()
                );

            sampleBooleanFeature.CreateChildFeature(
                AppFeatures.SampleNumericFeature,
                defaultValue: "10",
                displayName: L("Sample numeric feature"),
                inputType: new SingleLineStringInputType(new NumericValueValidator(1, 1000000))
                );

            //Another sample feature, value is string
            //sampleBooleanFeature.CreateChildFeature(
            //    "SampleStringValue,
            //    defaultValue: "axb",
            //    displayName: new FixedLocalizableString("Sample string feature"),
            //    inputType: new SingleLineStringInputType(new StringValueValidator(2, 10, "^a.*b$"))
            //    );

            context.Create(
                AppFeatures.SampleSelectionFeature,
                defaultValue: "B",
                displayName: L("Sample selection feature"),
                inputType: new ComboboxInputType(
                    new StaticLocalizableComboboxItemSource(
                        new LocalizableComboboxItem("A", L("Selection A")),
                        new LocalizableComboboxItem("B", L("Selection B")),
                        new LocalizableComboboxItem("C", L("Selection C"))
                        )
                    )
                );
        }
Esempio n. 17
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var 合同管理 = context.Create(
                BlogFeatureNames.合同管理,
                defaultValue: "true",
                displayName: L(BlogFeatureNames.合同管理),
                inputType: new CheckboxInputType()
                );

            合同管理.CreateChildFeature(
                BlogFeatureNames.合同管理_读取,
                defaultValue: "true",
                displayName: L(BlogFeatureNames.合同管理_读取),
                inputType: new CheckboxInputType()
                );

            合同管理.CreateChildFeature(
                BlogFeatureNames.合同管理_创建,
                defaultValue: "false",
                displayName: L(BlogFeatureNames.合同管理_创建),
                inputType: new CheckboxInputType()
                );

            context.Create(
                "Blog模块的Feature",
                defaultValue: "B",
                displayName: L("测试显示名称"),
                inputType: new ComboboxInputType(
                    new StaticLocalizableComboboxItemSource(
                        new LocalizableComboboxItem("A", L("Selection A")),
                        new LocalizableComboboxItem("B", L("Selection B")),
                        new LocalizableComboboxItem("C", L("Selection C"))
                        )
                    )
                );
        }
Esempio n. 18
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     context.Create("MyApplication.PaymentGatewayBooleanFeature", "Payeezy", AppFeatureProvider.L("AvailablePaymentGateways"), null, FeatureScopes.All, new ComboboxInputType(new StaticLocalizableComboboxItemSource(new ILocalizableComboboxItem[] { new LocalizableComboboxItem("Payeezy", AppFeatureProvider.L("Payeezy")) })));
 }
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var contacts = context.Create(Names.Contacts);
 }
Esempio n. 20
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var contacts = context.Create(Names.Contacts, "true");

            context.Create(Names.MaxContactCount, "10");
        }
Esempio n. 21
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var boolFeature = context.Create(MyBoolFeature, "false", inputType: new CheckboxInputType());
     var numericFrature = boolFeature.CreateChildFeature(MyNumericFeature, "42");
 }
Esempio n. 22
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            context.Create(
                AppFeatures.MaxUserCount,
                defaultValue: "0", //0 = unlimited
                displayName: L("MaximumUserCount"),
                description: L("MaximumUserCount_Description"),
                inputType: new SingleLineStringInputType(new NumericValueValidator(0, int.MaxValue))
                )[FeatureMetadata.CustomFeatureKey] = new FeatureMetadata
            {
                ValueTextNormalizer     = value => value == "0" ? L("Unlimited") : new FixedLocalizableString(value),
                IsVisibleOnPricingTable = true
            };

            #region ######## Example Features - You can delete them #########

            context.Create("TestTenantScopeFeature", "false", L("TestTenantScopeFeature"), scope: FeatureScopes.Tenant);
            context.Create("TestEditionScopeFeature", "false", L("TestEditionScopeFeature"), scope: FeatureScopes.Edition);

            context.Create(
                AppFeatures.TestCheckFeature,
                defaultValue: "false",
                displayName: L("TestCheckFeature"),
                inputType: new CheckboxInputType()
                )[FeatureMetadata.CustomFeatureKey] = new FeatureMetadata
            {
                IsVisibleOnPricingTable = true,
                TextHtmlColor           = value => value == "true" ? "#5cb85c" : "#d9534f"
            };

            context.Create(
                AppFeatures.TestCheckFeature2,
                defaultValue: "true",
                displayName: L("TestCheckFeature2"),
                inputType: new CheckboxInputType()
                )[FeatureMetadata.CustomFeatureKey] = new FeatureMetadata
            {
                IsVisibleOnPricingTable = true,
                TextHtmlColor           = value => value == "true" ? "#5cb85c" : "#d9534f"
            };

            #endregion

            var chatFeature = context.Create(
                AppFeatures.ChatFeature,
                defaultValue: "false",
                displayName: L("ChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToTenantChatFeature,
                defaultValue: "false",
                displayName: L("TenantToTenantChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToHostChatFeature,
                defaultValue: "false",
                displayName: L("TenantToHostChatFeature"),
                inputType: new CheckboxInputType()
                );
        }
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var contacts = context.Create(Names.Contacts, "false");

            contacts.CreateChildFeature(Names.MaxContactCount, "100", inputType: new SingleLineStringInputType(new NumericValueValidator(1, 10000)));
        }
Esempio n. 24
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var boolFeature    = context.Create(MyBoolFeature, "false", inputType: new CheckboxInputType());
     var numericFrature = boolFeature.CreateChildFeature(MyNumericFeature, "42", inputType: new SingleLineStringInputType(new NumericValueValidator(1, 99)));
 }
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var boolFeature    = context.Create(MyBoolFeature, "false", inputType: new CheckboxInputType());
     var numericFrature = boolFeature.CreateChildFeature(MyNumericFeature, "42");
 }
Esempio n. 26
0
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            var chatFeature = context.Create(
                AppFeatures.ChatFeature,
                defaultValue: "false",
                displayName: L("ChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToTenantChatFeature,
                defaultValue: "false",
                displayName: L("TenantToTenantChatFeature"),
                inputType: new CheckboxInputType()
                );

            chatFeature.CreateChildFeature(
                AppFeatures.TenantToHostChatFeature,
                defaultValue: "false",
                displayName: L("TenantToHostChatFeature"),
                inputType: new CheckboxInputType()
                );

            var clientType = context.Create(
                AppFeatures.TenantType,
                defaultValue: "",
                displayName: L("TenantType"),
                inputType: null
                );

            clientType.CreateChildFeature(
                AppFeatures.TenantTypeCommercial,
                defaultValue: "false",
                displayName: L("Commercial"),
                inputType: new CheckboxInputType()
                );

            clientType.CreateChildFeature(
                AppFeatures.TenantTypeFeatures,
                defaultValue: "false",
                displayName: L("Feature"),
                inputType: new CheckboxInputType()
                );

            clientType.CreateChildFeature(
                AppFeatures.TenantTypeTelevisionEpisodic,
                defaultValue: "false",
                displayName: L("Episodic"),
                inputType: new CheckboxInputType()
                );
            clientType.CreateChildFeature(
                AppFeatures.TenantTypeTelevisionNonEpisodic,
                defaultValue: "false",
                displayName: L("NonEpisodic"),
                inputType: new CheckboxInputType()
                );

            clientType.CreateChildFeature(
                AppFeatures.TenantTypeMusicTour,
                defaultValue: "false",
                displayName: L("MusicTour"),
                inputType: new CheckboxInputType()
                );

            clientType.CreateChildFeature(
                AppFeatures.TenantTypeFestivalLiveEvent,
                defaultValue: "false",
                displayName: L("FestivalLiveEvent"),
                inputType: new CheckboxInputType()
                );

            clientType.CreateChildFeature(
                AppFeatures.TenantTypeVenues,
                defaultValue: "false",
                displayName: L("Venue"),
                inputType: new CheckboxInputType()
                );

            // You can set maximum project count here
            context.Create(
                AppFeatures.ProjectLimitation,
                defaultValue: "0",
                displayName: L("MaxProjectCount"),
                inputType: new SingleLineStringInputType()
                );
        }
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var contacts = context.Create(Names.Contacts, "false");
     contacts.CreateChildFeature(Names.MaxContactCount, "100", inputType: new SingleLineStringInputType(new NumericValueValidator(1, 10000)));
 }