private void OptionBClick(object sender, EventArgs e) { (sender as Control).FindForm().DialogResult = DialogResult.OK; Param_Integer param = Owner as Param_Integer; param.RecordUndoEvent("Set Option"); param.PersistentData.Clear(); param.PersistentData.Append(new GH_Integer(2)); param.ExpireSolution(true); }