示例#1
0
        /// <summary>
        /// Remakes all the input/ouput popups
        /// </summary>
        public void MakeNewToggles()
        {
            if (circuitValuePopups == null || !circuitValuePopups.HasPopups)
            {
                circuitValuePopups = new CircuitValuePopups(inputMapping, sketchPanel, outputMapping);
                oldPopupLocations  = circuitValuePopups.Locations;
                circuitValuePopups.SetInputEvent += new SetInputEventHandler(setInputValue);
            }

            if (displayingClean)
            {
                circuitValuePopups.Locations = cleanCircuit.LabelLocations;
                circuitValuePopups.MakeNewToggles(cleanCircuit);
            }
            else
            {
                circuitValuePopups.Locations = oldPopupLocations;
                circuitValuePopups.MakeNewToggles(sketchPanel.InkCanvas);
            }
        }