Example #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);
            }
        }
Example #2
0
        private void AddNewMeaning()
        {
            var vm = new EditMeaningViewModel(_projectService.Project.Meanings);

            if (_dialogService.ShowModalDialog(this, vm) == true)
            {
                var newMeaning = new Meaning(vm.Gloss, vm.Category);
                _projectService.Project.Meanings.Add(newMeaning);
                Messenger.Default.Send(new DomainModelChangedMessage(true));
                SelectedMeaning = _meanings.Single(s => s.DomainMeaning == newMeaning);
            }
        }