C# 家谱树控制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5894/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Genealogy Tree Control
提问by Jay Mooney
I've been tasked (by my wife) with creating a program to allow her to track the family trees on both sides of our family.
我的妻子(由我的妻子)委托我创建一个程序,让她能够跟踪我们家庭双方的家谱。
Does anyone know of a cost-effective (free) control to represent this type of information?
有谁知道一种具有成本效益的(免费)控件来表示此类信息?
What I'm looking for is a modified org-chart type chart/tree. The modification is that any node should have 2 parent nodes (E.G. a child should have a Mother/Father).
我正在寻找的是经过修改的组织结构图类型图表/树。修改是任何节点都应该有 2 个父节点(例如一个孩子应该有一个母亲/父亲)。
The solution I've come up with so far is to have 2 trees, an ancestor tree and a descendants tree, with the individual being inspected as the root node for each tree. It works but is sort of clunky.
到目前为止,我想出的解决方案是有 2 棵树,一棵祖先树和一棵后代树,每个树的根节点都被检查为个体。它有效,但有点笨重。
I'm working primarily in c# WinForms, so .Net type controls or source code is preferable.
我主要在 c# WinForms 中工作,因此 .Net 类型控件或源代码更可取。
回答by lomaxx
I haven't thought too hard about this, but I reckon you could get a Custom Treeview in WPF to do what you want. I was reading an article on code project a while back that implemented an org chartthis way...
我没有想太多,但我认为你可以在 WPF 中获得自定义树视图来做你想做的事。不久前我正在阅读一篇关于代码项目的文章,它以这种方式实现了组织结构图......
回答by Adam Haile
I'm all for writing your own software when something doesn't suit your needs and a frequent re-inventer of the wheel. But this honestly seems like one of those things were the solution is readily available, in this case in the form of Family Tree MakerAnd at a mere $40 I would venture to guess that you'd come out ahead compared to the hours you would spend trying to get your own program doing exactly what you need.
当某些东西不适合您的需求并且经常重新发明轮子时,我完全赞成编写您自己的软件。但老实说,这似乎是其中之一,解决方案是现成的,在这种情况下是Family Tree Maker只需 40 美元,我敢猜测,与您花费的时间相比,您会领先一步试图让你自己的程序完全按照你的需要去做。
I currently use the software and it works great.
我目前使用该软件,效果很好。
Now, if your interest in writing it partly for the purpose of just doing it because you can and to learn something...then by all means I salute your will to learn and hope you find the control you are looking for.
现在,如果您对编写它的兴趣部分是为了做它,因为您可以并且学到一些东西……那么我无论如何都向您的学习意愿致敬,并希望您找到您正在寻找的控制。
回答by Donovan Woodside
If you're really looking for an application that you can modify try out Family.Showon CodePlex.
如果您真的在寻找可以修改的应用程序,请在 CodePlex 上尝试Family.Show。
回答by Donovan Woodside
Try GeneTree. You can open a free account and build a family tree interactively. You can also find others whose DNA matches yours, who may be family members you did not know about before.
试试基因树。您可以开设一个免费帐户并以交互方式构建家谱。您还可以找到与您的 DNA 相匹配的其他人,他们可能是您以前不认识的家庭成员。
If the functionality is already there, and free, why write a program?
如果功能已经存在并且免费,为什么要编写程序?
回答by Mat
There have been lots of suggestions of software to use, but I'd like to add a recommendation for The Master Genealogist. I find it fits my engineering mindset more than most.
已经有很多使用软件的建议,但我想为The Master Genealogist添加一个建议。我发现它比大多数人更适合我的工程思维。
There is little online to match the flexibility of standalone genealogy tools, but TNG(The Next Generation of Genealogy Sitebuilding) is quite good.
网上几乎没有与独立家谱工具的灵活性相匹配的灵活性,但TNG(下一代家谱网站建设)非常好。