// 查重 private void toolStripButton_searchDup_Click(object sender, EventArgs e) { string strError = ""; // 获得书目记录XML格式 string strXmlBody = ""; int nRet = this.GetBiblioXml( "", // 迫使从记录路径中看marc格式 true, // 包含资源ID out strXmlBody, out strError); if (nRet == -1) goto ERROR1; DupForm form = new DupForm(); form.MainForm = this.MainForm; form.MdiParent = this.MainForm; form.ProjectName = "<默认>"; form.XmlRecord = strXmlBody; form.RecordPath = this.BiblioRecPath; form.AutoBeginSearch = true; form.Show(); return; ERROR1: MessageBox.Show(this, strError); }
private void ToolStripMenuItem_searchDupInExistWindow_Click(object sender, EventArgs e) { string strError = ""; // 获得书目记录XML格式 string strXmlBody = ""; int nRet = this.GetBiblioXml( "", // 迫使从记录路径中看marc格式 true, // 包含资源ID out strXmlBody, out strError); if (nRet == -1) goto ERROR1; DupForm form = this.MainForm.GetTopChildWindow<DupForm>(); if (form == null) { form = new DupForm(); form.MainForm = this.MainForm; form.MdiParent = this.MainForm; form.ProjectName = "<默认>"; form.XmlRecord = strXmlBody; form.RecordPath = this.BiblioRecPath; form.AutoBeginSearch = true; form.Show(); } else { form.Activate(); if (form.WindowState == FormWindowState.Minimized) form.WindowState = this.WindowState; form.ProjectName = "<默认>"; form.XmlRecord = strXmlBody; form.RecordPath = this.BiblioRecPath; form.BeginSearch(); } return; ERROR1: MessageBox.Show(this, strError); }