コード例 #1
0
ファイル: frmItemPicker.cs プロジェクト: zyphrus/dire
        private void button1_Click(object sender, EventArgs e)
        {
            BuildTab b = new BuildTab(Microsoft.VisualBasic.Interaction.InputBox( "Enter Group Name" , "DIRE -Build"));

            b.ItemList.LargeImageList = GListBox1.ImageList;
            b.ItemList.SmallImageList = GListBox1.ImageList;
            tabControl1.Controls.Add(b);
        }
コード例 #2
0
ファイル: frmItemPicker.cs プロジェクト: zyphrus/dire
        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);
            }
        }
コード例 #3
0
ファイル: frmItemPicker.cs プロジェクト: zyphrus/dire
        private void AddNewBuildtab(string name)
        {
            BuildTab b = new BuildTab(name);

            //Add ImageList to the tab
            b.ItemList.LargeImageList = this.GListBox1.ImageList;
            b.ItemList.SmallImageList = this.GListBox1.ImageList;
            tabControl1.Controls.Add(b);
        }