public TagBlockReallocator(TagBlockData block)
 {
     _block         = block;
     _originalCount = block.Length;
     InitializeComponent();
     DwmDropShadow.DropShadowToWindow(this);
     InitBlockInformation();
 }
示例#2
0
        // Thread-safe
        private void SelectResult(SearchResult result)
        {
            TagBlockData block = result.TagBlock;

            if (block != null)
            {
                _flattener.ForceVisible(block);
            }
            SelectField(result.ListField);
        }
示例#3
0
        public void LeaveTagBlock()
        {
            if (_currentTagBlock == null)
            {
                throw new InvalidOperationException("Not in a tagBlock");
            }

            _tagBlocks.RemoveAt(_tagBlocks.Count - 1);
            _currentTagBlock = _tagBlocks.Count > 0 ? _tagBlocks[_tagBlocks.Count - 1] : null;
        }
示例#4
0
        public static int?Show(ICacheFile cache, TagBlockData data)
        {
            App.AssemblyStorage.AssemblySettings.HomeWindow.ShowMask();
            var dialog = new TagBlockReallocator(data)
            {
                Owner = App.AssemblyStorage.AssemblySettings.HomeWindow,
                WindowStartupLocation = WindowStartupLocation.CenterOwner
            };

            dialog.ShowDialog();
            App.AssemblyStorage.AssemblySettings.HomeWindow.HideMask();
            return(dialog.NewCount);
        }
示例#5
0
        public bool EnterTagBlock(string name, uint offset, bool visible, uint elementSize, int align, bool sort, uint pluginLine, string tooltip)
        {
            if (visible || _showInvisibles)
            {
                var data = new TagBlockData(name, offset, 0, elementSize, align, sort, pluginLine, tooltip, _metaArea);
                AddValue(data);

                _tagBlocks.Add(data);
                TagBlocks.Add(data);
                _currentTagBlock = data;
                return(true);
            }
            return(false);
        }
示例#6
0
 private void MetaFilterer_CollectResult(MetaField foundField, MetaField listField, TagBlockData parent)
 {
     _resultIndices[listField] = _searchResults.Count;
     _searchResults.Add(new SearchResult(foundField, listField, parent));
 }
示例#7
0
 /// <summary>
 ///     Constructs a new search result holder.
 /// </summary>
 /// <param name="foundField">The field that was found and highlighted.</param>
 /// <param name="listField">
 ///     The top-level field in the field list. For tag block elements, this is the topmost wrapper
 ///     field, otherwise, this may be the same as foundField.
 /// </param>
 /// <param name="parent">The block that the field is in. Can be null.</param>
 public SearchResult(MetaField foundField, MetaField listField, TagBlockData parent)
 {
     ListField = listField;
     Field     = foundField;
     TagBlock  = parent;
 }