Esempio n. 1
0
 public frmItemPicker(string Author, string Title , Hero hero , frmHeroPicker caller)
 {
     InitializeComponent();
     Build = this;
     this.author = Author;
     this.title = Title;
     this.hero = hero;
      this.Caller = caller;
 }
Esempio n. 2
0
        public frmSkillBuild()
        {
            InitializeComponent();

            HeroFetcher.GenerateObjects();
            AbilitiesFetcher.GenerateObjects();

            hero = HeroFetcher.AllHeros[new Random().Next(0, HeroFetcher.AllHeros.Length)];
            //hero = HeroFetcher.ResloveDotaNameToHero("enchantress");
        }
Esempio n. 3
0
 public build(Hero Hero, string Author, string Title, List<group> Items)
 {
     //What Hero is it for
     hero = Hero;
     //Who made it
     author = Author;
     //Build Name
     title = Title;
     //Build Items and groups
     this.items = Items;
 }
Esempio n. 4
0
        public void LoadBuild(build Build)
        {
            this.title = Build.Title;
            this.hero = Build.Hero;
            this.author = Build.Author;

            //Imageindex
            int n = 0;
            try
            {
                foreach (Item it in ItemFetcher.AllItems)
                {
                    it.ImageListIndex = n;
                    n++;

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error while loading files. Please verify cache and try again.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            Image pic = Image.FromFile(hero.ImagePath);
            this.HeroNameLabel.Text = hero.Name + " - " + title;
            pictureBox1.Image = pic;

            foreach (group g in Build.Items)
            {
                //Add item Groups
                BuildTab b = new BuildTab(g);

                b.ItemList.LargeImageList = this.GListBox1.ImageList;
                b.ItemList.SmallImageList = this.GListBox1.ImageList;
                tabControl1.Controls.Add(b);
            }
        }
Esempio n. 5
0
 public frmSkillBuild(Hero Hero)
 {
     InitializeComponent();
     this.hero = Hero;
 }