本文介绍了如何在WPF中绘制此图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
看我有这个自动化,我想在WPF画画
这个由Glee图书馆自动绘制
dc622.4shared.com/img/0OIX8kM5/s3/0.11668664732174261/Auto.PNG
此代码由Glee绘制
private void Drawing(){
图表g = new 图形( label);
foreach (状态在状态){
if (state.Is_Start)
{
g.AddNode(state.Name).Attr.Color = Microsoft.Glee.Drawing.Color.Orange;
}
其他 if (state.Is_Finish){
g .AddNode(state.Name).Attr.Shape = Microsoft.Glee.Drawing.Shape.DoubleCircle;
}
else {
g.AddNode(state.Name);
}
if (state.MyLinks!= null )
foreach (Link_State link in state.MyLinks){
g.AddEdge( state.Name,link.ValueLink.ToString(),link.MyLinkState.Name);
}
gViewer.Graph = g;
}
}
类州内容
字符串名称;
bool is_Finish;
bool is_Start;
列表< Link_State> myLinks;
class Link_State内容
状态myLinkState;
char valueLink;
请帮助.....
解决方案
Hi everyone
look i have this automate and i want Draw it in WPF
this Automate Draw by Glee library
dc622.4shared.com/img/0OIX8kM5/s3/0.11668664732174261/Auto.PNG
this code for Draw by Glee
private void Drawing() { Graph g = new Graph("label"); foreach (State state in states) { if (state.Is_Start) { g.AddNode(state.Name).Attr.Color = Microsoft.Glee.Drawing.Color.Orange; } else if (state.Is_Finish) { g.AddNode(state.Name).Attr.Shape = Microsoft.Glee.Drawing.Shape.DoubleCircle; } else { g.AddNode(state.Name); } if (state.MyLinks != null) foreach (Link_State link in state.MyLinks) { g.AddEdge(state.Name, link.ValueLink.ToString(), link.MyLinkState.Name); } gViewer.Graph = g; } }
class State content
string name; bool is_Finish; bool is_Start; List<Link_State> myLinks;
class Link_State content
State myLinkState;
char valueLink;
please help.....
解决方案
这篇关于如何在WPF中绘制此图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!