using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Reflection;
using System.IO;
using Mesnac.Controls.Base;

namespace Mesnac.Controls.Default
{
    [ToolboxBitmap(typeof(StorageBin), "Resources.WARE0.png")]
    public partial class StorageBin : Button
    {
        #region 字段定义

        protected Assembly _assembly = Assembly.GetExecutingAssembly();
        protected Stream _imageStream;
        private List<DesignAction> _clickActionList = new List<DesignAction>();
        private int _sbvNumber = 0;

        public int SbvNumber
        {
            get { return _sbvNumber; }
            set { _sbvNumber = value; }
        }

        #endregion

        #region 构造方法

        public StorageBin()
        {
            InitializeComponent();
            this.Size = new Size(149, 270);
            this.BackColor = Color.Transparent; //背景透明
            this.FlatStyle = System.Windows.Forms.FlatStyle.Flat;   //显示样式
            this.FlatAppearance.BorderSize = 0; //边框为0
            this.FlatAppearance.MouseOverBackColor = Color.Transparent;
            this.FlatAppearance.MouseDownBackColor = Color.Transparent;
            _imageStream = _assembly.GetManifestResourceStream("Mesnac.Controls.Default.Resources.WARE0.png");
            this.BackgroundImage = Image.FromStream(_imageStream);
            this.BackgroundImageLayout = ImageLayout.Stretch;
            this.Text = "";
        }

        public StorageBin(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }

        #endregion

        #region 事件属性Click
        public List<DesignAction> ClickActionList
        {
            get
            {
                return this._clickActionList;
            }
            set
            {
                this._clickActionList = value;
            }
        }
        #endregion
    }
}