public RigidBody(PhysicsController physics) { Physics = physics; Id = Guid.NewGuid(); Physics.GetSolver().onAdd += point => { ContactAdd?.Invoke(point); }; }
async private void saveBtn_Clicked(object sender, EventArgs e) { var contact = BindingContext as Contact; if (string.IsNullOrEmpty(contact.FirstName) && string.IsNullOrEmpty(contact.LastName)) { await DisplayAlert("Validation failed", "Please enter the name", "OK"); } else { if (contact.Id == null) { ContactAdd?.Invoke(this, contact); } else { ContactUpdate?.Invoke(this, contact); } await Navigation.PopAsync(); } }