private void onCheckedChanged(object sender, EventArgs e) { foreach (object o in Enum.GetValues(typeof(ESysParticleType))) { ESysParticleType eType = (ESysParticleType)o; if (((RadioButton)sender).Text.Contains(Enum.GetName(typeof(ESysParticleType), eType) + " ")) { selected = eType; break; } } }
internal void setType(ESysParticleType e) { foreach (RadioButton rb in rbs) { if (!rb.Text.Contains(Enum.GetName(typeof(ESysParticleType), e))) { continue; } rb.Checked = true; selected = e; return; } }