Пример #1
0
        public VisualInstructionUserControl InsertInstructionAtLocalToBeDefined(bool after, VisualInstructionUserControl visualInstruction, InstructionList instructions)
        {
            instructions.ValidateOperands();

            if (!instructions.Contains(OperationCode.OutputCoil) &&
                !instructions.Contains(OperationCode.Timer) &&
                !instructions.Contains(OperationCode.Counter))
            {
                return(InsertConditionInstructionAtLeft(after, visualInstruction, instructions));
            }
            else
            {
                return(InsertOutputInstructionAtRight(after, visualInstruction, instructions));
            }
        }