コード例 #1
0
        private void Add()
        {
            int n = list.Count;
            UserControlEditList fin = list[n - 1];

            for (int i = 0; i < n; i++)
            {
                list[i].Height += height;
            }
            UserControlEditList uc = new UserControlEditList(list);

            uc.Dock           = DockStyle.Fill;
            uc.labelText.Font = labelText.Font;
            fin.panelCenter.Controls.Add(uc);
        }
コード例 #2
0
        void Remove()
        {
            if (list.Count == 1)
            {
                return;
            }
            int n = list.Count;
            UserControlEditList fin = list[n - 1];
            UserControlEditList pre = list[n - 2];

            pre.panelCenter.Controls.Remove(fin);
            list.Remove(fin);
            for (int i = 0; i < list.Count; i++)
            {
                list[i].Height -= height;
            }
        }