private void ItemRenamed([NotNull] object sender, [NotNull] ItemUri renamedItemUri, [NotNull] string newName)
        {
            Debug.ArgumentNotNull(sender, nameof(sender));
            Debug.ArgumentNotNull(renamedItemUri, nameof(renamedItemUri));
            Debug.ArgumentNotNull(newName, nameof(newName));

            if (Item.ItemUri == renamedItemUri)
            {
                ItemHeader.Text = newName;
                GutterManager.UpdateGutter(renamedItemUri);
            }
        }
Exemplo n.º 2
0
        protected virtual void UpdateGutter([NotNull] List <BaseTreeViewItem> items)
        {
            Debug.ArgumentNotNull(items, nameof(items));

            var gutterItems = new List <ItemUri>();

            foreach (var item in items)
            {
                var i = item as ItemTreeViewItem;
                if (i != null)
                {
                    gutterItems.Add(i.ItemUri);
                }
            }

            GutterManager.UpdateGutter(gutterItems);
        }
Exemplo n.º 3
0
        private void ItemSaved([NotNull] object sender, [NotNull] ContentModel contentModel)
        {
            Debug.ArgumentNotNull(sender, nameof(sender));
            Debug.ArgumentNotNull(contentModel, nameof(contentModel));

            var list = new List <ItemUri>();

            foreach (var field in contentModel.Fields)
            {
                foreach (var fieldUri in field.FieldUris)
                {
                    if (list.Contains(fieldUri.ItemVersionUri.ItemUri))
                    {
                        list.Add(fieldUri.ItemVersionUri.ItemUri);
                    }
                }
            }

            GutterManager.UpdateGutter(list);
        }