Beispiel #1
0
 private void RedrawDisplayIfNeeded(IExecutableInstruction instruction)
 {
     if (instruction is DRW)
     {
         Display.RedrawDisplay();
     }
 }
Beispiel #2
0
        private void ExecuteInstruction(InstructionDTO instructionData, IExecutableInstruction instruction)
        {
            ValidateInstruction(instructionData, instruction);
            instruction.Execute(instructionData, this);

            RedrawDisplayIfNeeded(instruction);
        }
Beispiel #3
0
 private void ValidateInstruction(InstructionDTO instructionData, IExecutableInstruction instruction)
 {
     /* if (instructionData == null || instructionData.RawData.All(x => x == 0))
      * {
      *   throw new Exception("Instruction data cannot be null or empty");
      * }
      * if (instruction == null)
      * {
      *  // throw new Exception("Instruction implementation cannot be null");
      * }*/
 }