public void LoadModels(Dictionary <uint, Drawable> dict) { DrawableDict = dict; ModelsTreeView.Nodes.Clear(); //ModelsTreeView.ShowRootLines = true; if (dict != null) { foreach (var kvp in dict) { MetaHash mhash = new MetaHash(kvp.Key); var drawable = kvp.Value; var dnode = ModelsTreeView.Nodes.Add(mhash.ToString()); dnode.Tag = drawable; AddDrawableModelsTreeNodes(drawable.DrawableModels?.High, "High Detail", dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.Med, "Medium Detail", dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.Low, "Low Detail", dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.VLow, "Very Low Detail", dnode); dnode.Expand(); } } }
public void LoadModels(Dictionary <uint, Drawable> dict) { DrawableDict = dict; LightsTreeView.Nodes.Clear(); if (dict != null) { foreach (var kvp in dict) { MetaHash mhash = new MetaHash(kvp.Key); var drawable = kvp.Value; var dnode = LightsTreeView.Nodes.Add(mhash.ToString()); dnode.Tag = drawable; var lights = drawable.LightAttributes.data_items; if (lights != null) { AddLightsTreeNodes(lights, dnode); } dnode.Expand(); } } }
private void AddDrawableTreeNode(DrawableBase drawable, uint hash, bool check) { MetaHash mhash = new MetaHash(hash); var dnode = ModelsTreeView.Nodes.Add(mhash.ToString()); dnode.Tag = drawable; dnode.Checked = check; AddDrawableModelsTreeNodes(drawable.DrawableModels?.High, "High Detail", true, dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.Med, "Medium Detail", false, dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.Low, "Low Detail", false, dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.VLow, "Very Low Detail", false, dnode); //AddDrawableModelsTreeNodes(drawable.DrawableModels?.Extra, "X Detail", false, dnode); }