internal void UpdateValueFromText() { TValueType value = this.StringToValue(this.text); TextInputBaseField <TValueType> textInputBaseField = (TextInputBaseField <TValueType>)base.parent; textInputBaseField.value = value; }
public Node(string key, TValueType value, Node parent) { Key = key; Value = value; Parent = parent; Left = null; Right = null; }
/// <summary> ///Ein Test für "CastSafe" ///</summary> public void CastSafeTestHelper <TValueType>() { var param0 = new PrivateObject(new SimpleTweenerImpl <TValueType>()); var target = new SimpleTweener_Accessor <TValueType>(param0); object val = default(TValueType); TValueType expected = default(TValueType); TValueType actual; actual = target.CastSafe(val); Assert.AreEqual(expected, actual); }
private void ParseStringValue() { if (double.TryParse(strValue, out double numberVal)) { valueType = TValueType.Number; value = numberVal; } else { valueType = TValueType.String; if (strValue.Length >= 2 && strValue[0] == '\"' && strValue[strValue.Length - 1] == '\"') { value = strValue.Substring(1, strValue.Length - 2); } else { value = strValue; } } }
/// <summary> /// Convert the value to string for visual representation. /// </summary> /// <param name="value">Value to convert.</param> /// <returns>String representation.</returns> protected abstract string ValueToString(TValueType value);
/// <summary> /// Called when the user is dragging the label to update the value contained in the field. /// </summary> /// <param name="delta">Delta on the move.</param> /// <param name="speed">Speed of the move.</param> /// <param name="startValue">Starting value.</param> public abstract void ApplyInputDeviceDelta(Vector3 delta, DeltaSpeed speed, TValueType startValue);
/// <summary>All available tags.</summary> public static bool TryGetTag(string TagId, out TValueType ResultValue) { return(FTagTable.TryGetValue(TagId, out ResultValue)); }
public CaseSpecificationItem(ISpecification <TCandidate> specification, TValueType value) { Specification = specification; Value = value; }