示例#1
0
 /// <summary>
 /// Updates SimulationManager, sets the sketchPanel's circuit, and creates the clean circuit.
 /// </summary>
 private CircuitSimLib.Circuit createCircuitAndCleanCircuit(CircuitParser.CircuitParser parser)
 {
     CircuitSimLib.Circuit circuit = createCircuit(parser);
     sketchPanel.Circuit = circuit;
     cleanCircuit        = new CleanCircuit(ref sketchPanel, false);
     return(circuit);
 }
示例#2
0
        /// <summary>
        /// Displays the clean version of the circuit on the given Canvas.
        /// </summary>
        /// <param name="cleanCanvas"></param>
        public void DisplayCleanCircuit(DockPanel dock)
        {
            dock.Children.Remove(this.cleanCircuit);

            // Otherwise create the circuit and set the layout
            cleanCircuit = new CleanCircuit(ref sketchPanel, true);
            dock.Children.Add(this.cleanCircuit);

            cleanCircuit.Width  = dock.ActualWidth;
            cleanCircuit.Height = dock.ActualHeight;

            displayingClean                  = true;
            cleanCircuit.EditingMode         = InkCanvasEditingMode.None;
            cleanCircuit.EditingModeInverted = InkCanvasEditingMode.None;

            MakeNewToggles();
        }
示例#3
0
 /// <summary>
 /// Create the clean circuit, to seperate it from making the circuit
 /// </summary>
 /// <param name="sketchPanel"></param>
 private void createCleanCircuit(ref SketchPanel sketchPanel)
 {
     cleanCircuit = new CleanCircuit(ref sketchPanel, false);
 }