void form_RunKeyConversionWizard(object sender, EventArgs e) { var modelInformation = new ConvertKeyToComponentModelInformation(key.GetMappingSet(), key); var wizard = new FormConvertKeyToComponent(modelInformation); var dialogResult = mainPanel.ShowDialog(wizard); if (dialogResult == DialogResult.OK) { var result = wizard.GetConversionResult(); result.ApplyChanges(key.GetMappingSet(), key); } }