示例#1
0
        public Main()
        {
            InitializeComponent();
            NodeMediator   nMediator       = new NodeMediator();
            NodeFactory    nFactory        = NodeFactory.Instance;
            CircuitBuilder nCircuitBuilder = new CircuitBuilder(nMediator, nFactory);

            controller = new CircuitController(nMediator, nCircuitBuilder);
        }
示例#2
0
        private void PrepareAllCircuits(List <InputValue[]> reversedInputs)
        {
            int circuitFilePathsCounter = 0;

            foreach (var circuitFilePath in _circuitFilePaths)
            {
                CircuitBuilder circuitBuilder = new CircuitBuilder();
                // Loop over file array and prepareCircuit for each file
                circuitBuilder.PrepareCircuit(circuitFilePath);
                if (circuitBuilder._inCorrectCircuit)
                {
                    _incorrectSimulator = true;
                    return;
                }
                Circuit circuit = circuitBuilder.GetCircuit();

                // Initialize inputs of circuit
                InitializeInputs(circuitFilePathsCounter, circuit, reversedInputs);

                circuitFilePathsCounter++;
            }
        }
示例#3
0
 public CircuitController(NodeMediator mediator, CircuitBuilder circuit)
 {
     _NodeMediator   = mediator;
     _CircuitBuilder = circuit;
 }