public static string EffectTypeEXName(EffectTypeEX effTypeEX) { string valueOut = "None"; switch (effTypeEX) { case EffectTypeEX.Constant: valueOut = EFFECTEXconstant; break; case EffectTypeEX.FadeUp: valueOut = EFFECTEXconstant; break; case EffectTypeEX.FadeDown: valueOut = EFFECTEXconstant; break; case EffectTypeEX.Shimmer: valueOut = EFFECTshimmer; break; case EffectTypeEX.Twinkle: valueOut = EFFECTtwinkle; break; case EffectTypeEX.DMX: valueOut = EFFECTdmx; break; } return(valueOut); }
public static EffectTypeEX enumEffectTypeEX(string style) { EffectTypeEX valueOut = EffectTypeEX.None; if (style == EFFECTintensity) { valueOut = EffectTypeEX.Constant; } else if (style == EFFECTEXconstant) { valueOut = EffectTypeEX.Constant; } else if (style == EFFECTEXbrighten) { valueOut = EffectTypeEX.FadeUp; } else if (style == EFFECTEXdim) { valueOut = EffectTypeEX.FadeDown; } else if (style == EFFECTshimmer) { valueOut = EffectTypeEX.Shimmer; } else if (style == EFFECTtwinkle) { valueOut = EffectTypeEX.Twinkle; } else if (style == EFFECTdmx) { valueOut = EffectTypeEX.DMX; } else { // TODO: throw exception here valueOut = EffectTypeEX.None; string sMsg = "Unrecognized Effect Level: "; sMsg += style; //DialogResult dr = MessageBox.Show(sMsg, "Unrecognized Keyword", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(valueOut); }