protected void unosDogadaja(object sender, EventArgs a) { Dogadaj dogadaj = new Dogadaj(); var temp = new UnosDogadaja(dogadaj); temp.Destroyed += onDestroy; }
protected void izmjenaDogadaja(object sender, EventArgs a) { DogadajNode dogadajSelected = nodeview1.NodeSelection.SelectedNode as DogadajNode; if (dogadajSelected == null) { return; } Dogadaj dogadaj = new Dogadaj(); foreach (var i in listaDogadaja) { if (i.Id == dogadajSelected.id) { dogadaj = i; break; } } var temp = new UnosDogadaja(dogadaj); temp.Destroyed += onDestroy; }