Пример #1
0
        // 分类主题对照
        private void MenuItem_class2Subject_Click(object sender, EventArgs e)
        {
            Class2SubjectDlg dlg = new Class2SubjectDlg();
            MainForm.SetControlFont(dlg, this.DefaultFont);

            // dlg.TopMost = true;
            dlg.CopySubject += new CopySubjectEventHandler(this.CopySubject);

            SearchPanel searchpanel = new SearchPanel();
            searchpanel.Initial(this.Servers,
                this.cfgCache);

            searchpanel.ap = this.AppInfo;
            searchpanel.ApCfgTitle = "mainform_class2subjectdlg";

            // 获得上次遗留的URL
            string strLastUrl = this.AppInfo.GetString(
                "class2subject",
                "url",
                "http://dp2003.com/dp2kernel");

            dlg.Closed -= new EventHandler(class2subjectdlg_Closed);
            dlg.Closed += new EventHandler(class2subjectdlg_Closed);

            this.AppInfo.LinkFormState(dlg, "class2subjectdlg_state");

            dlg.Initial(searchpanel,
                strLastUrl, // "http://dp2003.com/rmsws/rmsws.asmx",
                "分类主题对照");
            dlg.CssUrl = Environment.CurrentDirectory + "\\class2subject.css";
            dlg.Show();
            dlg.MdiParent = this;
        }
Пример #2
0
		// 启动查重
		// parameters:
		//		strRecordPath	记录路径。如果==null,表示直接用textBox_recPath中当前的内容作为路径
		public void SearchDup(string strRecordPath)
		{
			if (strRecordPath == null || strRecordPath == "")
				strRecordPath = textBox_recPath.Text;

			if (strRecordPath == "")
			{
				MessageBox.Show(this, "必须指定好路径后, 才能进行查重");
				return;
			}

			ResPath respath = new ResPath(strRecordPath);

			string strError;

			string strXml = "";
            bool bHasUploadedFile = false;

			int nRet = GetXmlRecord(out strXml, 
                out bHasUploadedFile,
                out strError);
			if (nRet == -1)
			{
				MessageBox.Show(this, strError);
				return;
			}


			// 最好激活当前已经存在的查重mdi窗口

			DupDlg dlg = new DupDlg();
            dlg.Font = GuiUtil.GetDefaultFont();

			// dlg.TopMost = true;
			dlg.OpenDetail -= new OpenDetailEventHandler(this.MainForm.OpenDetailCallBack);
			dlg.OpenDetail += new OpenDetailEventHandler(this.MainForm.OpenDetailCallBack);
			dlg.Closed -= new EventHandler(dupdlg_Closed);
			dlg.Closed += new EventHandler(dupdlg_Closed);

			SearchPanel searchpanel = new SearchPanel();
			searchpanel.Initial(this.MainForm.Servers,
				this.MainForm.cfgCache);

			searchpanel.ap = this.MainForm.AppInfo;
			searchpanel.ApCfgTitle = "detailform_dupdlg";

			string strDbFullName = respath.Url + "?" + ResPath.GetDbName(respath.Path);
			// 获得上次遗留的缺省查重方案名
			string strDupProjectName = GetUsedDefaultDupProject(strDbFullName);

			dlg.Initial(searchpanel,
				respath.Url,
				true);
			dlg.ProjectName = strDupProjectName;
			dlg.RecordFullPath = strRecordPath;
			dlg.Record = strXml;
			dlg.MdiParent = this.MainForm;	// MDI化
			dlg.Show();



			// this.MainForm.SetFirstMdiWindowState();
		}
Пример #3
0
        // 管理种次号
        private void MenuItem_manageZhongcihao_Click(object sender, EventArgs e)
        {
            ZhongcihaoDlg dlg = new ZhongcihaoDlg();
            MainForm.SetControlFont(dlg, this.DefaultFont);

            SearchPanel searchpanel = new SearchPanel();
            searchpanel.Initial(this.Servers,
                this.cfgCache);

            searchpanel.ap = this.AppInfo;
            searchpanel.ApCfgTitle = "mainform_zhongcihaodlg";

            // dlg.TopMost = true;
            dlg.OpenDetail -= new OpenDetailEventHandler(this.OpenDetailCallBack);
            dlg.OpenDetail += new OpenDetailEventHandler(this.OpenDetailCallBack);

            // 获得上次遗留的URL
            string strLastUrl = this.AppInfo.GetString(
                "zhongcihao",
                "url",
                "http://dp2003.com/dp2kernel");

            dlg.Closed -= new EventHandler(zhongcihaodlg_Closed);
            dlg.Closed += new EventHandler(zhongcihaodlg_Closed);


            this.AppInfo.LinkFormState(dlg, "zhongcihaodlg_state");

            dlg.Initial(searchpanel,
                strLastUrl,
                "中文书目",
                "",
                false);
            dlg.Show();
            dlg.MdiParent = this;
        }