public DependencyDescription(int InIndex, string InValue)
 {
     this.dependsIndex = InIndex;
     this.Dpendencies  = LinqS.Where(InValue.Split(new char[]
     {
         '|'
     }), (string x) => !string.IsNullOrEmpty(x.Trim()));
 }
Esempio n. 2
0
        public override bool HandleAutoComplete()
        {
            if (CandinatesList.hasValidSelection)
            {
                var Selection = CandinatesList.SelectedName;

                string[] SplitedParts = LinqS.Where(Selection.Split(' '), x => !string.IsNullOrEmpty(x.Trim()));

                if (SplitedParts != null && SplitedParts.Length > 0)
                {
                    inputText = SplitedParts[0];
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 3
0
        public void UpdateCandinates()
        {
            var InputText = inputText;

            string[] SplitedParts = LinqS.Where(InputText.Split(' '), x => !string.IsNullOrEmpty(x.Trim()));

            List <IListItem> Candinates = new List <IListItem>();

            if (SplitedParts == null || SplitedParts.Length <= 0)
            {
                // no any valid input.
                var GeneralRepositories = CheatCommandsRepository.instance.generalRepositories;

                var Iter = GeneralRepositories.Commands.GetEnumerator();

                while (Iter.MoveNext())
                {
                    Candinates.Add(new CheatCommandItem(Iter.Current.Value));
                }

                CandinatesList.Reset(Candinates);
            }
            else
            {
                var BaseCommand = SplitedParts[0];

                var FilteredCommands = CheatCommandsRepository.instance.FilterByString(BaseCommand);

                for (int i = 0; i < FilteredCommands.Count; ++i)
                {
                    Candinates.Add(new CheatCommandItem(FilteredCommands[i]));
                }

                CandinatesList.Reset(Candinates);
            }
        }
Esempio n. 4
0
        public DependencyDescription(int InIndex, string InValue)
        {
            dependsIndex = InIndex;

            Dpendencies = LinqS.Where(InValue.Split('|'), x => !string.IsNullOrEmpty(x.Trim()));
        }