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;
 }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
 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;
         }
     }
 }
Ejemplo n.º 5
0
 /// <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);
Ejemplo n.º 6
0
 /// <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);
Ejemplo n.º 7
0
 /// <summary>All available tags.</summary>
 public static bool TryGetTag(string TagId, out TValueType ResultValue)
 {
     return(FTagTable.TryGetValue(TagId, out ResultValue));
 }
Ejemplo n.º 8
0
 public CaseSpecificationItem(ISpecification <TCandidate> specification, TValueType value)
 {
     Specification = specification;
     Value         = value;
 }