Example #1
0
File: Manga.cs Project: pawett/.NET
        public void AƱadirProtesta(Protesta protesta)
        {
            protestas.Add(protesta);
            //protesta.PropuestaResuelta += new Protesta.ProtestaResueltaHandler(ModificarResultadoPorProtesta);
            protesta.PropuestaResuelta += ModificarResultadoPorProtesta; //simplified call
            protesta.PropuestaResuelta += delegate(Protesta p, EventArgs arg)
            {
                ModificarResultadoPorProtesta(p, arg);
            };

            //EventArgs args = new EventArgs();
            //protesta.PropuestaResuelta += (protesta,args) =>
            //{
            //    //do your things here
            //}

            //if (protesta.ResueltaFavorablemente)
            //{
            //    ModificarResultadoPorProtesta(protesta, new EventArgs());
            //}
        }
Example #2
0
File: Manga.cs Project: pawett/.NET
 private void ModificarResultadoPorProtesta(Protesta protesta, EventArgs args)
 {
      resultados.Find(r=>r.Embarcacion.Equals(protesta.EmbarcacionInfractora)).
           Penalizacion=protesta.ReglaInfringida;
 }