Ejemplo n.º 1
0
        void startButton_MouseClick(object sender, MouseEventArgs e)
        {
            trace.TraceInformation("RelationFinderPanel::startButton_MouseClick()" + DateTime.Now);
            if (familyTree.GetHomeIndividual() == null)
            {
                MessageBox.Show("Error: No root / base person selected!");
                return;
            }
            if (selectedIndividual != null)
            {
                int noOfGenerations            = AncestorStatistics.AllGenerations;
                RelationStackList relationList = new RelationStackList();

                if (resultNoCtrl.SelectedItem.ToString() != "All")
                {
                    noOfGenerations = Convert.ToInt32(resultNoCtrl.SelectedItem.ToString());
                }

                AsyncWorkerProgress progress = new AsyncWorkerProgress(RelationProgress);
                //CheckRelation relation = new CheckRelation(familyTree, selectedIndividual.GetXrefName(), familyTree.GetHomeIndividual(), noOfGenerations, ref relationList);
                this.relWorker = new RelationTreeWorker(this,
                                                        progress,
                                                        selectedIndividual.GetXrefName(),
                                                        familyTree.GetHomeIndividual(),
                                                        noOfGenerations,
                                                        familyTree);

                //ShowRelations(relationList.relations);
                //this.relationList = relationList;
            }
            else
            {
                MessageBox.Show("Error: No person selected!");
            }
        }
Ejemplo n.º 2
0
        private void CompletedCallback(bool result)
        {
            trace.TraceInformation("FamilyForm2.CompletedCallback(" + result + ")" + DateTime.Now);
            //return true;
            if (familyTree != null)
            {
                string homePerson = familyTree.GetHomeIndividual();

                if (homePerson != null)
                {
                    SetSelectedIndividual(homePerson);
                }
                if (InvokeRequired)
                {
                    Invoke(new Action(() => ConnectPanelsToTree(familyTree)));
                }
                else
                {
                    ConnectPanelsToTree(familyTree);
                }
            }
        }