本文整理汇总了C#中System.Data.Node类的典型用法代码示例。如果您正苦于以下问题:C# Node类的具体用法?C# Node怎么用?C# Node使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Node类属于System.Data命名空间,在下文中一共展示了Node类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:Samana,项目名称:Pyramid,代码行数:35,代码来源:CFGWidget.cs
示例2: SecurityHandler
internal SecurityHandler(Node node)
{
if (node == null)
throw new ArgumentNullException("node");
_node = node;
}
开发者ID:maxpavlov,项目名称:FlexNet,代码行数:7,代码来源:SecurityHandler.cs
示例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;
}
}
}
}
开发者ID:pkt-ps,项目名称:BVHViewer,代码行数:35,代码来源:Form1.cs
示例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.";
}
开发者ID:killua781021,项目名称:Simulation,代码行数:26,代码来源:Form1.cs
示例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;
}
开发者ID:unicomp21,项目名称:Node.cs,代码行数:8,代码来源:Form1.cs
示例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);
}
开发者ID:sdsaoo,项目名称:Class,代码行数:8,代码来源:function.cs
示例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();
}
开发者ID:skyquery,项目名称:graywulf,代码行数:8,代码来源:SqlServerCodeGenerator.cs
示例8: CalculateBoardScore
private void CalculateBoardScore(Node<BoardState> node )
{
node.Data.calculateBoardScore();
foreach (var childNode in node.ChildrenList)
{
CalculateBoardScore(childNode);
}
}
开发者ID:ModerateWinGuy,项目名称:ADS,代码行数:8,代码来源:Form1.cs
示例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;
}
开发者ID:scaardog,项目名称:TOAU2_NetworkPlanning,代码行数:8,代码来源:Form_weight.cs
示例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.");
}
开发者ID:sleemjm1,项目名称:IN710-sleemjm1,代码行数:9,代码来源:Form1.cs
示例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;
}
}
开发者ID:ishani,项目名称:VSOExp,代码行数:10,代码来源:SimpleExample.cs
示例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);
}
开发者ID:ModerateWinGuy,项目名称:ADS,代码行数:10,代码来源:Form1.cs
示例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;
}
开发者ID:hhergeth,项目名称:RisenEditor,代码行数:11,代码来源:gCNavigation_PS_Modifier.cs
示例14: cycleBoxes
public void cycleBoxes(Node<BoardState> node)
{
setImageBoxes(node.Data);
Application.DoEvents();
Thread.Sleep(50);
foreach (var childNode in node.ChildrenList)
{
cycleBoxes(childNode);
}
}
开发者ID:ModerateWinGuy,项目名称:ADS,代码行数:11,代码来源:Form1.cs
示例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();
}
开发者ID:nitinthewiz,项目名称:Nodepad,代码行数:12,代码来源:Editor.cs
示例16: AddNode
private void AddNode(TreeNode fromView, Node<string> n)
{
var node = fromView.Nodes.Add(n.Value);
if (n.Children.Count > 0)
{
foreach (var token in n.Children)
{
AddNode(node, token);
}
}
}
开发者ID:predator5047,项目名称:recursive-descent,代码行数:12,代码来源:Form1.cs
示例17: PlayForm
//以下是窗体控制内容
public PlayForm()
{
InitializeComponent();
outputStack = new Stack<string>();
begainNode = new Node();
targetNode = new Node();
AddWeghit();
InitMyData();
InitMyParam();
UnEnableMyForm();
resetStartEndState();
}
开发者ID:xgdsmileboy,项目名称:CSharp-Lib,代码行数:13,代码来源:PlayForm.cs
示例18: WriteNode
private void WriteNode(Node<NodeType> node, int indent)
{
foreach (Node<NodeType> child in node.Children)
{
nodes.Text += Environment.NewLine +
new string(' ', indent * 4) +
child.NodeType +
(child.Text == "" ? "" : ":" + child.Text);
WriteNode(child, indent + 1);
}
}
开发者ID:danthomas,项目名称:Parsing,代码行数:12,代码来源:Form1.cs
示例19: ConstructTreeNode
/// <summary>
/// 左ペインのつりーノードの表示
/// </summary>
/// <param name="treeNode"></param>
/// <param name="node"></param>
void ConstructTreeNode(TreeNode treeNode, Node node)
{
if (treeNode == null) {
treeNode = treeView1.Nodes.Add (node.UniqueID.ToString (), node.Name);
}
else {
treeNode = treeNode.Nodes.Add (node.UniqueID.ToString (), node.Name);
}
treeNode.Tag = node;
foreach (var child in node.Children) {
ConstructTreeNode (treeNode, child);
}
}
开发者ID:weimingtom,项目名称:erica,代码行数:19,代码来源:SceneView.cs
示例20: Add
public void Add(BaseItem item)
{
if (_currentItem == item) return;
Node node = new Node(item.Name);
_items.Add(node, item);
if (_currentNode != null)
{
if (_currentNode.NextNode == null)
{
Node parent = _currentNode.Parent;
if (parent != null)
{
parent.Nodes.Add(node);
node.Parent = parent;
}
else
{
_model.Nodes.Add(node);
}
}
else
{
Node parent = _currentNode;
parent.Nodes.Add(node);
node.Parent = parent;
}
}
else
{
_model.Nodes.Add(node);
}
_currentItem = item;
_currentNode = node;
try
{
_ignoreSelect = true;
_treeView.SelectedNode = _treeView.FindNode(_model.GetPath(node));
}
finally
{
_ignoreSelect = false;
}
SetCaption();
}
开发者ID:mayatforest,项目名称:Refractor,代码行数:50,代码来源:HistoryBrowser.cs
注:本文中的System.Data.Node类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论