public string LoadTillageParameter(Guid datasetid, string dataname, string paramName, string value) { try { if (Tillage == null || Tillage.Count == 0) { Tillage = new List <HowLeakyInputs_Tillage>(); } var tillage = Tillage.FirstOrDefault(x => x.Id == datasetid); if (tillage == null) { tillage = new HowLeakyInputs_Tillage(datasetid, dataname); Tillage.Add(tillage); } if (TryLoadParameter(tillage, paramName, value) == false) { return(paramName); } } catch (Exception ex) { throw ErrorLogger.CreateException(ex); } return(null); }
/// <summary> /// /// </summary> /// <param name="value"></param> public void AddSomeTillageObjects(int value) { for (int i = Tillage.Count; i < value; ++i) { TillageObjectController pest = new TillageObjectController(sim); Tillage.Add(pest); } }