예제 #1
0
 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);
     }
 }
예제 #2
0
 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);
     }
 }