public ThermodynamicSystemEditorViewModel(IEventAggregator aggregator, ThermodynamicSystemEntity source, IThermodynamicSystemImporter importer, IChartViewModelFactory chartFactory) { _aggregator = aggregator; _source = source; _importer = importer; _chartFactory = chartFactory; _aggregator.Subscribe(this); ScriptDocument = new TextDocument(_source.SourceCode); var types = Enum.GetValues(typeof(EvaluatedProperties)); foreach (var type in types.OfType <EvaluatedProperties>()) { AvailableFunctionTypes.Add(type); } ParseInputFile(); }
public ThermodynamicSystem LoadThermodynamicSystem(ThermodynamicSystemEntity entity) { return(_importer.ImportNeutralFile(entity.SourceCode)); }
public IThermodynamicSystemViewModel Create(ThermodynamicSystemEntity source) { return(new ThermodynamicSystemEditorViewModel(_aggregator, source, _importer, _chartFactory)); }