Ejemplo n.º 1
0
 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);//данные из тега
     }
 }
Ejemplo n.º 2
0
        public void SaveChangesTable()
        {
            Table         tbl          = (Table)treeView1.SelectedNode.Tag;
            List <string> comments     = new List <string>();
            TableDoc      tdf          = (TableDoc)tabControl1.TabPages[1].Controls[0];
            List <string> commentsForm = tdf.GetComments();

            foreach (string comment in commentsForm)
            {
                comments.Add(comment);
            }
            tbl.addComments(comments);
        }
Ejemplo n.º 3
0
        public FieldDoc(Field fldInfo, TableDoc docForm, int selectedIndex)
        {
            InitializeComponent();
            fld               = fldInfo;
            labelName.Text    = fld.ToString();
            labelType.Text    = fld.type;
            labelNull.Text    = fld.isNull.ToString();
            labelDefault.Text = fld.defaultValue;
            tableForm         = docForm;

            List <string> comments = fldInfo.GetComments();

            textBoxEng.Text           = comments[0];
            textBoxUkr.Text           = comments[1];
            textBoxRus.Text           = comments[2];
            tabControl1.SelectedIndex = selectedIndex;
        }
Ejemplo n.º 4
0
        public FieldDoc(Field fldInfo, TableDoc docForm)
        {
            InitializeComponent();
            //tabControl1.TabPages.RemoveAt(0);
            //tabControl1.TabPages.RemoveAt(2);
            fld               = fldInfo;
            labelName.Text    = fld.ToString();
            labelType.Text    = fld.type;
            labelNull.Text    = fld.isNull.ToString();
            labelDefault.Text = fld.defaultValue;
            tableForm         = docForm;

            List <string> comments = fldInfo.GetComments();

            textBoxEng.Text = comments[0];
            textBoxUkr.Text = comments[1];
            textBoxRus.Text = comments[2];
        }