Esempio n. 1
0
        public bool DeleteCommunicationRecord(GEDCOMCommunicationRecord commRec)
        {
            if (commRec == null)
            {
                return(false);
            }

            int num = fRecords.Count;

            for (int i = 0; i < num; i++)
            {
                GEDCOMRecord rec = this[i];
                if (rec.RecordType == GEDCOMRecordType.rtResearch)
                {
                    GEDCOMResearchRecord resRec = (GEDCOMResearchRecord)rec;
                    for (int j = resRec.Communications.Count - 1; j >= 0; j--)
                    {
                        if (resRec.Communications[j].Value == commRec)
                        {
                            resRec.Communications.DeleteAt(j);
                        }
                    }
                }
            }

            DeleteRecord(commRec);
            return(true);
        }
Esempio n. 2
0
        public bool DeleteTaskRecord(GEDCOMTaskRecord taskRec)
        {
            if (taskRec == null)
            {
                return(false);
            }

            int num = fRecords.Count;

            for (int i = 0; i < num; i++)
            {
                GEDCOMRecord rec = this[i];
                if (rec.RecordType == GEDCOMRecordType.rtResearch)
                {
                    GEDCOMResearchRecord resRec = (GEDCOMResearchRecord)rec;
                    for (int j = resRec.Tasks.Count - 1; j >= 0; j--)
                    {
                        if (resRec.Tasks[j].Value == taskRec)
                        {
                            resRec.Tasks.DeleteAt(j);
                        }
                    }
                }
            }

            DeleteRecord(taskRec);
            return(true);
        }
Esempio n. 3
0
        public bool DeleteResearchRecord(GEDCOMResearchRecord resRec)
        {
            if (resRec == null)
            {
                return(false);
            }

            DeleteRecord(resRec);
            return(true);
        }
Esempio n. 4
0
        public GEDCOMResearchRecord CreateResearch()
        {
            GEDCOMResearchRecord result = new GEDCOMResearchRecord(this, this, "", "");

            result.InitNew();
            result.ChangeDate.ChangeDateTime = DateTime.Now;

            AddRecord(result);
            return(result);
        }