public Value ConvertToValue() { ValueInteger ret = new ValueInteger(); ret.NNumber = SelectedIndex; return(ret); }
public Value ConvertToValue() { ValueInteger i = new ValueInteger(); i.NNumber = NumericValue; return(i); }
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); }
override public String ShowText(Value val) { ValueInteger i = val as ValueInteger; InputControlEnum en = VControl as InputControlEnum; return(en.EnumContainer.Values[i.NNumber]); }
public RecordDescriptionInt() { VControl = new InputControlInt(); MinValue = -1; MaxValue = 10; PresetValue = new ValueInteger(); }
public override void Load(BinaryReader reader) { PresetValue = new ValueInteger(); base.Load(reader); MinValue = reader.ReadInt32(); MaxValue = reader.ReadInt32(); PresetValue.Load(reader); VControl.SetValue(PresetValue); }
/** 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(); }
override public bool Accept(ValueInteger v) { return(Reference.ToString().Contains(v.ToString())); }
override public bool Accept(ValueInteger v) { ValueInteger r = Reference as ValueInteger; return(r.NNumber < v.NNumber); }
virtual public bool Accept(ValueInteger v) { return(false); }
public void SetValue(Value value) { ValueInteger i = value as ValueInteger; SelectedIndex = i.NNumber; }
public void SetValue(Value value) { ValueInteger v = value as ValueInteger; NumericValue = v.NNumber; }
public RecordDescriptionEnum() { // -1 - not selected PresetValue = new ValueInteger(); VControl = new InputControlEnum(); }