Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        public static GKListView CreateRecordsView(Control parent, IBaseContext baseContext, GDMRecordType recType)
        {
            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }

            if (baseContext == null)
            {
                throw new ArgumentNullException("baseContext");
            }

            GKListView recView = new GKListView();

            recView.HideSelection = false;
            recView.LabelEdit     = false;
            recView.FullRowSelect = true;
            recView.View          = View.Details;
            recView.ListMan       = ListManager.Create(baseContext, recType);
            recView.Dock          = DockStyle.Fill;

            parent.Controls.Add(recView);
            parent.Controls.SetChildIndex(recView, 0);

            return(recView);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
        public ContactList CreateList(Job job, string name, IEnumerable <Contact> addContacts, string listManagerOwner = DefaultListManagerOwner)
        {
            job.Status = $"Creating List {name}";

            var contactList = new ContactList
            {
                Name  = name,
                Owner = listManagerOwner,
                Type  = ListRowType.ContactList
            };

            _listManager.Create(contactList);
            _listManager.AssociateContacts(contactList, addContacts.Select(MapContactToContactData));
            job.CompletedLists++;

            _unlockListService.UnlockList(job, contactList);

            return(contactList);
        }
Ejemplo n.º 5
0
        public static GKListView CreateRecordsView(Panel parent, IBaseContext baseContext, GDMRecordType recType)
        {
            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }

            if (baseContext == null)
            {
                throw new ArgumentNullException("baseContext");
            }

            GKListView recView = new GKListView();

            recView.ListMan = ListManager.Create(baseContext, recType);
            parent.Content  = recView;

            return(recView);
        }