Closed hut104 closed 1 year ago
Move code to other classes
/// <summary>Called when [phase changed].</summary> /// <param name="phaseChange">The phase change.</param> /// <param name="sender">Sender plant.</param> [EventSubscribe("PhaseChanged")] private void OnPhaseChanged(object sender, PhaseChangedType phaseChange) { if (sender == this && Canopy != null && AboveGround != null) { string message = Phenology.CurrentPhase.Start + "\r\n"; if (Canopy != null) { message += " LAI = " + Canopy.LAI.ToString("f2") + " (m^2/m^2)" + "\r\n"; message += " Above Ground Biomass = " + AboveGround.Wt.ToString("f2") + " (g/m^2)" + "\r\n"; } Summary.WriteMessage(this, message); if (Phenology.CurrentPhase.Start == "Flowering" && Flowering != null) Flowering.Invoke(this, null); } }
Options that I see for this one:
Preferences?
Move code to other classes