ACT Advanced Combat Tracker - MMORPG Log Parser Paypal
underwater

Getting the EncounterData objects selected in ACT

  1. List<EncounterData> encounters = new List<EncounterData>();
  2. if (ActGlobals.oFormActMain.MainTreeView.CheckBoxes)
  3. {
  4.     for (int z = 0; z < ActGlobals.oFormActMain.MainTreeView.Nodes.Count; z++)
  5.     {
  6.         for (int e = 0; e < ActGlobals.oFormActMain.MainTreeView.Nodes[z].Nodes.Count; e++)
  7.         {
  8.             TreeNode tn = ActGlobals.oFormActMain.MainTreeView.Nodes[z].Nodes[e];
  9.             if (tn.Checked)
  10.                 encounters.Add(ActGlobals.oFormActMain.ZoneList[z].Items[e]);
  11.         }
  12.     }
  13. }
  14. else
  15. {
  16.     if (ActGlobals.oFormActMain.MainTreeView.SelectedNode != null &&
  17.         ActGlobals.oFormActMain.MainTreeView.SelectedNode.Parent != null &&
  18.         ActGlobals.oFormActMain.MainTreeView.SelectedNode.Parent.Parent == null)
  19.         encounters.Add(ActGlobals.oFormActMain.ZoneList[ActGlobals.oFormActMain.MainTreeView.SelectedNode.Parent.Index].Items[ActGlobals.oFormActMain.MainTreeView.SelectedNode.Index]);
  20. }

Summary:

This will detect if Show Checkboxes is enabled or not, then either get the currently selected encounter or the encounters that have checked boxes.

A List of EncounterData objects will be populated.


HTML5 Powered with CSS3 / Styling, Graphics, 3D & Effects, and Semantics
Softpedia Clean Award
Random Background