Пример #1
0
        private void EaccForm_Load(object sender, EventArgs e)
        {
            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);  // 和容器关联


            this.textBox_unihanFilenames.Text = MainForm.AppInfo.GetString(
                "eacc_form",
                "unihan_filename",
                "");
            this.textBox_e2uFilename.Text = MainForm.AppInfo.GetString(
                "eacc_form",
                "e2u_filename",
                "");

            /*
             * this.textBox_u2eFilename.Text = MainForm.applicationInfo.GetString(
             *  "eacc_form",
             *  "u2e_filename",
             *  "");
             * */

            Global.FillEncodingList(this.comboBox_codePage,
                                    false);
        }
Пример #2
0
        private void GetEncodingForm_Load(object sender, EventArgs e)
        {
            // 填充编码名列表

            /*
             * this.comboBox_encoding.Items.Clear();
             * List<string> encodings = ZSearchForm.GetEncodingList(false);
             * for (int i = 0; i < encodings.Count; i++)
             * {
             *  this.comboBox_encoding.Items.Add(encodings[i]);
             * }
             * */
            Global.FillEncodingList(this.comboBox_encoding, false);

            if (this.Encoding != null)
            {
                /*
                 * EncodingInfo info = GetEncodingInfo(this.Encoding);
                 * if (info != null)
                 *  this.comboBox_encoding.Text = info.Name;
                 * */
                this.comboBox_encoding.Text = GetEncodingName(this.Encoding);
            }
            else
            {
                this.comboBox_encoding.Text = "";   // 2007/8/9
            }
        }
Пример #3
0
        private void RecordSyntaxAndEncodingBindingItemDlg_Load(object sender, EventArgs e)
        {
            Global.FillEncodingList(this.comboBox_encoding, true);

            /*
             * // 补充MARC-8编码方式
             * this.comboBox_encoding.Items.Add("MARC-8");
             * */
        }
Пример #4
0
        private void XmlDetailForm_Load(object sender, EventArgs e)
        {
            stop = new DigitalPlatform.Stop();
            stop.Register(MainForm.stopManager, true);  // 和容器关联

            Global.FillEncodingList(this.comboBox_originDataEncoding,
                                    false);

            this.NeedIndentXml = this.MainForm.AppInfo.GetBoolean(
                "xmldetailform",
                "need_indent_xml",
                true);

            API.PostMessage(this.Handle, WM_LOADSIZE, 0, 0);
        }
Пример #5
0
        private void ZServerPropertyForm_Load(object sender, EventArgs e)
        {
            this.textBox_serverName.Text = DomUtil.GetAttr(this.XmlNode,
                                                           "name");
            this.textBox_serverAddr.Text = DomUtil.GetAttr(this.XmlNode,
                                                           "addr");
            this.textBox_serverPort.Text = DomUtil.GetAttr(this.XmlNode,
                                                           "port");

            this.textBox_homepage.Text = DomUtil.GetAttr(this.XmlNode,
                                                         "homepage");

            ///
            string strAuthMethod = DomUtil.GetAttr(this.XmlNode,
                                                   "authmethod");
            int nAuthMethod = 0;

            try
            {
                nAuthMethod = Convert.ToInt32(strAuthMethod);
            }
            catch
            {
            }

            if (nAuthMethod == 0)
            {
                this.radioButton_authenStyeOpen.Checked = true;
            }
            else
            {
                this.radioButton_authenStyleIdpass.Checked = true;
            }

            this.textBox_groupID.Text = DomUtil.GetAttr(this.XmlNode,
                                                        "groupid");
            this.textBox_userName.Text = DomUtil.GetAttr(this.XmlNode,
                                                         "username");
            string strPassword = DomUtil.GetAttr(this.XmlNode,
                                                 "password");

            this.textBox_password.Text = GetPassword(strPassword);

            this.checkBox_autoDetectEACC.Checked = GetBool(
                DomUtil.GetAttr(this.XmlNode,
                                "converteacc"));

            this.checkBox_alwaysUseFullElementSet.Checked =
                GetBool(DomUtil.GetAttr(this.XmlNode,
                                        "firstfull"));

            this.checkBox_autoDetectMarcSyntax.Checked =
                GetBool(DomUtil.GetAttr(this.XmlNode,
                                        "detectmarcsyntax"));

            this.checkBox_ignoreRerenceID.Checked = GetBool(
                DomUtil.GetAttr(this.XmlNode,
                                "ignorereferenceid"));

            // 对ISBN的预处理
            this.m_nDisableCheckIsbnParameters++;
            try
            {
                this.checkBox_isbn_forceIsbn13.Checked = GetBool(
                    DomUtil.GetAttr(this.XmlNode,
                                    "isbn_force13"));
                this.checkBox_isbn_forceIsbn10.Checked = GetBool(
                    DomUtil.GetAttr(this.XmlNode,
                                    "isbn_force10"));
                this.checkBox_isbn_addHyphen.Checked = GetBool(
                    DomUtil.GetAttr(this.XmlNode,
                                    "isbn_addhyphen"));
                this.checkBox_isbn_removeHyphen.Checked = GetBool(
                    DomUtil.GetAttr(this.XmlNode,
                                    "isbn_removehyphen"));
                this.checkBox_isbn_wild.Checked = GetBool(
                    DomUtil.GetAttr(this.XmlNode,
                                    "isbn_wild"));
            }
            finally
            {
                this.m_nDisableCheckIsbnParameters--;
            }

            // 2018/8/25
            string strValue = DomUtil.GetAttr(this.XmlNode, "issn_force8");

            if (string.IsNullOrEmpty(strValue))
            {
                strValue = "1"; // 缺省值为 1
            }
            this.checkBox_forceIssn8.Checked = GetBool(strValue);

            this.textBox_presentPerCount.Text = DomUtil.GetAttr(this.XmlNode,
                                                                "recsperbatch");

            // 数据库名
            XmlNodeList nodes = this.XmlNode.SelectNodes("database");

            for (int i = 0; i < nodes.Count; i++)
            {
                string strDatabaseName = DomUtil.GetAttr(nodes[i], "name");

                if (this.textBox_databaseNames.Text != "")
                {
                    this.textBox_databaseNames.Text += "\r\n";
                }

                this.textBox_databaseNames.Text += strDatabaseName;

                // 全选时候要排除的数据库名
                bool   bValue   = false;
                string strError = "";
                DomUtil.GetBooleanParam(nodes[i],
                                        "notInAll",
                                        false,
                                        out bValue,
                                        out strError);
                if (bValue == true)
                {
                    if (this.textBox_notInAllDatabaseNames.Text != "")
                    {
                        this.textBox_notInAllDatabaseNames.Text += "\r\n";
                    }

                    this.textBox_notInAllDatabaseNames.Text += strDatabaseName;
                }
            }

            Global.FillEncodingList(this.comboBox_defaultEncoding,
                                    true);
            this.comboBox_defaultEncoding.Text = DomUtil.GetAttr(this.XmlNode,
                                                                 "defaultEncoding");

            /*
             * // 补充MARC-8
             * this.comboBox_defaultEncoding.Items.Add("MARC-8");
             * */

            Global.FillEncodingList(this.comboBox_queryTermEncoding,
                                    false); // 检索词暂时不让用MARC-8编码方式
            this.comboBox_queryTermEncoding.Text = DomUtil.GetAttr(this.XmlNode,
                                                                   "queryTermEncoding");



            this.comboBox_defaultMarcSyntaxOID.Text = DomUtil.GetAttr(this.XmlNode,
                                                                      "defaultMarcSyntaxOID");

            this.comboBox_defaultElementSetName.Text = DomUtil.GetAttr(this.XmlNode,
                                                                       "defaultElementSetName");

            string strBindingDef = DomUtil.GetAttr(this.XmlNode,
                                                   "recordSyntaxAndEncodingBinding");

            SetBinding(strBindingDef);


            // 字符集协商
            this.checkBox_charNegoUTF8.Checked = GetBool(DomUtil.GetAttr(this.XmlNode,
                                                                         "charNegoUtf8"));
            this.checkBox_charNegoRecordsInSelectedCharSets.Checked = GetBool(DomUtil.GetAttr(this.XmlNode,
                                                                                              "charNego_recordsInSeletedCharsets"));

            checkBox_charNegoUTF8_CheckedChanged(null, null);

            // initial result info

            /*
             * this.textBox_initializeInfomation.Text = DomUtil.GetAttr(this.XmlNode,
             *  "extraInfo");
             * */
            this.textBox_initializeInfomation.Text = InitialResultInfo;

            // set initial button state
            textBox_homepage_TextChanged(this, null);

            // 联合编目
            this.textBox_unionCatalog_bindingDp2ServerName.Text = DomUtil.GetAttr(
                this.XmlNode, "unionCatalog_bindingDp2ServerName");

            this.textBox_unionCatalog_bindingUcServerUrl.Text = DomUtil.GetAttr(
                this.XmlNode, "unionCatalog_bindingUcServerUrl");
        }