public TableDocView(Form1 f, Table tbl) { InitializeComponent(); //tabControl1.TabPages.RemoveAt(0); //tabControl1.TabPages.RemoveAt(1); this.f = f; this.tbl = tbl; fdvLst = new List <FieldDocView>(); List <string> lst = tbl.GetFields(); labelName.Text = tbl.ToString(); //List<string> newComments = new List<string>(); List <string> comments = tbl.GetComments(); textBoxEng.Text = comments[0]; textBoxUkr.Text = comments[1]; textBoxRus.Text = comments[2]; for (int i = 0; i < lst.Count; i++) { Field fld = this.tbl.GetField(i); FieldDocView fdv = new FieldDocView(fld); fdvLst.Add(fdv); //f.AddFieldView(fdv); } }
public TableDocView(MainForm f, Table tbl, int selectedIndex) { InitializeComponent(); this.f = f; this.tbl = tbl; tabControl1.SelectedIndex = selectedIndex; fdvLst = new List <FieldDocView>(); List <string> lst = tbl.GetFields(); this.selectedIndex = selectedIndex; labelName.Text = tbl.ToString(); //List<string> newComments = new List<string>(); List <string> comments = tbl.GetComments(); textBoxEng.Text = comments[0]; textBoxUkr.Text = comments[1]; textBoxRus.Text = comments[2]; for (int i = 0; i < lst.Count; i++) { Field fld = this.tbl.GetField(i); FieldDocView fdv = new FieldDocView(fld, selectedIndex); fdvLst.Add(fdv); //f.AddFieldView(fdv); } }
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { tabControl1.TabPages[1].Controls.Clear(); flowLayoutPanel1.Controls.Clear(); if (e.Node.Level == 3) { Table tbl = (Table)e.Node.Tag; TableDoc tdc = new TableDoc(this, tbl, selectedIndex); //tdc.Show(); TableDocView tdv = new TableDocView(this, tbl, selectedIndex); flowLayoutPanel1.Controls.Add(tdv); List <FieldDocView> lst = tdv.GetFieldDocViewList(); foreach (FieldDocView fldDV in lst) { flowLayoutPanel1.Controls.Add(fldDV); } tabControl1.TabPages[1].Controls.Add(tdc);//данные из тега } if (e.Node.Level == 4) { Table tbl = (Table)e.Node.Parent.Tag; FieldDocView fdv = new FieldDocView(tbl.GetField(e.Node.Text), selectedIndex); //List<FieldDocView> lst = tdv.GetFieldDocViewList(); //foreach (FieldDocView fldDV in lst) flowLayoutPanel1.Controls.Add(fdv); //tabControl1.TabPages[1].Controls.Add(tdc);//данные из тега } }
public void AddFieldView(FieldDocView fdv) { flowLayoutPanel1.Controls.Add(fdv); }