Example #1
0
        private void DataRefresh()
        {
            if (fListRecords != null)
            {
                fListRecords.ListMan = null;
                fListRecords.Dispose();
                fListRecords = null;
            }

            fListRecords = new GKListView(ListManager.Create(fBase.Context, fRecType));
            fListRecords.ListMan.Filter.Clear();
            fListRecords.ListMan.QuickFilter = fFilter;
            panList.Content = fListRecords;

            if (fRecType == GEDCOMRecordType.rtIndividual) {
                IndividualListFilter iFilter = (IndividualListFilter)fListRecords.ListMan.Filter;
                iFilter.Sex = NeedSex;

                if (fTarget.TargetMode == TargetMode.tmParent) {
                    fListRecords.ListMan.ExternalFilter = ChildSelectorHandler;
                }
            }

            fListRecords.UpdateContents();
        }
Example #2
0
        private void CreatePage(string pageText, GDMRecordType recType)
        {
            var summary = new HyperView();

            summary.BorderWidth = 4;
            summary.OnLink     += mPersonSummaryLink;
            summary.Font        = UIHelper.GetDefaultFont();

            var recView = new GKListView(ListManager.Create(fContext, recType));

            recView.MouseDoubleClick     += miRecordEdit_Click;
            recView.SelectedItemsChanged += List_SelectedIndexChanged;
            recView.UpdateContents();
            recView.ContextMenu = contextMenu;

            Splitter spl = new Splitter();

            spl.Panel1           = recView;
            spl.Panel2           = summary;
            spl.RelativePosition = 300;
            spl.Orientation      = Orientation.Horizontal;
            spl.FixedPanel       = SplitterFixedPanel.Panel2;

            TabPage tabPage = new TabPage();

            tabPage.Text    = pageText;
            tabPage.Content = spl;
            tabsRecords.Pages.Add(tabPage);

            fController.SetTabPart(recType, recView, summary);
        }