예제 #1
0
        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);
                }
            }
        }
예제 #2
0
 public static bool IsNullOrInvalid(WIListOption option)
 {
     return(option == null || !option.IsValid);
 }