Example #1
0
        private void CollectData()
        {
            fAdrList.ClearItems();
            fPhonesList.ClearItems();
            fMailsList.ClearItems();
            fWebsList.ClearItems();

            int num = fBase.Context.Tree.RecordsCount;

            for (int i = 0; i < num; i++)
            {
                GEDCOMRecord rec = fBase.Context.Tree[i];
                if (rec.RecordType != GEDCOMRecordType.rtIndividual)
                {
                    continue;
                }

                GEDCOMIndividualRecord iRec = (GEDCOMIndividualRecord)rec;
                string nm = GKUtils.GetNameString(iRec, true, false);

                foreach (GEDCOMCustomEvent evt in iRec.Events)
                {
                    PrepareEvent(nm, evt);
                }
            }

            fAdrList.ResizeColumn(0);
            fAdrList.ResizeColumn(1);
            fPhonesList.ResizeColumn(0);
            fPhonesList.ResizeColumn(1);
            fMailsList.ResizeColumn(0);
            fMailsList.ResizeColumn(1);
            fWebsList.ResizeColumn(0);
            fWebsList.ResizeColumn(1);
        }
Example #2
0
        private void UpdateControls()
        {
            switch (fFilter.BranchCut)
            {
            case ChartFilter.BranchCutType.Persons:
                rbCutPersons.Checked = true;
                break;

            case ChartFilter.BranchCutType.Years:
                rbCutYears.Checked = true;
                break;

            case ChartFilter.BranchCutType.None:
                rbCutNone.Checked = true;
                break;
            }

            edYear.Enabled       = (fFilter.BranchCut == ChartFilter.BranchCutType.Years);
            fPersonsList.Enabled = (fFilter.BranchCut == ChartFilter.BranchCutType.Persons);
            edYear.Value         = fFilter.BranchYear;
            fPersonsList.ClearItems();

            if (!string.IsNullOrEmpty(fTemp))
            {
                string[] tmpRefs = fTemp.Split(';');

                int num = tmpRefs.Length;
                for (int i = 0; i < num; i++)
                {
                    string xref = tmpRefs[i];
                    GEDCOMIndividualRecord p = fBase.Context.Tree.XRefIndex_Find(xref) as GEDCOMIndividualRecord;
                    if (p != null)
                    {
                        fPersonsList.AddItem(p, GKUtils.GetNameString(p, true, false));
                    }
                }
            }

            if (fFilter.SourceMode != FilterGroupMode.Selected)
            {
                cmbSource.SelectedIndex = (sbyte)fFilter.SourceMode;
            }
            else
            {
                GEDCOMSourceRecord srcRec = fBase.Context.Tree.XRefIndex_Find(fFilter.SourceRef) as GEDCOMSourceRecord;
                if (srcRec != null)
                {
                    cmbSource.Text = srcRec.FiledByEntry;
                }
            }
        }
Example #3
0
        private void UpdateLists()
        {
            fPhonesList.ClearItems();
            foreach (GEDCOMTag tag in fAddress.PhoneNumbers)
            {
                fPhonesList.AddItem(tag, tag.StringValue);
            }

            fMailsList.ClearItems();
            foreach (GEDCOMTag tag in fAddress.EmailAddresses)
            {
                fMailsList.AddItem(tag, tag.StringValue);
            }

            fWebsList.ClearItems();
            foreach (GEDCOMTag tag in fAddress.WebPages)
            {
                fWebsList.AddItem(tag, tag.StringValue);
            }
        }