private static void CreateEditFields(UPCRMFieldInfo fieldInfo, bool rangFilter, string type, out UPMEditField editField, out UPMEditField secondEditField)
        {
            editField       = null;
            secondEditField = null;
            switch (type)
            {
            case "F" when fieldInfo.PercentField:
                editField = new UPMPercentEditField(StringIdentifier.IdentifierWithStringId("percentParam"));
                if (rangFilter)
                {
                    secondEditField = new UPMPercentEditField(StringIdentifier.IdentifierWithStringId("percentParam2"));
                }

                break;

            case "F":
                editField = new UPMFloatEditField(StringIdentifier.IdentifierWithStringId("floatParam"));
                if (rangFilter)
                {
                    secondEditField = new UPMFloatEditField(StringIdentifier.IdentifierWithStringId("floatParam2"));
                }

                break;

            case "C":
                editField = new UPMStringEditField(StringIdentifier.IdentifierWithStringId("stringParam"));
                if (rangFilter)
                {
                    secondEditField = new UPMStringEditField(StringIdentifier.IdentifierWithStringId("stringParam2"));
                }

                break;

            case "B":
                editField = new UPMBooleanEditField(StringIdentifier.IdentifierWithStringId("booleanParam"));
                break;

            default:
                editField = new UPMIntegerEditField(StringIdentifier.IdentifierWithStringId("intParam"));
                if (rangFilter)
                {
                    secondEditField = new UPMIntegerEditField(StringIdentifier.IdentifierWithStringId("intParam2"));
                }

                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the edit field.
        /// </summary>
        /// <returns>
        /// The <see cref="UPMEditField"/>.
        /// </returns>
        public override UPMEditField CreateEditField()
        {
            var booleanField = new UPMBooleanEditField(this.FieldIdentifier);

            return(booleanField);
        }