Esempio n. 1
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 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 contacts = context.Create(Names.Contacts);
 }
 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, "false");
     contacts.CreateChildFeature(Names.MaxContactCount, "100", inputType: new SingleLineStringInputType(new NumericValueValidator(1, 10000)));
 }
 /// <summary>
 /// Used to set <see cref="Feature"/>s.
 /// </summary>
 /// <param name="context">Feature definition context</param>
 public abstract void SetFeatures(IFeatureDefinitionContext context);