public void PopulateOptionsList(List <WIListOption> options, List <string> message) { if (mCurrentState == null || !mCurrentState.IsInteractive) { return; } for (int i = 0; i < States.Count; i++) { WIState state = States [i]; if (!string.IsNullOrEmpty(state.OptionListDisplay)) { WIListOption option = new WIListOption(state.OptionListDisplay, "SetWIState" + state.Name); if (mCurrentState.Name == state.Name) { option.Disabled = true; } options.Add(option); } } }
public static bool IsNullOrInvalid(WIListOption option) { return(option == null || !option.IsValid); }