Ejemplo n.º 1
0
        public void ReloadData(Func <string, StructDef> structMatcher)
        {
            DataViewState viewState = DataViewState.Save(this);

            _structTreeView.BeginUpdate();
            try
            {
                _structTreeView.Nodes.Clear();
                _nodeMap.Clear();
                _searchResultsRoot = null;
                foreach (DataFile f in _dataFiles)
                {
                    f.RootStructDef = structMatcher.Invoke(f.Name);
                    LoadDataFile(f);
                }
                if (viewState != null)
                {
                    viewState.Restore(this);
                }
            }
            finally
            {
                _structTreeView.EndUpdate();
            }
        }
Ejemplo n.º 2
0
 public static DataViewState Save(DataView view)
 {
     DataViewState result = new DataViewState();
     TreeNode node = view.StructTreeView.SelectedNode;
     while(node != null)
     {
         result._selectedIndices.Insert(0, node.Index);
         node = node.Parent;
     }
     return result;
 }
Ejemplo n.º 3
0
        public static DataViewState Save(DataView view)
        {
            DataViewState result = new DataViewState();
            TreeNode      node   = view.StructTreeView.SelectedNode;

            while (node != null)
            {
                result._selectedIndices.Insert(0, node.Index);
                node = node.Parent;
            }
            return(result);
        }