private bool ValidValue() { if (dataType == DataType.FA_Boolean) { return(true); } string value = tbValue.Text; return(VarInfo.ValidValue(value, dataType)); }
//------------------------------------------------------------------------------------------------------------------------------------------------------ // assign variables ------------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------------------------------ public void AssignVariable(string varName, DataType dataType, string value, out string ErrorReport) { if (!Exist(varName)) { ErrorReport = "Error: Not declared variable name: " + varName; return; } VarInfo temp = UserVariables[varName]; if (!VarInfo.ValidValue(value, temp.type)) { ErrorReport = "Error: Wrong expected data type: " + varName; return; } ErrorReport = ""; temp.value = value; temp.isNull = false; UserVariables[varName] = temp; }