コード例 #1
0
        public ListControl(Panel p)
        {
            InitializeComponent();

            owner = p;

            Height = 0;
            flowLayoutPanel1.Height = 0;
            LeftNumPanel.Height     = 0;
            LeftPanel.Height        = 0;
            MiddlePanel.Height      = 0;
            RightPanel.Height       = 0;

            LeftNumPanel.Width       = N_ListCell.width;
            LeftNumPanel.MinimumSize = new Size(LeftNumPanel.Width, 0);
            LeftPanel.Width          = L_ListCell.width;
            LeftPanel.MinimumSize    = new Size(LeftPanel.Width, 0);
            MiddlePanel.Width        = MiddleWidth;
            MiddlePanel.MinimumSize  = new Size(MiddlePanel.Width, 0);
            RightPanel.Width         = R_ListCell.width;
            RightPanel.MinimumSize   = new Size(RightPanel.Width, 0);

            MinimumSize = new Size(listWidth, listHeight);
            flowLayoutPanel1.MinimumSize = new Size(listWidth, listHeight);

            DoubleBuffered = true;
            PropertyInfo info0 = this.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            info0.SetValue(LeftNumPanel, true, null);
            PropertyInfo info1 = this.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            info1.SetValue(LeftPanel, true, null);
            PropertyInfo info2 = this.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            info2.SetValue(MiddlePanel, true, null);
            PropertyInfo info3 = this.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            info3.SetValue(RightPanel, true, null);
            setBackground(Color.White);
            //setBackground(Color.FromArgb(200, 200, 200));

            cm = new CellManager(this, LeftNumPanel.Controls, LeftPanel.Controls, MiddlePanel.Controls, RightPanel.Controls);

            LeftPanel.Click   += clickToCleanFocus;
            MiddlePanel.Click += clickToCleanFocus;
            RightPanel.Click  += clickToCleanFocus;
            Click             += clickToCleanFocus;
        }
コード例 #2
0
ファイル: MiddleCell.cs プロジェクト: miraco120226/AnimeTitle
 public MiddleCell(ListControl owner)
 {
     InitializeComponent();
     lc = owner;
     cm = lc.cm;
 }