/// <summary> /// Create a new project /// </summary> public ProjectViewModel(IAppService appService) { this._AppService = appService; Project = new Model.TranslationProject(); Groups = new ObservableCollection<GroupViewModel>(); Editors = new ObservableCollection<TranslationEditorViewModel>(); OpenTranslationCommand = new RelayCommand<TranslationFileViewModel>( async file => { Exception error = null; try { await OpenTranslationAsync(file); } catch (Exception ex) { error = ex; } if (error != null) await _AppService.ShowError(error); }, file => file != null ); CloseEditorCommand = new RelayCommand<TranslationEditorViewModel>( async editor => await CloseEditorAsync(editor), editor => editor != null ); }