public void AddItem()
        {
            var viewModel = new SymbolSpecificationViewModel(LanguageName, canBeDeleted: true, notificationService: _notificationService);
            var dialog    = new SymbolSpecificationDialog(viewModel);

            if (dialog.ShowDialog().Value == true)
            {
                Items.Add(viewModel);
            }
        }
        private void CreateSymbolSpecification(object sender, RoutedEventArgs e)
        {
            var newSymbolSpecificationViewModel = new SymbolSpecificationViewModel(_namingStylesViewModel.LanguageName, _categories, _notificationService);
            var dialog = new SymbolSpecificationDialog(newSymbolSpecificationViewModel);
            var result = dialog.ShowModal();

            if (result == true)
            {
                _namingStylesViewModel.AddSymbolSpecification(newSymbolSpecificationViewModel);
                _viewModel.SelectedSymbolSpecificationIndex = _viewModel.SymbolSpecificationList.IndexOf(newSymbolSpecificationViewModel);
            }
        }
        public void EditItem(INamingStylesInfoDialogViewModel item)
        {
            var symbolSpecificationViewModel = (SymbolSpecificationViewModel)item;

            var symbolSpecification = ((SymbolSpecificationViewModel)item).GetSymbolSpecification();
            var viewModel           = new SymbolSpecificationViewModel(LanguageName, symbolSpecification, symbolSpecificationViewModel.CanBeDeleted, _notificationService);
            var dialog = new SymbolSpecificationDialog(viewModel);

            if (dialog.ShowDialog().Value == true)
            {
                symbolSpecificationViewModel.ItemName          = viewModel.ItemName;
                symbolSpecificationViewModel.AccessibilityList = viewModel.AccessibilityList;
                symbolSpecificationViewModel.ModifierList      = viewModel.ModifierList;
                symbolSpecificationViewModel.SymbolKindList    = viewModel.SymbolKindList;
            }
        }
        private void ConfigureSymbolSpecifications(object sender, RoutedEventArgs e)
        {
            if (_viewModel.SelectedSymbolSpecificationIndex >= 0)
            {
                var symbolSpecificationViewModel = _viewModel.SymbolSpecificationList.GetItemAt(_viewModel.SelectedSymbolSpecificationIndex) as SymbolSpecificationViewModel;
                var symbolSpecificationClone     = new SymbolSpecificationViewModel(_namingStylesViewModel.LanguageName, _categories, symbolSpecificationViewModel.GetSymbolSpecification(), _notificationService);

                var dialog = new SymbolSpecificationDialog(symbolSpecificationClone);
                var result = dialog.ShowModal();
                if (result == true)
                {
                    symbolSpecificationViewModel.ModifierList      = symbolSpecificationClone.ModifierList;
                    symbolSpecificationViewModel.SymbolKindList    = symbolSpecificationClone.SymbolKindList;
                    symbolSpecificationViewModel.AccessibilityList = symbolSpecificationClone.AccessibilityList;
                    symbolSpecificationViewModel.SymbolSpecName    = symbolSpecificationClone.SymbolSpecName;
                    symbolSpecificationViewModel.CustomTagList     = symbolSpecificationClone.CustomTagList;
                }
            }
        }
        private void SymbolSpecificationList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var item = ((FrameworkElement)e.OriginalSource).DataContext as SymbolSpecificationViewModel;

            if (item != null)
            {
                var itemClone = new SymbolSpecificationViewModel(_viewModel.LanguageName, _categories, item.GetSymbolSpecification(), _notificationService);

                var dialog = new SymbolSpecificationDialog(itemClone);
                var result = dialog.ShowModal();
                if (result == true)
                {
                    item.ModifierList      = itemClone.ModifierList;
                    item.SymbolKindList    = itemClone.SymbolKindList;
                    item.AccessibilityList = itemClone.AccessibilityList;
                    item.SymbolSpecName    = itemClone.SymbolSpecName;
                    item.CustomTagList     = itemClone.CustomTagList;
                }
            }
        }