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; }
public frmSkillBuild() { InitializeComponent(); HeroFetcher.GenerateObjects(); AbilitiesFetcher.GenerateObjects(); hero = HeroFetcher.AllHeros[new Random().Next(0, HeroFetcher.AllHeros.Length)]; //hero = HeroFetcher.ResloveDotaNameToHero("enchantress"); }
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; }
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); } }
public frmSkillBuild(Hero Hero) { InitializeComponent(); this.hero = Hero; }