private void RenameSelectedVariety() { var vm = new EditVarietyViewModel(_projectService.Project.Varieties, _selectedVariety.DomainVariety); if (_dialogService.ShowModalDialog(this, vm) == true) { _selectedVariety.DomainVariety.Name = vm.Name; Messenger.Default.Send(new DomainModelChangedMessage(false)); } }
private void AddNewVariety() { var vm = new EditVarietyViewModel(_projectService.Project.Varieties); if (_dialogService.ShowModalDialog(this, vm) == true) { var variety = new Variety(vm.Name); _projectService.Project.Varieties.Add(variety); _analysisService.Segment(variety); Messenger.Default.Send(new DomainModelChangedMessage(true)); } }