コード例 #1
0
ファイル: ContextMenu.cs プロジェクト: chuankang/ApsimX
 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)
        {
            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);
                }
            }
        }
コード例 #3
0
ファイル: Summary.cs プロジェクト: eleanory808/ApsimX
        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);
            }
        }
コード例 #4
0
ファイル: ContextMenu.cs プロジェクト: lie112/ApsimX
 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);
     }
 }
コード例 #5
0
ファイル: Summary.cs プロジェクト: BrianCollinss/ApsimNG
        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);
            }
        }
コード例 #6
0
        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);
                }
            }
        }
コード例 #7
0
ファイル: Soil.cs プロジェクト: MikeStower/ApsimX
 private void OnDoInitialSummary(object sender, EventArgs e)
 {
     SoilChecker.Check(this);
 }