Пример #1
0
 private TreeNode Create(RetrieveFieldsViewAdapter.Node n)
 {
     var tn = new TreeNode(n.Text) { Tag = n };
     if (n.HasChildren)
         tn.Nodes.Add(new TempNode());
     return tn;
 }
Пример #2
0
 private void Add(RetrieveFieldsViewAdapter.Node node)
 {
     var added = Adapter.Add(node);
     lstCustom.SelectedItems.Clear();
     foreach (var f in added)
         lstCustom.SelectedItems.Add(f);
 }
Пример #3
0
        public RetrieveFieldsView(RetrieveFieldsViewAdapter adapter)
        {
            InitializeComponent();

            Adapter = adapter;
            bsAdapter.DataSource = adapter;

            // initialise the tree
            foreach (var n in Adapter.GetChildren())
                tree.Nodes.Add(Create(n));
        }
Пример #4
0
        public RetrieveFieldsView(RetrieveFieldsViewAdapter adapter)
        {
            InitializeComponent();

            Adapter = adapter;
            bsAdapter.DataSource = adapter;

            // initialise the tree
            foreach (var n in Adapter.GetChildren())
            {
                tree.Nodes.Add(Create(n));
            }
        }