/// <summary> /// Calculates the values (0's or 1's) across the entire circuit /// and updates the display accordingly /// </summary> private void calculateOutputs() { sketchPanel.Circuit.calculateOutputs(); foreach (string outputName in outputMapping.Keys) { int value = sketchPanel.Circuit.gateValue(outputName, 0); circuitValuePopups.SetPopup(outputName, value, false); } }
/// <summary> /// Calculates the values (0's or 1's) across the entire circuit /// and updates the display accordingly /// </summary> private void calculateOutputs() { sketchPanel.Circuit.calculateOutputs(); // Only display the toggles if the circuit can be calculated if (!sketchPanel.Circuit.IsOscillating) { foreach (Shape output in outputMapping.Keys) { int value = sketchPanel.Circuit.gateValue(output, 0); circuitValuePopups.SetPopup(output, value, false); } } else { circuitValuePopups.HideToggles(); } }