Quinctia/ConfigHelper.cs

(开头部分) 62KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * ConfigHelper - 配置的读取类
 * 代码功能:读取 Quinctia 需要装载的所有配置
 * 作者名称:Tsybius2014
 * 创建时间:2015年1月17日
 * 最后修改:2015年1月17日
 * */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Data;
using System.Xml;

namespace Quinctia
{
    class ConfigHelper
    {
        /// <summary>
        /// 语言配置
        /// </summary>
        public class LanguageConfig
        {
            /// <summary>
            /// 刷新语言设置
            /// </summary>
            /// <param name="langpath"></param>
            public static void RefreshLanguageConfig(string langpath)
            {
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.Load(langpath);

                XmlNode root = xmlDoc.SelectSingleNode(ConstantDict.CONSTANT_LANG_LANGUAGE);
                foreach (XmlNode xnLang in root.ChildNodes)
                {
                     //只有读取到XmlElement才进一步读取
                    if (xnLang.GetType().ToString() == "System.Xml.XmlElement")
                    {
                        XmlElement xeLang = (XmlElement)xnLang;

                        switch (xeLang.Name.Trim())
                        {
                            case ConstantDict.CONSTANT_LANG_FORM_MAIN: SetFormMain(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_SELECT_FROM_TABLE: SetFormSelectFromTable(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_ABOUT: SetFormAbout(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_SELECT_LANGUAGE: SetFormSelectLanguage(xeLang); break;

                            case ConstantDict.CONSTANT_LANG_FORM_MONOGRAPH: SetFormMonograph(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_MONOGRAPH_CONTRIBUTION: SetFormMonographContribution(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_SERIAL: SetFormSerial(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_SERIAL_CONTRIBUTION: SetFormSerialContribution(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_PATENT_DOCUMENT: SetFormPatentDocument(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_FORM_ELECTRONIC_DOCUMENT: SetFormElectronicDocument(xeLang); break;

                            case ConstantDict.CONSTANT_LANG_DGV_LIT_CARRIER_TYPE: SetDgvColumnCarrierType(xeLang); break;
                            case ConstantDict.CONSTANT_LANG_NODE_ERRORS: SetErrors(xeLang); break;
                            default: break;
后面还有 1158 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。