Пример #1
0
        private void removeSimulationFromIdentification(ISimulation simulation, ParameterIdentification identification)
        {
            if (!identification.UsesSimulation(simulation))
            {
                return;
            }

            removeOutputMappingsForSimulation(simulation, identification);
            removeLinkedParametersForSimulation(simulation, identification);
            identification.RemoveSimulation(simulation);
        }
Пример #2
0
        public void RemoveSimulation(ISimulation simulation)
        {
            _lazyLoadTask.Load(simulation);
            if (_parameterIdentification.AnyOutputOfSimulationMapped(simulation))
            {
                var viewResult = _dialogCreator.MessageBoxYesNo(Captions.ParameterIdentification.ReallyDeleteSimulationUsedInParameterIdentification(simulation.Name));
                if (viewResult == ViewResult.No)
                {
                    return;
                }
            }

            _parameterIdentification.RemoveSimulation(simulation);
            _view.DestroyNode(simulation.Id);
            SimulationRemoved(this, new SimulationEventArgs(simulation));
        }