Esempio n. 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //Test IC parcing
            fileBrowser.ShowDialog();
            LogicCircuitParser parser = new LogicCircuitParser("master", File.ReadAllText(fileBrowser.FileName));
            masterCircuit = parser.GetMasterCircuit();

            //Build the controls
            BuildCircuitControls(masterCircuit);

            timer1.Enabled = true;
        }
 public IntegratedCircuitParseData(IntegratedCircuit integratedCircuit, LogicCircuitParser parser)
 {
     this.integratedCircuit = integratedCircuit;
     this.parser = parser;
 }
        //Commands
        private void IncludeBlueprints(string[] parameters)
        {
            //Parses the given file and merges the blueprint data.

            LogicCircuitParser blueprintParser = new LogicCircuitParser("nameless", File.ReadAllText(parameters[0]));

            Dictionary<string, BlueprintParseData> otherBlueprints = blueprintParser.GetBlueprintData();
            foreach (KeyValuePair<string, BlueprintParseData> bp in otherBlueprints)
            {
                AddBlueprintData(bp.Key, bp.Value);
            }
        }