Example #1
0
        private bool ProcessFamilySpouse(bool redo)
        {
            GEDCOMFamilyRecord     famRec    = fObj as GEDCOMFamilyRecord;
            GEDCOMIndividualRecord spouseRec = fNewVal as GEDCOMIndividualRecord;

            if (famRec == null || spouseRec == null)
            {
                return(false);
            }

            if (fType == OperationType.otFamilySpouseDetach)
            {
                redo = !redo;
            }
            if (redo)
            {
                famRec.AddSpouse(spouseRec);
            }
            else
            {
                famRec.RemoveSpouse(spouseRec);
            }
            return(true);
        }