public MainViewModel(ICoreApplicationService coreService, IChooseFileNameService chooseFileNameService, IPersist persist, IOpenSimulationService openSimulationService) { _coreService = coreService; _chooseFileNameService = chooseFileNameService; _openSimulationService = openSimulationService; _persist = persist; _coreService.IrpSimulationProgress += (s,e) => Progress=e.Value; _coreService.IrpProjectLoaded += (s, e) => OnProjectLoaded(e.Value); _coreService.IrpSimulationCompleted += (s,e) => OnSimulationCompleted(e.Value); }
public DisplayCollectionViewModel(IChooseFileNameService chooseFileNameService, IOpenFileService openFileService, IOpenSimulationService openSimulationService, ICanCloseService canCloseService, ISaveFileService saveFileService) { _chooseFileNameService = chooseFileNameService; _openFileService = openFileService; _openSimulationService = openSimulationService; _canCloseService = canCloseService; _saveFileService = saveFileService; _openFileService.OpenFile += (s, e) => openFile(e.Path, e.Index, e.IndexIsObjectIndex); _openSimulationService.OpenSimulation += (s, e) => openSimulation(e.Simulation); _canCloseService.CloseMe += (s, e) => Models.Remove(s as ClosableViewModel); }