Inheritance: ModernizedAlice.ArtOfWords.BizCommon.Model.Tag.TagModel
        public override TagModel GenerateNewTag()
        {
            var newTag = new TagTreeViewItemModel(GetNewId()) { Name = "名前の無いタグ" };
            _addedTags.Add(newTag);

            return newTag;
        }
Esempio n. 2
0
        public override TagModel GenerateNewTag()
        {
            var newTag = new TagTreeViewItemModel(GetNewId())
            {
                Name = "名前の無いタグ"
            };

            _addedTags.Add(newTag);

            return(newTag);
        }
        public static void ExpandChild(TagTreeViewItemModel parentTag, TagModel baseTag, ref TagTreeViewItemModelManager manager)
        {
            foreach (var child in baseTag.Children)
            {
                var childTag = ConvertTagToTagTreeViewItemModel.ConvertTag(child);

                manager.Add(childTag);
                manager.ConnectTags(parentTag, childTag);

                ExpandChild(childTag, child, ref manager);
            }
        }
        public static TagTreeViewItemModel ConvertTag(TagModel tag)
        {
            if (tag.IsBase())
            {
                return ConvertBaseTag(tag);
            }

            var model = new TagTreeViewItemModel(tag.Id);
            model.Name = tag.Name;

            return model;
        }
        public static void ExpandChild(TagTreeViewItemModel parentTag, TagModel baseTag, ref TagTreeViewItemModelManager manager)
        {
            foreach (var child in baseTag.Children)
            {
                var childTag = ConvertTagToTagTreeViewItemModel.ConvertTag(child);

                manager.Add(childTag);
                manager.ConnectTags(parentTag, childTag);

                ExpandChild(childTag, child, ref manager);
            }
        }
        public void AddChild(TagTreeViewItemModel addTarget)
        {
            var newTag = _manager.GenerateNewTag() as TagTreeViewItemModel;

            _manager.ConnectTags(addTarget, newTag);
            _manager.Add(newTag);

            newTag.IsSelected = true;
            addTarget.IsSelected = false;
            addTarget.IsExpanded = true;

            OnPropertyChanged("Tags");
        }
        public void AddChild(TagTreeViewItemModel addTarget)
        {
            var newTag = _manager.GenerateNewTag() as TagTreeViewItemModel;

            _manager.ConnectTags(addTarget, newTag);
            _manager.Add(newTag);

            newTag.IsSelected    = true;
            addTarget.IsSelected = false;
            addTarget.IsExpanded = true;

            OnPropertyChanged("Tags");
        }