private void SingleContactEdit(object sender, ContactEventArgs args) { if (OnEdit != null) { var argsForEvent = new ContactsEventArgs() { Contact = args.Contact, Cities = _cities, PhoneTypes = _phoneTypes }; OnEdit(sender, argsForEvent); } }
private void AddContact() { if (OnNewContactClicked != null) { var firstCity = _cities.First(); var newModel = new Model.Contact() { Id = -1, FirstName = string.Empty, LastName = string.Empty, Street = string.Empty, City = firstCity, PhoneNumbers = new List <Phone>() }; var args = new ContactsEventArgs { Contact = newModel, Cities = _cities, PhoneTypes = _phoneTypes }; OnNewContactClicked(this, args); } }