private void button1_Click(object sender, EventArgs e) { var currentpage = ControlsFactory.Resolve <ManagePersonPage>(); DialogActivator.OpenDialog(currentpage, "Create patient", saveCallBack: () => { CurrentPerson = currentpage.Data; propertyGrid1.SelectedObject = CurrentPerson; }); }
private void button2_Click(object sender, EventArgs e) { var currentpage = ControlsFactory.Resolve <PersonSelectorPage>(); DialogActivator.OpenDialog(currentpage, "Select patient", AllowButtons: false, saveCallBack: () => { CurrentPerson = currentpage.Data; propertyGrid1.SelectedObject = CurrentPerson; }); }