public void SelectEntry([NotNull] ResourceTableEntry entry)
        {
            if (!ResourceManager.TableEntries.Contains(entry))
            {
                return;
            }

            var entity = entry.Container;

            if (!SelectedEntities.Contains(entity))
            {
                SelectedEntities.Add(entity);
            }

            SelectedTableEntries.Clear();
            SelectedTableEntries.Add(entry);
        }
        public void SelectEntry([NotNull] ResourceTableEntry entry)
        {
            if (!ResourceManager.TableEntries.Contains(entry))
            {
                return;
            }

            var entity = entry.Container;

            ClearFiltersRequest?.Invoke(this, EventArgs.Empty);

            if (!SelectedEntities.Contains(entity))
            {
                SelectedEntities.Add(entity);
            }

            SelectedTableEntries.Clear();
            SelectedTableEntries.Add(entry);
        }
        public void AddNewKey([NotNull] ResourceEntity entity, [NotNull] string key)
        {
            if (!entity.CanEdit(null))
            {
                return;
            }

            var entry = entity.Add(key);

            if (entry == null)
            {
                return;
            }

            ClearFiltersRequest?.Invoke(this, EventArgs.Empty);

            ResourceManager.ReloadSnapshot();

            SelectedTableEntries.Clear();
            SelectedTableEntries.Add(entry);
        }
예제 #4
0
        public void AddNewKey([NotNull] ResourceEntity entity, [NotNull] string key)
        {
            Contract.Requires(entity != null);
            Contract.Requires(!string.IsNullOrEmpty(key));

            if (!entity.CanEdit(null))
            {
                return;
            }

            var entry = entity.Add(key);

            if (entry == null)
            {
                return;
            }

            ResourceManager.ReloadSnapshot();

            SelectedTableEntries.Clear();
            SelectedTableEntries.Add(entry);
        }