Пример #1
0
        public Value ConvertToValue()
        {
            ValueInteger ret = new ValueInteger();

            ret.NNumber = SelectedIndex;
            return(ret);
        }
Пример #2
0
        public Value ConvertToValue()
        {
            ValueInteger i = new ValueInteger();

            i.NNumber = NumericValue;
            return(i);
        }
Пример #3
0
        public string ValueToString(string DateTimeFormat = null)
        {
            if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Bool)
            {
                return(ValueBool.ToString());
            }
            else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.DateTime)
            {
                return(((DateTime)ValueDateTime).ToString(DateTimeFormat));
            }
            else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Guid)
            {
                return(ValueGuid.ToString());
            }
            else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Integer)
            {
                return(ValueInteger.ToString());
            }
            else if (ActionParameter.ParameterType.UnderlyingTypeEnum == PARAMETER_TYPE_UNDERLYING.Decimal)
            {
                return(ValueDecimal.ToString());
            }

            return(ValueString);
        }
Пример #4
0
        override public String ShowText(Value val)
        {
            ValueInteger     i  = val as ValueInteger;
            InputControlEnum en = VControl as InputControlEnum;

            return(en.EnumContainer.Values[i.NNumber]);
        }
Пример #5
0
 public RecordDescriptionInt()
 {
     VControl    = new InputControlInt();
     MinValue    = -1;
     MaxValue    = 10;
     PresetValue = new ValueInteger();
 }
Пример #6
0
 public override void Load(BinaryReader reader)
 {
     PresetValue = new ValueInteger();
     base.Load(reader);
     MinValue = reader.ReadInt32();
     MaxValue = reader.ReadInt32();
     PresetValue.Load(reader);
     VControl.SetValue(PresetValue);
 }
Пример #7
0
        /** basic load */
        public override void Load(BinaryReader reader)
        {
            base.Load(reader);
            InputControlEnum c     = new InputControlEnum();
            String           eName = reader.ReadString();

            c.EnumContainer = EnumBank.Bank.Find(eName);
            VControl        = c;
            PresetValue     = new ValueInteger();
            PresetValue.Load(reader);
            VControl.SetValue(PresetValue);
        }
    static void Main(string[] args)
    {
        var valueInt = new ValueInteger
        {
            ValueName = "mycounter",
            Value     = 7,
            TimeStamp = 1010101010
        };
        var settings = new JsonSerializerSettings {
            Converters = new JsonConverter[] { new DynamicNameConverter() }
        };
        var result = JsonConvert.SerializeObject(valueInt, settings);

        Console.WriteLine(result);
        Console.Read();
    }
Пример #9
0
 override public bool Accept(ValueInteger v)
 {
     return(Reference.ToString().Contains(v.ToString()));
 }
Пример #10
0
        override public bool Accept(ValueInteger v)
        {
            ValueInteger r = Reference as ValueInteger;

            return(r.NNumber < v.NNumber);
        }
Пример #11
0
 virtual public bool Accept(ValueInteger v)
 {
     return(false);
 }
Пример #12
0
        public void SetValue(Value value)
        {
            ValueInteger i = value as ValueInteger;

            SelectedIndex = i.NNumber;
        }
Пример #13
0
        public void SetValue(Value value)
        {
            ValueInteger v = value as ValueInteger;

            NumericValue = v.NNumber;
        }
Пример #14
0
 public RecordDescriptionEnum()
 {
     // -1 - not selected
     PresetValue = new ValueInteger();
     VControl    = new InputControlEnum();
 }