Example - 4 generations:
Meliton I 1790 - 1875 | |||||||||||||
Karol 1831 - 1897 | |||||||||||||
Julia Marchocka 1806 - 1887 | |||||||||||||
Jerzy 1887 - 1969 | |||||||||||||
Teodor 1818 - 1892 | |||||||||||||
Maria Rudnicka 1849 - 1933 | |||||||||||||
Zofia Mrozowicka 1828 - 1903 | |||||||||||||
Jerzy Małachowski 1915 - 2004 | |||||||||||||
Karol 1794 - 1881 | |||||||||||||
Juljan 1858 - 1928 | |||||||||||||
Eleonora Roguska ok. 1820 - 1897 | |||||||||||||
Ewa Marchocka 1889 - 1923 | |||||||||||||
Meliton II 1828 - 1892 | |||||||||||||
Jadwiga Małachowska 1862 - 1916 | |||||||||||||
Leonida Łukomska 1840 - 1926 | |||||||||||||
Purpose: this library (pedigree.dll) returns html string for pedigree, drawn with help of html table.
In-parameters: in-data must be an object derived from interface IPedigreeData:
public interface IPedigreeData { string getLink(uint i); int size(); }
For diagram over n-generations, it must be 2n - 1
data, e.g. for two generation 1↦root (subject), 2↦father and 3↦mother.
And this is what getLink(1), getLink(2), getLink(3) must returns.
(See Ascending numbering systems Ahnentafel). Method size() returns 3.
For three generations you must furthermore supply 4↦father's father, 5↦f's mother, 6↦m's father
and 7↦m' mother. size() returns 7.
No error handling is supported. It must be at least 2 generation (size 3); max number of generation is limited by system memory and human ability to read the pedigree.
An easy example of using:
class Test { class PedigreeData : JaxaSoft.se.IPedigreeData { Dictionary<uint, string> data = new Dictionary<uint, string>(); public void add(uint i, string name) { data.Add(i, name); } public string getLink(uint i) { return data[i]; } public int size() { return data.Count; } } public static void Main() { pedigreeData pdata = new PedigreeData(); pdata.add(1, "me"); pdata.add(2, "dad"); pdata.add(3, "mom"); JaxaSoft.se.MakePedigree mp = new JaxaSoft.se.MakePedigree(); string sPedigree = mp.getPedigreeStr(pdata); // use sPedigree ... } }Here is "zip" file pedigree.zip with dll, its source file and style file (which is necessary to show pedigree correctly).