public TagBlockReallocator(TagBlockData block) { _block = block; _originalCount = block.Length; InitializeComponent(); DwmDropShadow.DropShadowToWindow(this); InitBlockInformation(); }
// Thread-safe private void SelectResult(SearchResult result) { TagBlockData block = result.TagBlock; if (block != null) { _flattener.ForceVisible(block); } SelectField(result.ListField); }
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; }
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); }
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); }
private void MetaFilterer_CollectResult(MetaField foundField, MetaField listField, TagBlockData parent) { _resultIndices[listField] = _searchResults.Count; _searchResults.Add(new SearchResult(foundField, listField, parent)); }
/// <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; }