예제 #1
0
        // Basic Method
        public void TwoNext()
        {
            for (int i = 0; i < lineArgs.Length; i++)
            {
                string temp = lineArgs[i];
                last = IsExist(temp);

                if (last != null)
                {
                    if (last.GetData)
                    {
                        if (second != null)
                        {
                            SetData(second);
                        }
                        second = last;
                    }
                    else
                    {
                        if (second == null)
                        {
                            SetData(last);
                        }

                        else
                        {
                            SetData(second);
                            second = last;
                        }
                    }
                }
                else
                {
                    if (second != null)
                        arraylist.Add(temp);
                    else
                        SetData(null);
                }

            }
            if (second != null)
                SetData(second);
        }
예제 #2
0
        // Official Methods
        void SetData(Pattern_cmd obj)
        {
            if (first == obj && !obj.Repeat)
                return;
            Console.WriteLine("Run command: [{0}]", cur_command);
            if (obj != null)
            {
                obj.GetParse(arraylist);

            }
            else
            {
                Console.WriteLine("Command {0} is not supported, use CommandParser.exe /? to see set of allowed commands", cur_command);
            }
            first = obj;
            Console.WriteLine(new string('-', 30)); // CW
            second = null;
            arraylist.Clear();
        }