protected void InitializeMinimal()
    {
        ProjectRoot = CreateProjectRootItem();

        ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.Event));
        ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.Switch));
        ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.State));
        ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.Soundbank));
        ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.AuxBus));
        ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.AcousticTexture));

        TreeUtility.TreeToList(ProjectRoot, Data);
    }
    private void FireSearch(object sender, System.Timers.ElapsedEventArgs e)
    {
        if (SearchRoot == null)
        {
            SearchRoot = new AkWwiseTreeViewItem(ProjectRoot);
        }

        SearchRoot.children.Clear();
        SearchItems = new List <AkWwiseTreeViewItem>(new[] { SearchRoot });
        TreeUtility.TreeToList(SearchRoot, SearchItems);
        AkWaapiUtilities.GetResultListDelegate <WwiseObjectInfoJsonObject> callback = (List <WwiseObjectInfoJsonObject> items) =>
        {
            AddSearchResults(AkWaapiUtilities.ParseObjectInfo(items));
        };
        AkWaapiUtilities.Search(searchString, searchObjectTypeFilter, waapiWwiseObjectOptions, callback);
    }
    public void Update()
    {
        while (treeviewCommandQueue.Count > 0)
        {
            if (treeviewCommandQueue.TryDequeue(out TreeViewCommand cmd))
            {
                cmd.Execute();
                refreshFlag = true;
            }
        }

        while (toRequeue.Count > 0)
        {
            treeviewCommandQueue.Enqueue(toRequeue.Dequeue());
        }

        //Preemptively load items in heirarchy that are close to being exposed ( up to grandchildren of unexpanded items)
        if (rebuildFlag)
        {
            TreeUtility.TreeToList(ProjectRoot, Data);
            if (TreeView != null)
            {
                Preload(ProjectRoot, TreeView.state);
            }
            refreshFlag = true;
            rebuildFlag = false;
        }


        //Updates treeView data and sets repaint flag
        if (refreshFlag)
        {
            Changed();
            refreshFlag = false;
        }
    }