コード例 #1
0
ファイル: FamilyXProvider.cs プロジェクト: m-kosina/GEDKeeper
        private GDMCustomEvent AddEvent(GDMRecordWithEvents indiRec, string eventName)
        {
            GDMCustomEvent result = new GDMIndividualEvent();

            result.SetName(eventName);
            indiRec.AddEvent(result);
            return(result);
        }
コード例 #2
0
        private bool ProcessRecordEvent(bool redo)
        {
            GDMRecordWithEvents rwe = fObj as GDMRecordWithEvents;
            GDMCustomEvent      evt = fNewVal as GDMCustomEvent;

            if (rwe == null || evt == null)
            {
                return(false);
            }

            if (fType == OperationType.otRecordEventRemove)
            {
                redo = !redo;
            }
            if (redo)
            {
                rwe.AddEvent(evt);
            }
            else
            {
                rwe.Events.Extract(evt); // bugfix(no delete!)
            }
            return(true);
        }