private void PopulateEffectTreeList() { // Add Categories enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.WeaponsAndHealth)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.WantedLevel)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.Weather)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.Spawning)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.Time)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.VehiclesTraffic)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.PedsAndCo)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.PlayerModifications)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.Stats)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.CustomEffects)); enabledEffectsView.Nodes.Add(new CategoryTreeNode(Category.Teleportation)); // Add Effects foreach (AbstractEffect effect in EffectDatabase.Effects) { TreeNode node = enabledEffectsView.Nodes.Find(effect.Category.Name, false).FirstOrDefault(); EffectTreeNode addedNode = new EffectTreeNode(effect) { Checked = true }; node.Nodes.Add(addedNode); IdToEffectNodeMap.Add(effect.Id, addedNode); } }
private void PopulateEffectTreeList() { enabledEffectsView.Nodes.Clear(); idToEffectNodeMap.Clear(); // Add Categories foreach (Category cat in Category.Categories) { if (cat.GetEffectCount() > 0) { enabledEffectsView.Nodes.Add(new CategoryTreeNode(cat)); } } // Add Effects foreach (AbstractEffect effect in EffectDatabase.Effects) { TreeNode node = enabledEffectsView.Nodes.Find(effect.Category.Name, false).FirstOrDefault(); EffectTreeNode addedNode = new EffectTreeNode(effect) { Checked = true }; node.Nodes.Add(addedNode); idToEffectNodeMap.Add(effect.Id, addedNode); } }
public void executeRemoveEffectFromNote(NodeClick click, IEffect effect) { EffectTreeNode node = click.NoteNodes.First()?.findChild(effect) as EffectTreeNode; click.EffectNode = node; executeCommandBase(click, CommandType.RemoveNoteEffect, UpdateType.UpdateMeasure, false, false); }
public void Clear() { PartNode = null; MeasureNodes.Clear(); ChordNodes.Clear(); NoteNodes.Clear(); EffectNode = null; }
public Selected() { PartNode = null; MeasureNodes = new List <MeasureTreeNode>(); ChordNodes = new List <ChordTreeNode>(); NoteNodes = new List <NoteTreeNode>(); EffectNode = null; }