本文整理汇总了C#中System.Data.Node类的典型用法代码示例。如果您正苦于以下问题:C# Node类的具体用法?C# Node怎么用?C# Node使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Node类属于System.Data命名空间,在下文中一共展示了Node类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetProgram
public void SetProgram(List<Loop> loops, List<BasicBlock> blocks)
{
// build DAG of basic blocks
// excluding backedges
Graph g = new Graph();
Dictionary<BasicBlock, Node> NodeMap = new Dictionary<BasicBlock, Node>();
foreach (BasicBlock b in blocks)
{
Node n = new Node(b);
g.AddNode(n);
NodeMap.Add(b,n);
}
foreach (BasicBlock b in blocks)
foreach (BasicBlock s in b.Successors)
if (!s.Dominates(b))
g.AddEdge(NodeMap[b], NodeMap[s]);
// walk over loops inner to outer
// for each loop, replace its contents with a single "super-node"
foreach( Loop l in loops )
{
Node[] loopNodes = new Node[l.BlockCount];
int n = 0;
foreach (BasicBlock b in l.Blocks)
loopNodes[n++] = NodeMap[b];
g.CombineNodes(loopNodes,l);
}
// now populate the tree view with loops and branches
TreeNode root = new TreeNode("program");
BuildTree(root, g);
treeView1.Nodes.Add(root);
}
示例2: SecurityHandler
internal SecurityHandler(Node node)
{
if (node == null)
throw new ArgumentNullException("node");
_node = node;
}
示例3: setBVH
/** --------------------------------------------
* @brief BVH構造を取得
* @return void
* --------------------------------------------*/
private void setBVH()
{
if (_bvh == null) return;
if (_bvh.IsEnable == false) return;
// 仮格納
foreach (var node in _bvh.GetNodeList())
{
Node n = new Node();
n.name = node.Name;
n.parentName = (node.Parent != null) ? node.Parent.Name : "";
n.localPos = new Vector3(node.Offset.X, node.Offset.Y, node.Offset.Z) * SCALE;
_nodeList.Add(n);
}
// 親インスタンスを探索、格納
foreach (var node in _nodeList)
{
foreach (var n in _nodeList)
{
if (node.parentName == n.name)
{
node.parent = n;
break;
}
}
}
}
示例4: Constructure_Click
private void Constructure_Click(object sender, EventArgs e)
{
node = new Node[275];
for (int i = 0; i < 275; i++)
{
node[i] = new Node();
node[i].Visit = new double[530];
node[i].VTotal = 0;
node[i].FTable = new double[530];
node[i].current = 0;
node[i].Rank = 0;
}
packet = new Packet[21];
for (int j = 0; j < 21; j++)
{
packet[j] = new Packet();
packet[j].current = 0;
packet[j].so = 0;
packet[j].des = 0;
packet[j].Rank = 0;
packet[j].transtime = 0;
packet[j].fin = false;
}
state.Text = "Construct over.";
}
示例5: SubscribeCallback
private void SubscribeCallback(
string topic, Node.Lib.Message snap_shot, Node.Lib.Message update)
{
string val;
if(null != update)
if (update.TryGetValue("counter", out val))
txtOutput.Text = val;
}
示例6: Button
public static void Button(Node node)
{
node.button.BackColor = Color.White;
if (node.Left != null)
Button(node.Left);
if (node.Right != null)
Button(node.Right);
}
示例7: GetCode
public static string GetCode(Node node, bool resolvedNames)
{
var sw = new StringWriter();
var cg = new SqlServerCodeGenerator();
cg.ResolveNames = resolvedNames;
cg.Execute(sw, node);
return sw.ToString();
}
示例8: CalculateBoardScore
private void CalculateBoardScore(Node<BoardState> node )
{
node.Data.calculateBoardScore();
foreach (var childNode in node.ChildrenList)
{
CalculateBoardScore(childNode);
}
}
示例9: Form_weight
public Form_weight(List<Link> links, char NameLink, Node nodeOut, Node nodeIn)
{
InitializeComponent();
this.links = links;
this.NameLink = NameLink;
this.nodeIn = nodeIn;
this.nodeOut = nodeOut;
}
示例10: btnPush_Click
private void btnPush_Click(object sender, EventArgs e)
{
if (txtPush.Text != "")
{
Node newNode = new Node(txtPush.Text);
stack.Push(newNode);
}
else MessageBox.Show("Cannot enter empty string.");
}
示例11: AddChildClick
private void AddChildClick(object sender, EventArgs e)
{
if (_tree.SelectedNode != null)
{
Node parent = _tree.SelectedNode.Tag as Node;
Node node = new Node("child" + parent.Nodes.Count.ToString());
parent.Nodes.Add(node);
_tree.SelectedNode.IsExpanded = true;
}
}
示例12: Form1
public Form1()
{
InitializeComponent();
pictureBoxs = this.Controls.OfType<PictureBox>().ToList();
cross = Image.FromFile("cross.png");
nought = Image.FromFile("nought.png");
boardTree = new Node<BoardState>(BoardState.getEmptyBord());
populateNode(boardTree);
CalculateBoardScore(boardTree);
}
示例13: handleMouseDown
bool handleMouseDown(MouseEventArgs e, Vector3 v, Node q)
{
if (q.Tag == null || (q.Tag as ILrentObject.ObjectTagger).Object == null)
return false;
label8.Visible = false;
((lastLabel as Label).Tag as eCEntityProxy).Entity = (q.Tag as ILrentObject.ObjectTagger).Object;
lastLabel.Text = ((lastLabel as Label).Tag as eCEntityProxy).Entity.ToString();
(Parent as PoperContainer).CAN_CLOSE = true;
P.OnBufferClick = null;
return false;
}
示例14: cycleBoxes
public void cycleBoxes(Node<BoardState> node)
{
setImageBoxes(node.Data);
Application.DoEvents();
Thread.Sleep(50);
foreach (var childNode in node.ChildrenList)
{
cycleBoxes(childNode);
}
}
示例15: load_document
public void load_document(Node root)
{
this.DocumentRoot = root;
this.DocumentRoot.RealRenameDisabled = true;
this.nodeTreeView.Nodes[0].Text = this.DocumentRoot.Name;
build_node_tree(this.DocumentRoot, this.nodeTreeView.Nodes[0]);
this.nodeTreeView.SelectedNode = this.nodeTreeView.Nodes[0];
load_node(this.DocumentRoot);
refresh_enabled_states();
}