Beispiel #1
0
        public void ReducePopulation(object source, EventArgs eventArgs)
        {
            --ActualPopulation;
            PopulationEventArgs args = new PopulationEventArgs();

            args.ActualPopulation = this.ActualPopulation;
            OnPopulationReduced(args);
        }
Beispiel #2
0
        protected virtual void OnPopulationReduced(PopulationEventArgs e)
        {
            EventHandler <PopulationEventArgs> handler = PopulationReduced;

            if (handler != null)
            {
                handler(this, e);
            }
        }