Beispiel #1
0
 private void button_testRelationDialog_Click(object sender, EventArgs e)
 {
     RelationDialog dlg = new RelationDialog();
     MainForm.SetControlFont(dlg, this.Font, false);
     dlg.ProcSearchDictionary = SearchDictionary;
     dlg.Show(this);
 }
Beispiel #2
0
        public static string BuildDebugInfo(RelationDialog dlg)
        {
            StringBuilder text = new StringBuilder();
            List<RelationControl> controls = dlg.RelationControls;

            // text.Append("*** 书目记录路径 " + strBiblioRecPath + "\r\n");

            text.Append("* 位数调整 " + dlg.ExpandLevel + "\r\n\r\n");

            int i = 0;
            foreach(RelationControl control in controls)
            {
                RelationDialog.ControlInfo info = (RelationDialog.ControlInfo)control.Tag;

                text.Append("* 关系"+(i+1)+":\r\n");
                text.Append(" 库名=[" + info.Relation.DbName + "] \r\n");
                text.Append(" 源分类号=[" + control.SourceTextOrigin + "] \r\n");
                text.Append(" 源分类号(缩位后的)=[" + control.SourceText + "] \r\n");
                text.Append(" 目标分类号(自动选定)=[" + control.TargetText + "] \r\n");

                if (info.Rows != null)
                {
                    text.Append(" 命中事项(" + info.Rows.Count + "):\r\n");
                    int j = 0;
                    foreach (DpRow row in info.Rows)
                    {
                        text.Append(
                            "   " + (j + 1).ToString() + ") " + BuildRowLine(row) + "\r\n");
                        j++;
                    }
                }

                i++;
            }

            text.Append("\r\n\r\n");

            return text.ToString();
        }