using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace cardvisa
{
    public partial class MyListBox : Form
    {
        public MyListBox()
        {
            InitializeComponent();
        }
        private void MyListBox_Load(object sender, EventArgs e)
        {
            MyCheckTable cb = new MyCheckTable();
            cb.Location = new Point(5, 30);
            cb.Visible = true;
            Controls.Add(cb);
        }
    }
    public class MyCheckTable:Panel
    {
        public List<MyCheckBoxRow> myCheckBoxRows{ get; set; } = new List<MyCheckBoxRow>();
        public List<Label> myLabels { get; set; } = new List<Label>();
        public MyCheckTable(){
            Width = 400;
            Height = 550;
            for(int i = 0; i < 20; i++)
            {
                MyCheckBoxRow mbr = new MyCheckBoxRow();                
                mbr.Location = new Point(5, i * 20);
                mbr.Visible = true;
                mbr.Height = 20;
                myCheckBoxRows.Add(mbr);
            }
            FillAllData();
        }
        public void FillAllData()
        {
            myCheckBoxRows.ForEach(x => Controls.Add(x));
        }
    }
    public class MyCheckBoxRow:Panel { 
        public MyCheckBoxCell myCheckBoxCell { get; set; } =new MyCheckBoxCell();
        public MyCheckBoxRow()
        {
            Width = 400;
            Label lb = new Label();
            lb.Text = "厨王标记：";
            lb.Size = new Size(65, 20);
            lb.Location = new Point(5 , 5);
            lb.Visible = true;
            Controls.Add(lb);
            for (int i = 0;i < 7;i++)
            {
                CheckBox cbc = new CheckBox();
                cbc.Size = new Size(20, 20);
                cbc.Location = new Point(70 + i * 25,2);
                cbc.Visible = true;
                Controls.Add(cbc);
            }
        }
    
    }
    public class MyCheckBoxCell:CheckBox { 
        //打点
        //抗性
        //解场
        //无效
        //封锁
        //特招
        //检索
        //回收
        //二速
    }
}
