private void FillPatientTree() { _samptree_patient = new VarTree(2, 35); tabControlSample.TabPages[0].Controls.Add(_samptree_patient.Root); _samptree_patient.Root.Size = new System.Drawing.Size(tabControlSample.TabPages[0].Size.Width - 10, 30); foreach (String str in Data.DataPatient.ColumnsText) _samptree_patient.Root.AddChild(new ExNode(str)); for (int i=0; i<_samptree_patient.Root.List.Count; i++) foreach (Data.Item item in Data.DataPatient.Columns[i]) { if (item.NType == Data.NodeType.Text) _samptree_patient.Root.List[i].AddChild(new VarNode(item.Name)); else if (item.NType == Data.NodeType.Combo) _samptree_patient.Root.List[i].AddChild(new ComboNode(item.Name, item.Answers)); } _samptree_patient.Show(); }
private void FillShipsTree() { _samptree_ships = new VarTree(2, 35); tabControlSample.TabPages[1].Controls.Add(_samptree_ships.Root); _samptree_ships.Root.Size = new System.Drawing.Size(tabControlSample.TabPages[1].Size.Width - 10, 30); foreach (Data.Item item in Data.DataShip.Common) _samptree_ships.Root.AddChild(new VarNode(item.Name));; _samptree_ships.Show(); }
private void FillOfficersTree() { _samptree_officers = new VarTree(2, 35); tabControlSample.TabPages[2].Controls.Add(_samptree_officers.Root); _samptree_officers.Root.Size = new System.Drawing.Size(tabControlSample.TabPages[1].Size.Width - 10, 30); _samptree_officers.Root.AddChild(new VarNode("Звание")); _samptree_officers.Root.AddChild(new VarNode("Имя офицера")); _samptree_officers.Root.AddChild(new VarNode("Фамилия офицера")); _samptree_officers.Root.AddChild(new VarNode("Отчества офицера")); _samptree_officers.Show(); }