Beispiel #1
0
        private void NewAffix()
        {
            var vm = new EditAffixViewModel(_projectService.Project.Segmenter);

            if (_dialogService.ShowModalDialog(this, vm) == true)
            {
                var affix = new Affix(vm.StrRep, vm.Type == AffixViewModelType.Prefix ? AffixType.Prefix : AffixType.Suffix, vm.Category);
                _projectService.Project.Segmenter.Segment(affix);
                DomainVariety.Affixes.Add(affix);
                Messenger.Default.Send(new DomainModelChangedMessage(false));
                SelectedAffix = _affixes.Single(a => a.DomainAffix == affix);
            }
        }
Beispiel #2
0
 private void NewAffix()
 {
     var vm = new EditAffixViewModel(_projectService.Project.Segmenter);
     if (_dialogService.ShowModalDialog(this, vm) == true)
     {
         var affix = new Affix(vm.StrRep, vm.Type == AffixViewModelType.Prefix ? AffixType.Prefix : AffixType.Suffix, vm.Category);
         _projectService.Project.Segmenter.Segment(affix);
         DomainVariety.Affixes.Add(affix);
         Messenger.Default.Send(new DomainModelChangedMessage(false));
         SelectedAffix = _affixes.Single(a => a.DomainAffix == affix);
     }
 }