Esempio n. 1
0
        private bool verifyAndCompileCode()
        {
            List <string> codeLines = getLinesFromString(ProgramCode);

            MovementCmnds.Clear();
            ConditionalCmnds.Clear();

            bool result = verifyCodeBegin(codeLines) && verifyCodeEnd(codeLines) && verifyAndCompileCodeLines(codeLines);

            return(result);
        }
Esempio n. 2
0
        private bool verifyAndCompileIfStatement(string v)
        {
            if (Regex.Matches(v, ifPattern).Count != 1)
            {
                return(false);
            }

            ConditionalDirections direction = getConditionalDirectionFromCodeLine(v);
            ConditionalLights     led       = getLedFromCodeLine(v);
            ActuatorState         state     = getLedStateFromCodeLine(v);

            ConditionalCmnds.Add(new ConditionalLightCommand(direction, led, state));

            return(true);
        }
Esempio n. 3
0
 // Registering View Items Commands into bindinglist
 public void AddToConditionalCommandList(ConditionalLightCommand cc)
 {
     ConditionalCmnds.Add(cc);
 }