Example #1
0
        private void UpdateIsFixed(object sender, PropertyChangedEventArgs e)
        {
            Clear();
            MultiTagItems.Clear();

            if (IsFixed.Value)
            {
                foreach (var fm in FixedMeanings)
                {
                    TagDescription desc = TagDescriptionMap.Instance[ID3.Version.v2_3];

                    Frame frame = new Frame(desc, fm);
                    FrameDescription.FrameType type = desc[fm].Type;

                    TagModelItem item = TagModelItemFactory.Create(type);
                    item.Frame = frame;

                    MultiTagModelItem mtmi = MultiTagModelItemFactory.Create(type);
                    mtmi.InitFixed(item);
                    MultiTagModelItems.Add(mtmi);
                }
            }

            adapter.UpdateItems();
        }
Example #2
0
        public void Clear()
        {
            TagModels.ForEach(n => n.Items.CollectionChanged -= OnTagModelChanged);
            TagModels.Clear();

            if (IsFixed.Value)
            {
                MultiTagItems.ForEach(n => n.Items.Clear());
            }
            else
            {
                MultiTagItems.Clear();
            }

            MultiTagModelItems.ForEach(n => n.IsEnabled = false);

            tagModelItemToTagModel.Clear();
        }