예제 #1
0
 public override void UpdateData(ScrollViewCell cell)
 {
     _isNumeric = variableInfo.fieldInfo.FieldType.IsNumericType();
     _inputCell = (BaseInputCell)cell;
     _inputCell.OnValueChanged = OnValueChanged;
     _inputCell.SetInput(GetFieldValueAsString());
     _inputCell.SetIsNumeric(_isNumeric);
 }
예제 #2
0
 void OnValueChanged(BaseInputCell cell, string value)
 {
     if (string.IsNullOrEmpty(value) && _isNumeric)
     {
         _inputCell.SetInput(GetFieldValueAsString());
         return;
     }
     else
     {
         try
         {
             variableInfo.fieldInfo.SetValue(command, Convert.ChangeType(value, variableInfo.fieldInfo.FieldType));
             base.OnValueChanged();
         }
         catch
         {
             _inputCell.SetInput(GetFieldValueAsString());
         }
     }
 }