Exemplo n.º 1
0
        private void rbtnMatch_CheckedChanged(object sender, EventArgs e)
        {
            TreeMatchType type = GetTreeMatchType();

            lblFile.Enabled        = (type == TreeMatchType.tmtExternal);
            txtCompareFile.Enabled = (type == TreeMatchType.tmtExternal);
            btnFileChoose.Enabled  = (type == TreeMatchType.tmtExternal);
        }
Exemplo n.º 2
0
        private TreeMatchType GetTreeMatchType()
        {
            TreeMatchType type =
                ((radMatchInternal.Checked) ?
                 TreeMatchType.tmtInternal :
                 ((radMathExternal.Checked) ? TreeMatchType.tmtExternal : TreeMatchType.tmtAnalysis));

            return(type);
        }
Exemplo n.º 3
0
        public void Match()
        {
            TreeMatchType type = fView.GetTreeMatchType();

            fView.CompareOutput.Clear();
            var tree = fBase.Context.Tree;

            switch (type)
            {
            case TreeMatchType.tmtInternal:
                TreeTools.FindDuplicates(tree, tree, 90 /*min: 80-85*/, DuplicateFoundFunc, AppHost.Progress);
                break;

            case TreeMatchType.tmtExternal:
                TreeTools.CompareTree(fBase.Context, fExternalFile, fView.CompareOutput);
                break;

            case TreeMatchType.tmtAnalysis:
            {
                List <TreeTools.ULIndividual> uln = TreeTools.GetUnlinkedNamesakes(fBase);

                fView.CompareOutput.AppendText("  " + LangMan.LS(LSID.LSID_SearchUnlinkedNamesakes) + ":\r\n");
                if (uln != null && uln.Count > 0)
                {
                    foreach (TreeTools.ULIndividual indiv in uln)
                    {
                        fView.CompareOutput.AppendText("    - [" + indiv.Family + "] " + GKUtils.GetNameString(indiv.IRec, true, false) + "\r\n");
                    }
                }
                else
                {
                    fView.CompareOutput.AppendText("    - not found.");
                }
                break;
            }
            }
        }
Exemplo n.º 4
0
        private void btnMatch_Click(object sender, EventArgs e)
        {
            TreeMatchType type = GetTreeMatchType();

            ListCompare.Clear();

            switch (type)
            {
            case TreeMatchType.tmtInternal:
                TreeTools.FindDuplicates(fTree, fTree, 90 /*min: 80-85*/, DuplicateFoundFunc, AppHost.Progress);
                break;

            case TreeMatchType.tmtExternal:
                TreeTools.CompareTree(fBase.Context, external_match_db, ListCompare);
                break;

            case TreeMatchType.tmtAnalysis:
            {
                List <TreeTools.ULIndividual> uln = TreeTools.GetUnlinkedNamesakes(fBase);

                ListCompare.AppendText("  " + LangMan.LS(LSID.LSID_SearchUnlinkedNamesakes) + ":\r\n");
                if (uln != null && uln.Count > 0)
                {
                    foreach (TreeTools.ULIndividual indiv in uln)
                    {
                        ListCompare.AppendText("    - [" + indiv.Family + "] " + GKUtils.GetNameString(indiv.IRec, true, false) + "\r\n");
                    }
                }
                else
                {
                    ListCompare.AppendText("    - not found.");
                }
                break;
            }
            }
        }