Exemple #1
0
        public TreeFilterDlg(IBaseWindow baseWin)
        {
            InitializeComponent();

            btnAccept.Image = GKResources.iBtnAccept;
            btnCancel.Image = GKResources.iBtnCancel;

            fBase                = baseWin;
            fPersonsList         = new GKSheetList(Panel1);
            fPersonsList.Buttons = EnumSet <SheetButton> .Create(SheetButton.lbAdd, SheetButton.lbDelete);

            fPersonsList.OnModify += ListModify;
            fPersonsList.AddColumn(LangMan.LS(LSID.LSID_RPIndividuals), 350, false);

            // SetLang()
            btnAccept.Text    = LangMan.LS(LSID.LSID_DlgAccept);
            btnCancel.Text    = LangMan.LS(LSID.LSID_DlgCancel);
            Text              = LangMan.LS(LSID.LSID_MIFilter);
            rgBranchCut.Text  = LangMan.LS(LSID.LSID_BranchCut);
            rbCutNone.Text    = LangMan.LS(LSID.LSID_Not);
            rbCutYears.Text   = LangMan.LS(LSID.LSID_BCut_Years);
            lblYear.Text      = LangMan.LS(LSID.LSID_Year);
            rbCutPersons.Text = LangMan.LS(LSID.LSID_BCut_Persons);
            lblRPSources.Text = LangMan.LS(LSID.LSID_RPSources);
        }
Exemple #2
0
        public TreeFilterDlg(IBaseWindow baseWin)
        {
            InitializeComponent();

            btnAccept.Image = UIHelper.LoadResourceImage("Resources.btn_accept.gif");
            btnCancel.Image = UIHelper.LoadResourceImage("Resources.btn_cancel.gif");

            fPersonsList         = new GKSheetList(Panel1);
            fPersonsList.Buttons = EnumSet <SheetButton> .Create(SheetButton.lbAdd, SheetButton.lbDelete);

            fPersonsList.OnModify += ListModify;
            fPersonsList.AddColumn(LangMan.LS(LSID.LSID_RPIndividuals), 350, false);

            // SetLocale()
            btnAccept.Text    = LangMan.LS(LSID.LSID_DlgAccept);
            btnCancel.Text    = LangMan.LS(LSID.LSID_DlgCancel);
            Title             = LangMan.LS(LSID.LSID_MIFilter);
            rgBranchCut.Text  = LangMan.LS(LSID.LSID_BranchCut);
            rbCutNone.Text    = LangMan.LS(LSID.LSID_Not);
            rbCutYears.Text   = LangMan.LS(LSID.LSID_BCut_Years);
            lblYear.Text      = LangMan.LS(LSID.LSID_Year);
            rbCutPersons.Text = LangMan.LS(LSID.LSID_BCut_Persons);
            lblRPSources.Text = LangMan.LS(LSID.LSID_RPSources);

            fController = new TreeFilterDlgController(this);
            fController.Init(baseWin);
        }
Exemple #3
0
        public SourceRepositoriesSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raDelete, RecordAction.raJump);

            fListColumns.AddColumn(LSID.LSID_Repository, 300, false);
            fListColumns.ResetDefaults();
        }
Exemple #4
0
        public NoteLinksListModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete);

            fListColumns.AddColumn(LSID.LSID_Note, 500, false);
            fListColumns.ResetDefaults();
        }
Exemple #5
0
        public ResGroupsSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete, RecordAction.raJump);

            fListColumns.AddColumn(LSID.LSID_Group, 350, false);
            fListColumns.ResetDefaults();
        }
Exemple #6
0
        public GroupMembersSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raDelete /*, RecordAction.raJump*/);

            fListColumns.AddColumn(LSID.LSID_Name, 300, false);
            fListColumns.ResetDefaults();
        }
        public TreeChartPerson(TreeChartModel model)
        {
            fModel = model;
            fFlags = EnumSet <PersonFlag> .Create();

            fPortrait = null;
            fSpouses  = null;
            fChilds   = null;
        }
Exemple #8
0
        public URefsSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete);

            fListColumns.AddColumn(LSID.LSID_Reference, 300, false);
            fListColumns.AddColumn(LSID.LSID_Type, 200, false);
            fListColumns.ResetDefaults();
        }
Exemple #9
0
        public AssociationsListModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete,
                RecordAction.raJump);

            fListColumns.AddColumn(LSID.LSID_Relation, 300, false);
            fListColumns.AddColumn(LSID.LSID_Person, 200, false);
            fListColumns.ResetDefaults();
        }
Exemple #10
0
        public MediaLinksListModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete,
                RecordAction.raMoveUp, RecordAction.raMoveDown);

            fListColumns.AddColumn(LSID.LSID_RPMultimedia, 300, false);
            fListColumns.AddColumn(LSID.LSID_Type, 300, false);
            fListColumns.ResetDefaults();
        }
        public ChildrenListModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete, RecordAction.raJump);

            fListColumns.AddColumn(LSID.LSID_NumberSym, 25, false);
            fListColumns.AddColumn(LSID.LSID_Name, 300, false);
            fListColumns.AddColumn(LSID.LSID_BirthDate, 100, false);
            fListColumns.ResetDefaults();
        }
Exemple #12
0
        public NamesSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete,
                RecordAction.raMoveDown, RecordAction.raMoveUp);

            fListColumns.AddColumn(LSID.LSID_Name, 350, false);
            fListColumns.AddColumn(LSID.LSID_Type, 100, false);
            fListColumns.ResetDefaults();
        }
Exemple #13
0
        public ResCommunicationsSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete, RecordAction.raJump);

            fListColumns.AddColumn(LSID.LSID_Theme, 150, false);
            fListColumns.AddColumn(LSID.LSID_Corresponder, 150, false);
            fListColumns.AddColumn(LSID.LSID_Type, 90, false);
            fListColumns.AddColumn(LSID.LSID_Date, 90, false);
            fListColumns.ResetDefaults();
        }
Exemple #14
0
        public ResTasksSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete, RecordAction.raJump);

            fListColumns.AddColumn(LSID.LSID_Goal, 250, false);
            fListColumns.AddColumn(LSID.LSID_Priority, 90, false);
            fListColumns.AddColumn(LSID.LSID_StartDate, 90, false);
            fListColumns.AddColumn(LSID.LSID_StopDate, 90, false);
            fListColumns.ResetDefaults();
        }
Exemple #15
0
        public SpousesSublistModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete,
                RecordAction.raJump, RecordAction.raMoveUp, RecordAction.raMoveDown);

            fListColumns.AddColumn(LSID.LSID_NumberSym, 25, false);
            fListColumns.AddColumn(LSID.LSID_Spouse, 300, false);
            fListColumns.AddColumn(LSID.LSID_MarriageDate, 100, false);
            fListColumns.ResetDefaults();
        }
Exemple #16
0
        public SourceCitationsListModel(IBaseWindow baseWin, ChangeTracker undoman) : base(baseWin, undoman)
        {
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete,
                RecordAction.raMoveUp, RecordAction.raMoveDown);

            fListColumns.AddColumn(LSID.LSID_Author, 70, false);
            fListColumns.AddColumn(LSID.LSID_Title, 180, false);
            fListColumns.AddColumn(LSID.LSID_Page, 90, false);
            fListColumns.AddColumn(LSID.LSID_Certainty, 220, false);
            fListColumns.ResetDefaults();
        }
Exemple #17
0
        public EventsListModel(IBaseWindow baseWin, ChangeTracker undoman, bool personsMode) : base(baseWin, undoman)
        {
            fPersonsMode   = personsMode;
            AllowedActions = EnumSet <RecordAction> .Create(
                RecordAction.raAdd, RecordAction.raEdit, RecordAction.raDelete,
                RecordAction.raMoveUp, RecordAction.raMoveDown);

            fListColumns.AddColumn(LSID.LSID_NumberSym, 25, false);
            fListColumns.AddColumn(LSID.LSID_Event, 90, false);
            fListColumns.AddColumn(LSID.LSID_Date, 80, false);
            if (!fPersonsMode)
            {
                fListColumns.AddColumn(LSID.LSID_Place, 200, false);
            }
            else
            {
                fListColumns.AddColumn(LSID.LSID_PlaceAndAttribute, 200, false);
            }
            fListColumns.AddColumn(LSID.LSID_Cause, 130, false);
            fListColumns.ResetDefaults();
        }
Exemple #18
0
        public OrganizerWin(IBaseWindow baseWin)
        {
            InitializeComponent();

            fBase = baseWin;

            fAdrList         = new GKSheetList(pageAddresses);
            fAdrList.Buttons = EnumSet <SheetButton> .Create();

            fAdrList.AddColumn(LangMan.LS(LSID.LSID_Person), 350, false);
            fAdrList.AddColumn(LangMan.LS(LSID.LSID_Address), 100, false);

            fPhonesList         = new GKSheetList(pageTelephones);
            fPhonesList.Buttons = EnumSet <SheetButton> .Create();

            fPhonesList.AddColumn(LangMan.LS(LSID.LSID_Person), 350, false);
            fPhonesList.AddColumn(LangMan.LS(LSID.LSID_Telephone), 100, false);

            fMailsList         = new GKSheetList(pageMails);
            fMailsList.Buttons = EnumSet <SheetButton> .Create();

            fMailsList.AddColumn(LangMan.LS(LSID.LSID_Person), 350, false);
            fMailsList.AddColumn(LangMan.LS(LSID.LSID_Mail), 100, false);

            fWebsList         = new GKSheetList(pageWebs);
            fWebsList.Buttons = EnumSet <SheetButton> .Create();

            fWebsList.AddColumn(LangMan.LS(LSID.LSID_Person), 350, false);
            fWebsList.AddColumn(LangMan.LS(LSID.LSID_WebSite), 100, false);

            Title = LangMan.LS(LSID.LSID_MIOrganizer);
            pageAddresses.Text  = LangMan.LS(LSID.LSID_Addresses);
            pageTelephones.Text = LangMan.LS(LSID.LSID_Telephones);
            pageMails.Text      = LangMan.LS(LSID.LSID_Mails);
            pageWebs.Text       = LangMan.LS(LSID.LSID_Webs);

            fController = new OrganizerController(this);
            fController.Init(baseWin);
        }
Exemple #19
0
        public GKSheetList(Panel owner)
        {
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }

            fBtnMoveDown         = new Button();
            fBtnMoveDown.Image   = UIHelper.LoadResourceImage("Resources.btn_down.gif");
            fBtnMoveDown.Size    = UIHelper.ShortButtonSize;
            fBtnMoveDown.ToolTip = LangMan.LS(LSID.LSID_RecordMoveDown);
            fBtnMoveDown.Click  += ItemMoveDown;

            fBtnMoveUp         = new Button();
            fBtnMoveUp.Image   = UIHelper.LoadResourceImage("Resources.btn_up.gif");
            fBtnMoveUp.Size    = UIHelper.ShortButtonSize;
            fBtnMoveUp.ToolTip = LangMan.LS(LSID.LSID_RecordMoveUp);
            fBtnMoveUp.Click  += ItemMoveUp;

            fBtnLinkJump         = new Button();
            fBtnLinkJump.Image   = UIHelper.LoadResourceImage("Resources.btn_jump.gif");
            fBtnLinkJump.Size    = UIHelper.ShortButtonSize;
            fBtnLinkJump.ToolTip = LangMan.LS(LSID.LSID_RecordGoto);
            fBtnLinkJump.Click  += ItemJump;

            fBtnDelete         = new Button();
            fBtnDelete.Image   = UIHelper.LoadResourceImage("Resources.btn_rec_delete.gif");
            fBtnDelete.Size    = UIHelper.ShortButtonSize;
            fBtnDelete.ToolTip = LangMan.LS(LSID.LSID_MIRecordDelete);
            fBtnDelete.Click  += ItemDelete;

            fBtnEdit         = new Button();
            fBtnEdit.Image   = UIHelper.LoadResourceImage("Resources.btn_rec_edit.gif");
            fBtnEdit.Size    = UIHelper.ShortButtonSize;
            fBtnEdit.ToolTip = LangMan.LS(LSID.LSID_MIRecordEdit);
            fBtnEdit.Click  += ItemEdit;

            fBtnAdd         = new Button();
            fBtnAdd.Image   = UIHelper.LoadResourceImage("Resources.btn_rec_new.gif");
            fBtnAdd.Size    = UIHelper.ShortButtonSize;
            fBtnAdd.ToolTip = LangMan.LS(LSID.LSID_MIRecordAdd);
            fBtnAdd.Click  += ItemAdd;

            fList = new GKListView();
            fList.MouseDoubleClick += List_DoubleClick;
            fList.KeyDown          += List_KeyDown;

            SuspendLayout();

            var toolbar = new DefStackLayout(Orientation.Vertical, 4,
                                             fBtnAdd, fBtnEdit, fBtnDelete,
                                             fBtnLinkJump, fBtnMoveUp, fBtnMoveDown);

            var tab = new TableLayout(2, 1);

            tab.Spacing = new Size(4, 4);
            tab.SetColumnScale(0, true);
            tab.SetColumnScale(1, false);
            tab.Add(fList, 0, 0);
            tab.Add(toolbar, 1, 0);

            Content = tab;
            ResumeLayout();

            owner.SuspendLayout();
            owner.Content = this;
            owner.ResumeLayout();

            fButtons = EnumSet <SheetButton> .Create(SheetButton.lbAdd, SheetButton.lbEdit, SheetButton.lbDelete);

            fListModel = null;
        }
Exemple #20
0
        public void Test_Common()
        {
            EnumSet <RestrictionEnum> es = EnumSet <RestrictionEnum> .Create();

            Assert.IsTrue(es.IsEmpty());

            es.Include(null);
            Assert.IsTrue(es.IsEmpty());

            es.Include(RestrictionEnum.rnPrivacy, RestrictionEnum.rnLocked);
            Assert.IsTrue(es.Contains(RestrictionEnum.rnPrivacy));
            Assert.IsFalse(es.Contains(RestrictionEnum.rnNone));
            Assert.IsFalse(es.IsEmpty());

            es.Exclude(RestrictionEnum.rnPrivacy);
            Assert.IsFalse(es.Contains(RestrictionEnum.rnPrivacy));
            Assert.IsTrue(es.Contains(RestrictionEnum.rnLocked));

            es = EnumSet <RestrictionEnum> .Create(RestrictionEnum.rnNone, RestrictionEnum.rnLocked);

            Assert.IsTrue(es.Contains(RestrictionEnum.rnNone));
            Assert.IsTrue(es.Contains(RestrictionEnum.rnLocked));

            string test = es.ToString().Substring(64 - 8);

            Assert.AreEqual("00000011", test);

            // clone test
            EnumSet <RestrictionEnum> copy = (EnumSet <RestrictionEnum>)es.Clone();

            test = copy.ToString().Substring(64 - 8);
            Assert.AreEqual("00000011", test);

            // clear test
            copy.Clear();
            Assert.IsTrue(copy.IsEmpty());

            //
            EnumSet <RestrictionEnum> es2 = EnumSet <RestrictionEnum> .Create(RestrictionEnum.rnNone, RestrictionEnum.rnLocked);

            Assert.IsTrue(es.Equals(es2));
            Assert.IsFalse(es.Equals(null));

            Assert.IsTrue(es.Contains(RestrictionEnum.rnLocked));
            Assert.IsFalse(es.Contains(RestrictionEnum.rnPrivacy));

            EnumSet <RestrictionEnum> es3 = EnumSet <RestrictionEnum> .Create(RestrictionEnum.rnLocked);

            EnumSet <RestrictionEnum> es4 = es * es3;

            Assert.IsTrue(es4.Contains(RestrictionEnum.rnLocked));

            es = EnumSet <RestrictionEnum> .Create(RestrictionEnum.rnNone);

            es2 = EnumSet <RestrictionEnum> .Create(RestrictionEnum.rnLocked);

            Assert.IsTrue(es != es2);

            es  = es + es2;
            es3 = EnumSet <RestrictionEnum> .Create(RestrictionEnum.rnNone, RestrictionEnum.rnLocked);

            Assert.IsTrue(es.Equals(es3));

            Assert.IsFalse(es3.ContainsAll(new RestrictionEnum[] {}));
            Assert.IsTrue(es3.ContainsAll(RestrictionEnum.rnNone, RestrictionEnum.rnLocked));
            Assert.IsFalse(es3.ContainsAll(RestrictionEnum.rnNone, RestrictionEnum.rnPrivacy));

            Assert.IsFalse(es3.HasIntersect(new RestrictionEnum[] {}));
            Assert.IsTrue(es3.HasIntersect(RestrictionEnum.rnNone, RestrictionEnum.rnPrivacy));
            Assert.IsFalse(es3.HasIntersect(RestrictionEnum.rnPrivacy));

            es  = es - es2;
            es3 = EnumSet <RestrictionEnum> .Create(RestrictionEnum.rnNone);

            Assert.IsTrue(es == es3);
            Assert.AreEqual("0000000000000000000000000000000000000000000000000000000000000001", es3.ToString());
            Assert.AreNotEqual(0, es3.GetHashCode());
        }
Exemple #21
0
        public GKSheetList(Control owner)
        {
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }

            fBtnMoveDown             = new ToolStripButton();
            fBtnMoveDown.Image       = GKResources.iDown;
            fBtnMoveDown.ToolTipText = LangMan.LS(LSID.LSID_RecordMoveDown);
            fBtnMoveDown.Click      += ItemMoveDown;

            fBtnMoveUp             = new ToolStripButton();
            fBtnMoveUp.Image       = GKResources.iUp;
            fBtnMoveUp.ToolTipText = LangMan.LS(LSID.LSID_RecordMoveUp);
            fBtnMoveUp.Click      += ItemMoveUp;

            fBtnLinkJump             = new ToolStripButton();
            fBtnLinkJump.Image       = GKResources.iToMan;
            fBtnLinkJump.ToolTipText = LangMan.LS(LSID.LSID_RecordGoto);
            fBtnLinkJump.Click      += ItemJump;

            fBtnDelete             = new ToolStripButton();
            fBtnDelete.Name        = "btnDelete";
            fBtnDelete.Image       = GKResources.iRecDelete;
            fBtnDelete.ToolTipText = LangMan.LS(LSID.LSID_MIRecordDelete);
            fBtnDelete.Click      += ItemDelete;

            fBtnEdit             = new ToolStripButton();
            fBtnEdit.Name        = "btnEdit";
            fBtnEdit.Image       = GKResources.iRecEdit;
            fBtnEdit.ToolTipText = LangMan.LS(LSID.LSID_MIRecordEdit);
            fBtnEdit.Click      += ItemEdit;

            fBtnAdd             = new ToolStripButton();
            fBtnAdd.Name        = "btnAdd";
            fBtnAdd.Image       = GKResources.iRecNew;
            fBtnAdd.ToolTipText = LangMan.LS(LSID.LSID_MIRecordAdd);
            fBtnAdd.Click      += ItemAdd;

            fToolBar      = new ToolStrip();
            fToolBar.Name = "ToolBar";
            fToolBar.Dock = DockStyle.Right;
            fToolBar.Items.AddRange(new ToolStripItem[] {
                fBtnAdd,
                fBtnEdit,
                fBtnDelete,
                fBtnLinkJump,
                fBtnMoveUp,
                fBtnMoveDown
            });
            fToolBar.GripStyle        = ToolStripGripStyle.Hidden;
            fToolBar.ImageScalingSize = new Size(24, 20);
            fToolBar.AutoSize         = true;
            fToolBar.ShowItemToolTips = true;

            fList               = new GKListView();
            fList.Dock          = DockStyle.Fill;
            fList.Location      = new Point(0, 0);
            fList.Size          = new Size(500, 290);
            fList.HideSelection = false;
            fList.LabelEdit     = false;
            fList.FullRowSelect = true;
            fList.View          = View.Details;
            fList.DoubleClick  += List_DoubleClick;
            fList.KeyDown      += List_KeyDown;

            SuspendLayout();
            Controls.Add(fList);
            Controls.Add(fToolBar);
            ResumeLayout(false);

            Dock = DockStyle.Fill;

            owner.SuspendLayout();
            owner.Controls.Add(this);
            owner.ResumeLayout(false);

            fButtons = EnumSet <SheetButton> .Create(SheetButton.lbAdd, SheetButton.lbEdit, SheetButton.lbDelete);

            fListModel = null;
        }
Exemple #22
0
        public void BuildBy(GDMIndividualRecord iRec)
        {
            try {
                fRec = iRec;

                if (iRec != null)
                {
                    if (fModel.PreparedIndividuals.IndexOf(iRec.XRef) < 0)
                    {
                        fModel.PreparedIndividuals.Add(iRec.XRef);
                    }

                    var parts = GKUtils.GetNameParts(fModel.Base.Context.Tree, iRec);
                    fSurname    = parts.Surname;
                    fName       = parts.Name;
                    fPatronymic = parts.Patronymic;
                    fNick       = GKUtils.GetNickString(iRec);
                    fSex        = iRec.Sex;

                    TreeChartOptions options = fModel.Options;

                    var        lifeDates  = iRec.GetLifeDates();
                    DateFormat dateFormat = (options.OnlyYears) ? DateFormat.dfYYYY : DateFormat.dfDD_MM_YYYY;

                    IsDead     = (lifeDates.DeathEvent != null);
                    fBirthDate = GKUtils.GEDCOMEventToDateStr(lifeDates.BirthEvent, dateFormat, false);
                    fDeathDate = GKUtils.GEDCOMEventToDateStr(lifeDates.DeathEvent, dateFormat, false);

                    if (!options.OnlyYears)
                    {
                        if (options.ShowPlaces)
                        {
                            fBirthPlace = GKUtils.GetPlaceStr(lifeDates.BirthEvent, false);
                            if (!string.IsNullOrEmpty(fBirthPlace) && !options.SeparateDatesAndPlacesLines)
                            {
                                if (!string.IsNullOrEmpty(fBirthDate))
                                {
                                    fBirthDate += ", ";
                                }
                                fBirthDate += fBirthPlace;
                            }

                            fDeathPlace = GKUtils.GetPlaceStr(lifeDates.DeathEvent, false);
                            if (!string.IsNullOrEmpty(fDeathPlace) && !options.SeparateDatesAndPlacesLines)
                            {
                                if (!string.IsNullOrEmpty(fDeathDate))
                                {
                                    fDeathDate += ", ";
                                }
                                fDeathDate += fDeathPlace;
                            }
                        }

                        if (!string.IsNullOrEmpty(fBirthDate))
                        {
                            fBirthDate = ImportUtils.STD_BIRTH_SIGN + " " + fBirthDate;
                        }
                        if (!string.IsNullOrEmpty(fDeathDate))
                        {
                            fDeathDate = ImportUtils.STD_DEATH_SIGN + " " + fDeathDate;
                        }
                    }

                    if (options.SignsVisible)
                    {
                        EnumSet <SpecialUserRef> signs = EnumSet <SpecialUserRef> .Create();

                        int num = fRec.UserReferences.Count;
                        for (int i = 0; i < num; i++)
                        {
                            string rs = fRec.UserReferences[i].StringValue;

                            for (var cps = SpecialUserRef.urRI_StGeorgeCross; cps <= SpecialUserRef.urLast; cps++)
                            {
                                string sur = LangMan.LS(GKData.SpecialUserRefs[(int)cps].Title);
                                if (rs == sur)
                                {
                                    signs.Include(cps);
                                }
                            }
                        }

                        fSigns = signs;
                    }
                    else
                    {
                        fSigns = EnumSet <SpecialUserRef> .Create();
                    }

                    if (options.PortraitsVisible)
                    {
                        try {
                            fPortrait = PortraitsCache.Instance.GetImage(fModel.Base.Context, iRec);

                            if (fPortrait == null && options.DefaultPortraits)
                            {
                                string resName = (fSex == GDMSex.svFemale) ? "pi_female_140.png" : "pi_male_140.png";
                                fPortrait = AppHost.GfxProvider.LoadResourceImage(resName, false);
                            }
                        } catch (MediaFileNotFoundException) {
                            if (!fModel.HasMediaFail)
                            {
                                AppHost.StdDialogs.ShowError(LangMan.LS(LSID.LSID_MediaFileNotLoaded));
                                fModel.HasMediaFail = true;
                            }
                        }
                    }

                    CertaintyAssessment = iRec.GetCertaintyAssessment();
                }
                else
                {
                    fSurname    = "";
                    fName       = "< ? >";
                    fPatronymic = "";
                    fNick       = "";
                    fBirthDate  = "";
                    fBirthPlace = "";
                    fDeathDate  = "";
                    fDeathPlace = "";
                    IsDead      = false;
                    fSex        = GDMSex.svUnknown;
                    fSigns      = EnumSet <SpecialUserRef> .Create();

                    CertaintyAssessment = 0.0f;
                }
            } catch (Exception ex) {
                Logger.WriteError("TreeChartPerson.BuildBy()", ex);
                throw;
            }
        }