Beispiel #1
0
        private void button_viewXmlRecord_Click(object sender, EventArgs e)
        {
            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "当前XML数据";
            // dlg.MainForm = Program.MainForm;
            dlg.XmlString     = this.XmlRecord;
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);   // ?? this
            return;

            /*
             * ERROR1:
             * MessageBox.Show(this, strError);
             * */
        }
Beispiel #2
0
        // 工具条按钮、菜单:查看最初调入的XML数据
        private void MenuItem_marcEditor_viewOriginXml_Click(object sender, EventArgs e)
        {
            string strError = "";

            if (String.IsNullOrEmpty(this.m_strOriginBiblioXml) == true)
            {
                strError = "暂不具备原始XML数据";
                goto ERROR1;
            }

            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "最初调入的XML数据";
            dlg.MainForm = this.MainForm;
            dlg.XmlString = this.m_strOriginBiblioXml;
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog();   // ?? this
            return;
        ERROR1:
            MessageBox.Show(this, strError);
        }
Beispiel #3
0
        // 工具条按钮、菜单:查看当前XML数据
        private void MenuItem_marcEditor_viewXml_Click(object sender, EventArgs e)
        {
#if NO
            string strError = "";

            // 获得书目记录XML格式
            string strXmlBody = "";
            int nRet = this.GetBiblioXml(
                "", // 迫使从记录路径中看marc格式
                true,   // 包含资源ID
                out strXmlBody,
                out strError);
            if (nRet == -1)
                goto ERROR1;

            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "当前XML数据";
            dlg.MainForm = this.MainForm;
            dlg.XmlString = strXmlBody;

            //dlg.StartPosition = FormStartPosition.CenterScreen;
            this.MainForm.AppInfo.LinkFormState(dlg, "entityform_xmlviewer_state");
            dlg.ShowDialog(this);
            this.MainForm.AppInfo.UnlinkFormState(dlg);

            return;
        ERROR1:
            MessageBox.Show(this, strError);
#endif
            if (this.MainForm.CanDisplayItemProperty() == true)
                DoViewComment(false);   // 显示在固定面板
            else
                DoViewComment(true);

        }
Beispiel #4
0
        private void MenuItem_marcEditor_getKeys_Click(object sender, EventArgs e)
        {
            string strError = "";

            // 获得书目记录XML格式
            string strBiblioXml = "";
            int nRet = this.GetBiblioXml(
                "", // 迫使从记录路径中看marc格式
                false,
                out strBiblioXml,
                out strError);
            if (nRet == -1)
                goto ERROR1;

            string strResultXml = "";
            nRet = GetKeys(this.BiblioRecPath,
                strBiblioXml,
                out strResultXml,
                out strError);
            if (nRet == -1)
                goto ERROR1;

            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "书目记录的检索点";
            dlg.MainForm = this.MainForm;
            dlg.XmlString = strResultXml;
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);
            return;
        ERROR1:
            MessageBox.Show(this, strError);
        }
Beispiel #5
0
        // 观察XML定义代码
        private void toolStripButton_arrangement_viewXml_Click(object sender, EventArgs e)
        {
            if (this.MainForm.CallNumberCfgDom == null
                || this.MainForm.CallNumberCfgDom.DocumentElement == null)
            {
                MessageBox.Show(this, "当前内存中尚未具备排架体系XML定义代码");
                return;
            }

            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "当前内存中的排架体系XML定义代码";
            dlg.MainForm = this.MainForm;
            dlg.XmlString = this.MainForm.CallNumberCfgDom.DocumentElement.OuterXml;
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog();
            return;
        }
Beispiel #6
0
        // 观察OPAC数据库定义XML
        void menu_viewOpacDatabaseDefine_Click(object sender, EventArgs e)
        {
            if (this.listView_opacDatabases.SelectedItems.Count == 0)
            {
                MessageBox.Show(this, "尚未选定要观察其定义的OPAC数据库事项");
                return;
            }

            string strXml = "";
            string strDbNameList = "";

            foreach (ListViewItem item in this.listView_opacDatabases.SelectedItems)
            {
                string strName = item.Text;
                strXml += "<!-- OPAC数据库 " + strName + " 的定义 -->";
                strXml += (string)item.Tag;

                if (String.IsNullOrEmpty(strDbNameList) == false)
                    strDbNameList += ",";
                strDbNameList += strName;
            }

            if (this.listView_opacDatabases.SelectedItems.Count > 1)
                strXml = "<virtualDatabases>" + strXml + "</virtualDatabases>";


            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "OPAC数据库  " + strDbNameList + " 的定义";
            dlg.MainForm = this.MainForm;
            dlg.XmlString = strXml;
            // dlg.StartPosition = FormStartPosition.CenterScreen;

            this.MainForm.AppInfo.LinkFormState(dlg, "ManagerForm_viewXml_state");
            dlg.ShowDialog(this);
            this.MainForm.AppInfo.UnlinkFormState(dlg);

            return;
        }
Beispiel #7
0
        private void button_viewXmlRecord_Click(object sender, EventArgs e)
        {
            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "当前XML数据";
            dlg.MainForm = this.MainForm;
            dlg.XmlString = this.XmlRecord;
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);   // ?? this
            return;
            /*
        ERROR1:
            MessageBox.Show(this, strError);
             * */
        }
Beispiel #8
0
        private void dp2QueryControl1_ViewXml(object sender, EventArgs e)
        {
            string strError = "";
            string strQueryXml = "";

            int nRet = dp2QueryControl1.BuildQueryXml(
this.MaxSearchResultCount,
"zh",
out strQueryXml,
out strError);
            if (nRet == -1)
            {
                strError = "在创建XML检索式的过程中出错: " + strError;
                goto ERROR1;
            }

            XmlViewerForm dlg = new XmlViewerForm();

            dlg.Text = "检索式XML";
            dlg.MainForm = this.MainForm;
            dlg.XmlString = strQueryXml;
            // dlg.StartPosition = FormStartPosition.CenterScreen;

            this.MainForm.AppInfo.LinkFormState(dlg, "bibliosearchform_viewqueryxml");
            dlg.ShowDialog(this);
            this.MainForm.AppInfo.UnlinkFormState(dlg);

            return;
        ERROR1:
            MessageBox.Show(this, strError);
        }