private void EnableOrDisable() { if (EngineLoader.IsEngineEnabled()) { EngineLoader.DisableEngine(); } else { EngineLoader.EnableEngine(); } RaisePropertyChanged(() => EngineState); }
private void ExecuteOpenSolutionCommand() { if (SolutionPath != null) { if (EngineLoader.IsRunInProgress()) { _uiServices.ShowMessageBox("Cannot close solution as a run is in progress"); return; } EngineLoader.DisableEngine(); EngineLoader.Unload(); InitializeViewModelState(); } var slnPath = _uiServices.OpenFile("Solution Files|*.sln"); if (slnPath == null) { return; } SolutionPath = slnPath; var cfg = EngineConfigLoader.load(new EngineConfig(), FilePath.NewFilePath(slnPath)); EngineLoader.Load( null, new EngineParams( HostVersion, cfg, FilePath.NewFilePath(slnPath), DateTime.UtcNow)); EngineLoader.EnableEngine(); RaisePropertyChanged(() => EngineState); CommandManager.InvalidateRequerySuggested(); OpenFile(slnPath); }