-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
3,920 additions
and
3,919 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,102 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
|
||
namespace FamilyTreeLibrary.FamilyData | ||
{ | ||
[DataContract] | ||
public class AddressPartClass | ||
{ | ||
public enum AddressPartType | ||
{ | ||
//Unknown, | ||
|
||
StreetAddress, | ||
Line1, | ||
Line2, | ||
City, | ||
PostCode, | ||
//Place, | ||
//Location, | ||
State, | ||
//County, // gedcom Geni.com | ||
Country, | ||
|
||
PhoneNumber, | ||
//EmailAddress, | ||
//WebAddress, | ||
|
||
//Note | ||
} | ||
[DataMember] | ||
private AddressPartType type; | ||
[DataMember] | ||
private String address; | ||
|
||
public AddressPartClass(AddressPartType inType, String inAddress) | ||
{ | ||
type = inType; | ||
address = inAddress; | ||
|
||
} | ||
public override string ToString() | ||
{ | ||
return address; | ||
} | ||
public AddressPartType GetAddressPartType() | ||
{ | ||
return type; | ||
} | ||
} | ||
[DataContract] | ||
public class AddressClass | ||
{ | ||
[DataMember] | ||
private IList<AddressPartClass> addressList; | ||
|
||
public AddressClass() | ||
{ | ||
addressList = new List<AddressPartClass>(); | ||
|
||
} | ||
public void AddAddressPart(AddressPartClass.AddressPartType inType, String inAddress) | ||
{ | ||
AddressPartClass addressPart = new AddressPartClass(inType, inAddress); | ||
addressList.Add(addressPart); | ||
|
||
} | ||
public void AddAddressPart(AddressPartClass inAddress) | ||
{ | ||
addressList.Add(inAddress); | ||
|
||
} | ||
public IList<AddressPartClass> GetAddressPartList() | ||
{ | ||
return addressList; | ||
} | ||
public AddressPartClass GetAddressPart(AddressPartClass.AddressPartType type) | ||
{ | ||
if (addressList != null) | ||
{ | ||
foreach (AddressPartClass addressPart in addressList) | ||
{ | ||
if (addressPart.GetAddressPartType() == type) | ||
{ | ||
return addressPart; | ||
} | ||
} | ||
} | ||
return null; | ||
} | ||
public override string ToString() | ||
{ | ||
string tString = ""; | ||
|
||
foreach (AddressPartClass addressPart in addressList) | ||
{ | ||
tString += " " + addressPart.ToString(); | ||
} | ||
return tString; | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Ekmansoft.FamilyTree.Library.FamilyData | ||
{ | ||
[DataContract] | ||
public class AddressPartClass | ||
{ | ||
public enum AddressPartType | ||
{ | ||
//Unknown, | ||
|
||
StreetAddress, | ||
Line1, | ||
Line2, | ||
City, | ||
PostCode, | ||
//Place, | ||
//Location, | ||
State, | ||
//County, // gedcom Geni.com | ||
Country, | ||
|
||
PhoneNumber, | ||
//EmailAddress, | ||
//WebAddress, | ||
|
||
//Note | ||
} | ||
[DataMember] | ||
private AddressPartType type; | ||
[DataMember] | ||
private String address; | ||
|
||
public AddressPartClass(AddressPartType inType, String inAddress) | ||
{ | ||
type = inType; | ||
address = inAddress; | ||
|
||
} | ||
public override string ToString() | ||
{ | ||
return address; | ||
} | ||
public AddressPartType GetAddressPartType() | ||
{ | ||
return type; | ||
} | ||
} | ||
[DataContract] | ||
public class AddressClass | ||
{ | ||
[DataMember] | ||
private IList<AddressPartClass> addressList; | ||
|
||
public AddressClass() | ||
{ | ||
addressList = new List<AddressPartClass>(); | ||
|
||
} | ||
public void AddAddressPart(AddressPartClass.AddressPartType inType, String inAddress) | ||
{ | ||
AddressPartClass addressPart = new AddressPartClass(inType, inAddress); | ||
addressList.Add(addressPart); | ||
|
||
} | ||
public void AddAddressPart(AddressPartClass inAddress) | ||
{ | ||
addressList.Add(inAddress); | ||
|
||
} | ||
public IList<AddressPartClass> GetAddressPartList() | ||
{ | ||
return addressList; | ||
} | ||
public AddressPartClass GetAddressPart(AddressPartClass.AddressPartType type) | ||
{ | ||
if (addressList != null) | ||
{ | ||
foreach (AddressPartClass addressPart in addressList) | ||
{ | ||
if (addressPart.GetAddressPartType() == type) | ||
{ | ||
return addressPart; | ||
} | ||
} | ||
} | ||
return null; | ||
} | ||
public override string ToString() | ||
{ | ||
string tString = ""; | ||
|
||
foreach (AddressPartClass addressPart in addressList) | ||
{ | ||
tString += " " + addressPart.ToString(); | ||
} | ||
return tString; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,65 @@ | ||
using System; | ||
//using System.Collections.Generic; | ||
using System.Diagnostics; | ||
//using System.Linq; | ||
//using System.Text; | ||
//using System.Threading.Tasks; | ||
using System.Runtime.Serialization; | ||
|
||
namespace FamilyTreeLibrary.FamilyData | ||
{ | ||
[DataContract] | ||
public enum XrefType | ||
{ | ||
Individual, | ||
Family, | ||
Multimedia, | ||
Note, | ||
Repository, | ||
Source, | ||
Submission, | ||
Submitter | ||
} | ||
[DataContract] | ||
public abstract class BaseXrefClass | ||
{ | ||
private static TraceSource trace = new TraceSource("BaseXrefClass", SourceLevels.Warning); | ||
|
||
[DataMember] | ||
private XrefType type; | ||
[DataMember] | ||
private String xrefName; | ||
|
||
public BaseXrefClass(XrefType type, string xref) | ||
{ | ||
this.type = type; | ||
xrefName = xref; | ||
} | ||
|
||
public String GetXrefName() | ||
{ | ||
return xrefName; | ||
} | ||
public void SetXrefName(String name) | ||
{ | ||
xrefName = name; | ||
} | ||
public void Print() | ||
{ | ||
trace.TraceInformation("xref:" + type + ":[" + xrefName + "]"); | ||
} | ||
public override int GetHashCode() | ||
{ | ||
int hashCode = 0; | ||
for (int i = 0; i < xrefName.Length; i++) | ||
{ | ||
hashCode += (int)((xrefName[i] - '0') * (int)Math.Pow(10, (xrefName.Length - i - 1))); | ||
} | ||
return hashCode; | ||
} | ||
public override string ToString() | ||
{ | ||
return type + ":" + xrefName; | ||
} | ||
} | ||
} | ||
using System; | ||
//using System.Collections.Generic; | ||
using System.Diagnostics; | ||
//using System.Linq; | ||
//using System.Text; | ||
//using System.Threading.Tasks; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Ekmansoft.FamilyTree.Library.FamilyData | ||
{ | ||
[DataContract] | ||
public enum XrefType | ||
{ | ||
Individual, | ||
Family, | ||
Multimedia, | ||
Note, | ||
Repository, | ||
Source, | ||
Submission, | ||
Submitter | ||
} | ||
[DataContract] | ||
public abstract class BaseXrefClass | ||
{ | ||
private static TraceSource trace = new TraceSource("BaseXrefClass", SourceLevels.Warning); | ||
|
||
[DataMember] | ||
private XrefType type; | ||
[DataMember] | ||
private String xrefName; | ||
|
||
public BaseXrefClass(XrefType type, string xref) | ||
{ | ||
this.type = type; | ||
xrefName = xref; | ||
} | ||
|
||
public String GetXrefName() | ||
{ | ||
return xrefName; | ||
} | ||
public void SetXrefName(String name) | ||
{ | ||
xrefName = name; | ||
} | ||
public void Print() | ||
{ | ||
trace.TraceInformation("xref:" + type + ":[" + xrefName + "]"); | ||
} | ||
public override int GetHashCode() | ||
{ | ||
int hashCode = 0; | ||
for (int i = 0; i < xrefName.Length; i++) | ||
{ | ||
hashCode += (int)((xrefName[i] - '0') * (int)Math.Pow(10, (xrefName.Length - i - 1))); | ||
} | ||
return hashCode; | ||
} | ||
public override string ToString() | ||
{ | ||
return type + ":" + xrefName; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace FamilyTreeLibrary.FamilyData | ||
{ | ||
[DataContract] | ||
public class CorporationClass | ||
{ | ||
[DataMember] | ||
public String name; | ||
[DataMember] | ||
public AddressClass address; | ||
|
||
public CorporationClass() | ||
{ | ||
name = ""; | ||
address = new AddressClass(); | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Ekmansoft.FamilyTree.Library.FamilyData | ||
{ | ||
[DataContract] | ||
public class CorporationClass | ||
{ | ||
[DataMember] | ||
public String name; | ||
[DataMember] | ||
public AddressClass address; | ||
|
||
public CorporationClass() | ||
{ | ||
name = ""; | ||
address = new AddressClass(); | ||
} | ||
} | ||
} |
Oops, something went wrong.