Beispiel #1
0
        void AddSchemaTree(LoadableTable table, TreeListNode parentNode)
        {
            var node = schemaTree.AppendNode(new object[] { table.Schema.Name, null }, parentNode, table);

            tableNodes.Add(node, table);

            foreach (var child in table.Schema.ChildRelations.Select(cr => schemaTables[cr.ChildSchema]))
            {
                AddSchemaTree(child, node);
            }
        }
Beispiel #2
0
        void LoadTable(LoadableTable table, Action callback = null)
        {
            var nodes = GetNodes(table).ToArray();

            table.Load(delegate {
                string caption = table.Table.Rows.Count == 1 ? "1 Row" : table.Table.Rows.Count + " Rows";
                foreach (var node in nodes)
                {
                    node.SetValue(colContent, caption);
                }
                UpdateLoadAllButton();

                if (callback != null)
                {
                    callback();
                }
            });
            schemaTree.HideEditor();
            schemaTree.InvalidateNodes();
            UpdateLoadAllButton();
        }
Beispiel #3
0
 IEnumerable <TreeListNode> GetNodes(LoadableTable table)
 {
     return(tableNodes.Where(kvp => kvp.Value == table).Select(kvp => kvp.Key));
 }
Beispiel #4
0
        void LoadTable(LoadableTable table, Action callback = null)
        {
            var nodes = GetNodes(table).ToArray();

            table.Load(delegate {
                string caption = table.Table.Rows.Count == 1 ? "1 Row" : table.Table.Rows.Count + " Rows";
                foreach (var node in nodes)
                    node.SetValue(colContent, caption);
                UpdateLoadAllButton();

                if (callback != null) callback();
            });
            schemaTree.HideEditor();
            schemaTree.InvalidateNodes();
            UpdateLoadAllButton();
        }
Beispiel #5
0
 IEnumerable<TreeListNode> GetNodes(LoadableTable table)
 {
     return tableNodes.Where(kvp => kvp.Value == table).Select(kvp => kvp.Key);
 }
Beispiel #6
0
        void AddSchemaTree(LoadableTable table, TreeListNode parentNode)
        {
            var node = schemaTree.AppendNode(new object[] { table.Schema.Name, null }, parentNode, table);
            tableNodes.Add(node, table);

            foreach (var child in table.Schema.ChildRelations.Select(cr => schemaTables[cr.ChildSchema]))
                AddSchemaTree(child, node);
        }