Esempio n. 1
0
        protected List <(string Species, ushort Amount)> OnSpeciesAndAmount(ControlEvents.SpeciesAndAmountEventArgs e)
        {
            speciesAndAmountEventHandler eventHandler = RaiseSpeciesAndAmountEvent;

            if (eventHandler != null)
            {
                eventHandler.Invoke(this, e);
                return(e.GetList);
            }
            return(null);
        }
 /// <summary>
 /// Adds it species to a list in <paramref name="e"/>.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">Contains an Add(string:Species) method.</param>
 protected virtual void SpeciesAmountEventHandler(object sender, ControlEvents.SpeciesAndAmountEventArgs e)
 { //delegate. Transmit species back.
     e.Add(Species);
 }