public void CheckSoil(object sender, EventArgs e) { try { Soil currentSoil = Apsim.Get(this.explorerPresenter.ApsimXFile, this.explorerPresenter.CurrentNodePath) as Soil; if (currentSoil != null) { SoilChecker.CheckWithStandardisation(currentSoil); explorerPresenter.MainPresenter.ShowMessage("Soil water parameters are valid.", Simulation.MessageType.Information); } } catch (Exception err) { explorerPresenter.MainPresenter.ShowError(err); } }
public void CheckSoil(object sender, EventArgs e) { Soil currentSoil = Apsim.Get(this.explorerPresenter.ApsimXFile, this.explorerPresenter.CurrentNodePath) as Soil; if (currentSoil != null) { string errorMessages = SoilChecker.Check(currentSoil); if (!string.IsNullOrEmpty(errorMessages)) { explorerPresenter.MainPresenter.ShowError(errorMessages); } else { explorerPresenter.MainPresenter.ShowMessage("Soil water parameters are valid.", Simulation.MessageType.Information); } } }
private void OnDoInitialSummary(object sender, EventArgs e) { if (CaptureSummaryText) { CreateInitialConditionsTable(); } //Do checks on the soil to make sure there are no problems with the initial parameterisation. IEnumerable <Soil> soils = simulation.FindAllDescendants <Soil>(); foreach (Soil soil in soils) { SoilChecker.Check(soil); } }
public void CheckSoil(object sender, EventArgs e) { try { Soil currentSoil = this.explorerPresenter.ApsimXFile.FindByPath(this.explorerPresenter.CurrentNodePath)?.Value as Soil; if (currentSoil != null) { ISummary summary = currentSoil.FindInScope <ISummary>(this.explorerPresenter.CurrentNodePath); SoilChecker.CheckWithStandardisation(currentSoil, summary); explorerPresenter.MainPresenter.ShowMessage("Soil water parameters are valid.", Simulation.MessageType.Information); } } catch (Exception err) { explorerPresenter.MainPresenter.ShowError(err); } }
private void OnDoInitialSummary(object sender, EventArgs e) { if (CaptureSummaryText) { CreateInitialConditionsTable(); } //Do checks on the soil to make sure there are no problems with the initial parameterisation. List <IModel> soils = Apsim.ChildrenRecursively(simulation, typeof(Soil)); foreach (Soil soil in soils) { SoilChecker.Check(soil); } }
private void OnDoInitialSummary(object sender, EventArgs e) { if (CaptureSummaryText) { CreateInitialConditionsTable(); } //Do checks on the soil to make sure there are no problems with the initial parameterisation. var soils = Apsim.ChildrenRecursively(simulation, typeof(Soils.Soil)); foreach (Soils.Soil soil in soils) { string errorMessages = SoilChecker.Check(soil); if (!string.IsNullOrEmpty(errorMessages)) { WriteWarning(soil, errorMessages); } } }
private void OnDoInitialSummary(object sender, EventArgs e) { SoilChecker.Check(this); }