Пример #1
0
        private void btnAddClass_Click(object sender, EventArgs e)
        {
            var tableClass     = tableLayoutShowClass;
            var tableContainer = tableLayoutContainerClass;



            //tableLayoutContainerClass.Controls.Clear();



            //tableClass.Dock = DockStyle.None;


            //tableLayoutContainerClass.Controls.Add(tableLayoutShowClass);

            //tableLayoutContainerClass.Controls.Add(FormUpdateClasse.Instance);
            //var panel = tableLayoutShowClass;

            //increase panel rows count by one

            //add a new RowStyle as a copy of the previous one

            /* ColumnStyle temp = tableContainer.ColumnStyles[tableContainer.ColumnCount-1];
             *
             * tableContainer.ColumnStyles.Remove(temp);
             * tableContainer.ColumnCount = 2;
             * tableContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 80F));
             * tableContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));*/

            //add your three controls



            FormUpdateClasse form = FormUpdateClasse.Instance;

            form.Dock = DockStyle.Fill;
            var table = new TableLayoutPanel();

            table.ColumnCount = 2;
            table.RowCount    = 1;

            table.Controls.Add(tableClass, 0, 0);
            table.Controls.Add(form, 1, 0);
            table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 300F));

            table.Dock = DockStyle.Fill;

            tableLayoutContainerClass.Controls.Clear();
            tableLayoutContainerClass.Controls.Add(table);
        }
Пример #2
0
        private void btnAddToFile_Click(object sender, EventArgs e)
        {
            var tableClass     = tableLayoutShowClass;
            var tableContainer = tableLayoutContainerClass;

            var form = FormUpdateClasse.Instance(this, getPath(), this.whatLevel);

            form.Dock = DockStyle.Fill;
            var table = new TableLayoutPanel();

            table.ColumnCount = 2;
            table.RowCount    = 1;

            table.Controls.Add(tableClass, 0, 0);
            table.Controls.Add(form, 1, 0);
            table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 300F));

            table.Dock = DockStyle.Fill;

            tableLayoutContainerClass.Controls.Clear();
            tableLayoutContainerClass.Controls.Add(table);
        }
Пример #3
0
        public static FormUpdateClasse Instance(SearchComponent search, string paths, bool whatLevel)
        {
            componentSearch = new FormUpdateClasse(search, paths, whatLevel);

            return(componentSearch);
        }