Esempio n. 1
0
        public PropertiesVM(CircuitGridVM circuitGrid, OutputGridVM outputGrid)
        {
            SelectedObject = outputGrid.SelectedObject;
            AddSelectionTracing(circuitGrid);
            AddSelectionTracing(outputGrid);

            CircuitEvaluator eval = CircuitEvaluator.GetInstance();

            _allParametrics = eval.GetExtensionGates();
        }
Esempio n. 2
0
        private void InitFromModel(ComputerModel model)
        {
            if (_model != null)
            {
                Dictionary <string, List <Gate> > oldComposites = _model.CompositeGates;
                Dictionary <string, List <Gate> > newComposites = model.CompositeGates;

                foreach (var pair in oldComposites)
                {
                    if (!newComposites.ContainsKey(pair.Key))
                    {
                        newComposites[pair.Key] = pair.Value;
                    }
                }
            }
            _model = model;

            CircuitGrid = new CircuitGridVM(_model);

            CircuitEvaluator eval = CircuitEvaluator.GetInstance();

            _outputModel = eval.InitFromModel(_model);
            OutputGrid.LoadModel(_model, _outputModel);
        }
Esempio n. 3
0
        private void InitFromModel(ComputerModel model)
        {
            if (_model != null)
            {
                Dictionary<string, List<Gate>> oldComposites = _model.CompositeGates;
                Dictionary<string, List<Gate>> newComposites = model.CompositeGates;

                foreach (var pair in oldComposites)
                {
                    if (!newComposites.ContainsKey(pair.Key))
                    {
                        newComposites[pair.Key] = pair.Value;
                    }
                }
            }
            _model = model;

            CircuitGrid = new CircuitGridVM(_model);

            CircuitEvaluator eval = CircuitEvaluator.GetInstance();
            _outputModel = eval.InitFromModel(_model);
            OutputGrid.LoadModel(_model, _outputModel);
        }
Esempio n. 4
0
 public void AddSelectionTracing(CircuitGridVM circuitGrid)
 {
     circuitGrid.SelectionChanged += circuitGrid_SelectionChanged;
 }
Esempio n. 5
0
        public PropertiesVM(CircuitGridVM circuitGrid, OutputGridVM outputGrid)
        {
            SelectedObject = outputGrid.SelectedObject;
            AddSelectionTracing(circuitGrid);
            AddSelectionTracing(outputGrid);

            CircuitEvaluator eval = CircuitEvaluator.GetInstance();
            _allParametrics = eval.GetExtensionGates();
        }
Esempio n. 6
0
        private void circuitGrid_SelectionChanged(object sender, RoutedEventArgs e)
        {
            CircuitGridVM grid = sender as CircuitGridVM;

            SelectedObject = grid.SelectedObject;
        }
Esempio n. 7
0
 public void AddSelectionTracing(CircuitGridVM circuitGrid)
 {
     circuitGrid.SelectionChanged += circuitGrid_SelectionChanged;
 }