public override void Refresh() { if (Value == null || Value.Value == null) { Value = new VariableValue(); Value.Value = ""; } if (Value.Value is String || Value.Value is Int32 || Value.Value is Double) { tpPrimitive.Select(); if (Value.Value is String) { rbString.Select(); tbString.Text = (string)Value.Value; } if (Value.Value is Int32) { rbInteger.Select(); nudInteger.Value = (Int32)Value.Value; } if (Value.Value is Double) { rbDouble.Select(); nudDouble.Value = (Decimal)((Double)Value.Value); } } base.Refresh(); }
public Variable() { Name = ""; Value = new VariableValue(); }