Esempio n. 1
0
        private void 添加属性ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var goodsEnumNatrues = new GoodsEnumNatrues();

            goodsEnumNatrues.Deleted += GoodsEnumNatrues_Deleted;
            this.flowLayoutPanel1.Controls.Add(goodsEnumNatrues);
            this.flowLayoutPanel1.Height += goodsEnumNatrues.Height + 5;
            EnumNatures.Add(goodsEnumNatrues);
            RefreshScrollBar();
        }
Esempio n. 2
0
        /// <summary>
        /// 自动添加
        /// </summary>
        /// <param name="goodsAbility"></param>

        private void AddAbilityAuto(GoodsAbility goodsAbility)
        {
            var goodsEnumNatrues = new GoodsEnumNatrues();

            goodsEnumNatrues.GoodsAbility = goodsAbility;
            goodsEnumNatrues.Deleted     += GoodsEnumNatrues_Deleted;
            this.flowLayoutPanel1.Controls.Add(goodsEnumNatrues);
            this.flowLayoutPanel1.Height += goodsEnumNatrues.Height + 5;
            EnumNatures.Add(goodsEnumNatrues);
            RefreshScrollBar();
        }
Esempio n. 3
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="obj"></param>
 private void GoodsEnumNatrues_Deleted(GoodsEnumNatrues obj)
 {
     EnumNatures.Remove(obj);
     this.flowLayoutPanel1.Controls.Remove(obj);
 }