示例#1
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"))
                        )
                    )
                );
        }
示例#2
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()
                );
        }
示例#3
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()
                );
        }
示例#4
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());
        }
        public override void Define(IFeatureDefinitionContext context)
        {
            var featureGroup = context.AddGroup(
                name: AbpFileManagementFeatureNames.GroupName,
                displayName: L("Features:FileManagement"));

            var fileSystemFeature = featureGroup.AddFeature(
                name: AbpFileManagementFeatureNames.FileSystem.Default,
                displayName: L("Features:DisplayName:FileSystem"),
                description: L("Features:Description:FileSystem"));

            fileSystemFeature.CreateChild(
                name: AbpFileManagementFeatureNames.FileSystem.DownloadFile,
                defaultValue: false.ToString(),
                displayName: L("Features:DisplayName:DownloadFile"),
                description: L("Features:Description:DownloadFile"),
                valueType: new ToggleStringValueType(new BooleanValueValidator()));

            fileSystemFeature.CreateChild(
                name: AbpFileManagementFeatureNames.FileSystem.UploadFile,
                defaultValue: true.ToString(),
                displayName: L("Features:DisplayName:UploadFile"),
                description: L("Features:Description:UploadFile"),
                valueType: new ToggleStringValueType(new BooleanValueValidator()));

            // TODO: 此功能需要控制器协同,暂时不实现
            fileSystemFeature.CreateChild(
                name: AbpFileManagementFeatureNames.FileSystem.MaxUploadFileCount,
                defaultValue: 1.ToString(),
                displayName: L("Features:DisplayName:MaxUploadFileCount"),
                description: L("Features:Description:MaxUploadFileCount"),
                valueType: new ToggleStringValueType(new NumericValueValidator(1, 10)));
        }
        public override void Define(IFeatureDefinitionContext context)
        {
            var group = context.AddGroup(IdentityFeature.GroupName, L("Feature:IdentityGroup"));

            group.AddFeature(IdentityFeature.TwoFactor,
                             IdentityTwoFactorBehaviour.Optional.ToString(),
                             L("Feature:TwoFactor"),
                             L("Feature:TwoFactorDescription"),
                             new SelectionStringValueType
            {
                ItemSource = new StaticSelectionStringValueItemSource(
                    new LocalizableSelectionStringValueItem
                {
                    Value       = IdentityTwoFactorBehaviour.Optional.ToString(),
                    DisplayText = GetTwoFactorBehaviourLocalizableStringInfo("Feature:TwoFactor.Optional")
                },
                    new LocalizableSelectionStringValueItem
                {
                    Value       = IdentityTwoFactorBehaviour.Disabled.ToString(),
                    DisplayText = GetTwoFactorBehaviourLocalizableStringInfo("Feature:TwoFactor.Disabled")
                },
                    new LocalizableSelectionStringValueItem
                {
                    Value       = IdentityTwoFactorBehaviour.Forced.ToString(),
                    DisplayText = GetTwoFactorBehaviourLocalizableStringInfo("Feature:TwoFactor.Forced")
                }
                    )
            });
        }
示例#7
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var businessIntelligence = context.Create(
         BlogServiceFeatures.ProjectManagement,
         defaultValue: "false",
         displayName: L("BlogService.Features.BlogManagement"));
 }
        public override void Define(IFeatureDefinitionContext context)
        {
            var auditingGroup = context.AddGroup(
                name: AuditingFeatureNames.GroupName,
                displayName: L("Features:Auditing"));

            var loggingFeature = auditingGroup.AddFeature(
                name: AuditingFeatureNames.Logging.Default,
                displayName: L("Features:Auditing"),
                description: L("Features:Auditing")
                );

            loggingFeature.CreateChild(
                name: AuditingFeatureNames.Logging.AuditLog,
                defaultValue: true.ToString(),
                displayName: L("Features:DisplayName:AuditLog"),
                description: L("Features:Description:AuditLog"),
                valueType: new ToggleStringValueType(new BooleanValueValidator())
                );
            loggingFeature.CreateChild(
                name: AuditingFeatureNames.Logging.SecurityLog,
                defaultValue: true.ToString(),
                displayName: L("Features:DisplayName:SecurityLog"),
                description: L("Features:Description:SecurityLog"),
                valueType: new ToggleStringValueType(new BooleanValueValidator())
                );
        }
示例#9
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()
                );
        }
    public override void Define(IFeatureDefinitionContext context)
    {
        var group = context.AddGroup("Test Group");

        group.AddFeature("BooleanTestFeature1");
        group.AddFeature("BooleanTestFeature2");
        group.AddFeature("IntegerTestFeature1", defaultValue: "1");
    }
        public override void Define(IFeatureDefinitionContext context)
        {
            var featureGroup = context.AddGroup(
                name: AbpOssManagementFeatureNames.GroupName,
                displayName: L("Features:OssManagement"));

            var ossFeature = featureGroup.AddFeature(
                name: AbpOssManagementFeatureNames.OssObject.Default,
                displayName: L("Features:DisplayName:OssObject"),
                description: L("Features:Description:OssObject"));

            ossFeature.CreateChild(
                name: AbpOssManagementFeatureNames.OssObject.DownloadFile,
                defaultValue: false.ToString(),
                displayName: L("Features:DisplayName:DownloadFile"),
                description: L("Features:Description:DownloadFile"),
                valueType: new ToggleStringValueType(new BooleanValueValidator()));
            ossFeature.CreateChild(
                name: AbpOssManagementFeatureNames.OssObject.DownloadLimit,
                defaultValue: "1000",
                displayName: L("Features:DisplayName:DownloadLimit"),
                description: L("Features:Description:DownloadLimit"),
                valueType: new FreeTextStringValueType(new NumericValueValidator(0, 100_0000))); // 上限100万次调用
            ossFeature.CreateChild(
                name: AbpOssManagementFeatureNames.OssObject.DownloadInterval,
                defaultValue: "1",
                displayName: L("Features:DisplayName:DownloadInterval"),
                description: L("Features:Description:DownloadInterval"),
                valueType: new FreeTextStringValueType(new NumericValueValidator(1, 12))); // 上限12月

            ossFeature.CreateChild(
                name: AbpOssManagementFeatureNames.OssObject.UploadFile,
                defaultValue: true.ToString(),
                displayName: L("Features:DisplayName:UploadFile"),
                description: L("Features:Description:UploadFile"),
                valueType: new ToggleStringValueType(new BooleanValueValidator()));
            ossFeature.CreateChild(
                name: AbpOssManagementFeatureNames.OssObject.UploadLimit,
                defaultValue: "1000",
                displayName: L("Features:DisplayName:UploadLimit"),
                description: L("Features:Description:UploadLimit"),
                valueType: new FreeTextStringValueType(new NumericValueValidator(0, 100_0000))); // 上限100万次调用
            ossFeature.CreateChild(
                name: AbpOssManagementFeatureNames.OssObject.UploadInterval,
                defaultValue: "1",
                displayName: L("Features:DisplayName:UploadInterval"),
                description: L("Features:Description:UploadInterval"),
                valueType: new FreeTextStringValueType(new NumericValueValidator(1, 12))); // 上限12月

            // TODO: 此功能需要控制器协同,暂时不实现
            //fileSystemFeature.CreateChild(
            //    name: AbpOssManagementFeatureNames.OssObject.MaxUploadFileCount,
            //    defaultValue: 1.ToString(),
            //    displayName: L("Features:DisplayName:MaxUploadFileCount"),
            //    description: L("Features:Description:MaxUploadFileCount"),
            //    valueType: new FreeTextStringValueType(new NumericValueValidator(1, 10)));
        }
示例#12
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"))
                        )
                    )
                );
        }
示例#13
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     context.Create(
         AppFeatures.SimpleBooleanFeature,
         defaultValue: "false",
         displayName: L("SimpleBooleanFeature"),
         inputType: new CheckboxInputType()
         );
 }
        public override void Define(IFeatureDefinitionContext context)
        {
            var group = context.AddGroup(ExaminationAbpFeatures.GroupName);

            group.AddFeature(ExaminationAbpFeatures.SocialLogins, "true", L("Feature:SocialLogins")
                             , valueType: new ToggleStringValueType());
            group.AddFeature(ExaminationAbpFeatures.UserCount, "10", L("Feature:UserCount")
                             , valueType: new FreeTextStringValueType(new NumericValueValidator(1, 1000)));
        }
示例#15
0
        public override void Define(IFeatureDefinitionContext context)
        {
            var group = context.AddGroup(SettingManagementFeatures.GroupName,
                                         L("Feature:SettingManagementGroup"));

            group.AddFeature(SettingManagementFeatures.Enable,
                             "true",
                             L("Feature:SettingManagementEnable"),
                             L("Feature:SettingManagementEnableDescription"),
                             new ToggleStringValueType());
        }
 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)));
 }
示例#17
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);
        }
示例#18
0
        public override void Define(IFeatureDefinitionContext context)
        {
            var featureGroup = context.AddGroup(TestFeatureNames.GroupName);

            featureGroup.AddFeature(
                name: TestFeatureNames.TestLimitFeature,
                defaultValue: 100.ToString(),
                valueType: new ToggleStringValueType(new NumericValueValidator(1, 1000)));
            featureGroup.AddFeature(
                name: TestFeatureNames.TestIntervalFeature,
                defaultValue: 1.ToString(),
                valueType: new ToggleStringValueType(new NumericValueValidator(1, 1000)));
        }
        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()
                );
        }
示例#20
0
        //public override void Define(IFeatureDefinitionContext context)
        //{
        //    var myGroup = context.AddGroup("MyApp");

        //    myGroup.AddFeature("MyApp.PdfReporting", defaultValue: "true", isVisibleToClients: false);
        //    myGroup.AddFeature("MyApp.MaxProductCount", defaultValue: "10");
        //}

        public override void Define(IFeatureDefinitionContext context)
        {
            var myGroup = context.AddGroup("MyApp");

            myGroup.AddFeature(
                "MyApp.PdfReporting",
                defaultValue: "false",
                displayName: LocalizableString.Create <TestResource>("PdfReporting"),
                valueType: new ToggleStringValueType()
                );

            myGroup.AddFeature(
                "MyApp.MaxProductCount",
                defaultValue: "10",
                displayName: LocalizableString.Create <TestResource>("MaxProductCount"),
                valueType: new FreeTextStringValueType(new NumericValueValidator(0, 100))
                );
        }
示例#21
0
    public override void Define(IFeatureDefinitionContext context)
    {
        var group = context.AddGroup(SettingManagementFeatures.GroupName,
                                     L("Feature:SettingManagementGroup"));

        var settingEnableFeature = group.AddFeature(
            SettingManagementFeatures.Enable,
            "true",
            L("Feature:SettingManagementEnable"),
            L("Feature:SettingManagementEnableDescription"),
            new ToggleStringValueType());

        settingEnableFeature.CreateChild(
            SettingManagementFeatures.AllowTenantsToChangeEmailSettings,
            "false",
            L("Feature:AllowTenantsToChangeEmailSettings"),
            null,
            new ToggleStringValueType(),
            isAvailableToHost: false);
    }
示例#22
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()
         );
 }
示例#23
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))
     );
 }
        public override void Define(IFeatureDefinitionContext context)
        {
            var wechatGroup = context.GetGroupOrNull(WeChatFeatures.GroupName);

            if (wechatGroup != null)
            {
                var weappFeature = wechatGroup
                                   .AddFeature(
                    WeChatWeAppFeatures.GroupName,
                    true.ToString(),
                    L("Features:WeApp"),
                    L("Features:WeAppDescription"),
                    new ToggleStringValueType(new BooleanValueValidator()));


                var weappNofitication = weappFeature
                                        .CreateChild(
                    WeChatWeAppFeatures.Notifications.Default,
                    true.ToString(),
                    L("Features:Notifications"),
                    L("Features:Notifications"),
                    new ToggleStringValueType(new BooleanValueValidator()));
                weappNofitication
                .CreateChild(
                    WeChatWeAppFeatures.Notifications.PublishLimit,
                    WeChatWeAppFeatures.Notifications.DefaultPublishLimit.ToString(),
                    L("Features:PublishLimit"),
                    L("Features:PublishLimitDescription"),
                    new ToggleStringValueType(new NumericValueValidator(0, 100000)));
                weappNofitication
                .CreateChild(
                    WeChatWeAppFeatures.Notifications.PublishLimitInterval,
                    WeChatWeAppFeatures.Notifications.DefaultPublishLimitInterval.ToString(),
                    L("Features:PublishLimitInterval"),
                    L("Features:PublishLimitIntervalDescription"),
                    new ToggleStringValueType(new NumericValueValidator(1, 12)));
            }
        }
        public override void Define(IFeatureDefinitionContext context)
        {
            var group = context.AddGroup("TestGroup");

            group.AddFeature(
                SocialLogins,
                valueType: new ToggleStringValueType()
                );

            group.AddFeature(
                EmailSupport,
                valueType: new ToggleStringValueType()
                );

            group.AddFeature(
                DailyAnalysis,
                defaultValue: false.ToString().ToLowerInvariant(), //Optional, it is already false by default
                valueType: new ToggleStringValueType()
                );

            group.AddFeature(
                UserCount,
                defaultValue: "1",
                valueType: new FreeTextStringValueType(new NumericValueValidator(1, 1000))
                );

            group.AddFeature(
                ProjectCount,
                defaultValue: "1",
                valueType: new FreeTextStringValueType(new NumericValueValidator(1, 10))
                );

            group.AddFeature(
                BackupCount,
                defaultValue: "0",
                valueType: new FreeTextStringValueType(new NumericValueValidator(0, 10))
                );
        }
        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()
                );
        }
示例#27
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"))
                        )
                    )
                );
        }
        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"))
                        )
                    )
                );
        }
示例#29
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"))
                        )
                    )
                );
        }
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var boolFeature    = context.Create(MyBoolFeature, "false", inputType: new CheckboxInputType());
     var numericFrature = boolFeature.CreateChildFeature(MyNumericFeature, "42");
 }
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var contacts = context.Create(Names.Contacts);
 }
示例#32
0
 public override void SetFeatures(IFeatureDefinitionContext context)
 {
     var boolFeature = context.Create(MyBoolFeature, "false", inputType: new CheckboxInputType());
     var numericFrature = boolFeature.CreateChildFeature(MyNumericFeature, "42");
 }
示例#33
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()
                );
        }
示例#34
0
 /// <summary>
 /// Used to set <see cref="Feature"/>s.
 /// </summary>
 /// <param name="context">Feature definition context</param>
 public abstract void SetFeatures(IFeatureDefinitionContext context);
 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)));
 }
示例#36
0
 /// <summary>
 /// Used to set <see cref="Feature"/>s.
 /// </summary>
 /// <param name="context">Feature definition context</param>
 public abstract void SetFeatures(IFeatureDefinitionContext context);