private int? returnValue() { int? result = 0; if (r2.Checked) result = comboBox1.SelectedIndex + 1; else if (r3.Checked) result = -comboBox2.SelectedIndex - 1; return result; }
public static int? GetValue(PCCPackage p, int index) { Objectselect prompt = new Objectselect(); prompt.Init(p, index); return prompt.ShowDialog() == DialogResult.OK ? prompt.returnValue() : null; }