IterateHunts() public static method

public static IterateHunts ( ) : IEnumerable
return IEnumerable
示例#1
0
        public void InitializeHuntDisplay(int activeHuntIndex)
        {
            MainForm.mainForm.skip_hunt_refresh = true;

            huntList.Items.Clear();
            foreach (Hunt h in HuntManager.IterateHunts())
            {
                huntList.Items.Add(h.name);
            }
            MainForm.mainForm.skip_hunt_refresh = false;

            huntList.SelectedIndex      = activeHuntIndex;
            huntList.ItemsChanged      += HuntList_ItemsChanged;
            huntList.ChangeTextOnly     = true;
            huntList.AttemptDeleteItem += HuntList_AttemptDeleteItem;
            huntList.AttemptNewItem    += HuntList_AttemptNewItem;
        }
示例#2
0
        public void refreshHunts(bool refreshSelection = false)
        {
            Hunt h           = getSelectedHunt();
            int  currentHunt = 0;

            MainForm.mainForm.skip_hunt_refresh = true;

            huntList.Items.Clear();
            foreach (Hunt hunt in HuntManager.IterateHunts())
            {
                huntList.Items.Add(hunt.name);
                if (hunt == h)
                {
                    currentHunt = huntList.Items.Count - 1;
                }
            }
            huntList.SelectedIndex = refreshSelection ? 0 : currentHunt;

            MainForm.mainForm.skip_hunt_refresh = false;
            huntBox_SelectedIndexChanged(huntList, null);
        }