Ejemplo n.º 1
0
        private void Login_Load(object sender, EventArgs e)
        {
            try
            {
                //应用程序执行路径
                strPath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);

                config = new ConfigValue();
                //string currentOsLanguage = System.Globalization.CultureInfo.CurrentUICulture.IetfLanguageTag;
                string currentOsLanguage = "zh-TW";
                LANGUAGE_DIR = strPath + @"\Lang\" + currentOsLanguage + @"\";

                string[] dlls = new string[] {
                    "GAMES.ini",
                    "MAIN.ini",
                    "MSDO.ini",
                    "GLOBAL.ini",
                    "MAU.ini",
                    "MAUDITION.ini",
                    "MBAF.ini",
                    "MCR.ini",
                    "MGM.ini",
                    "MO2JAM.ini",
                    "MSOCCER.ini",
                    "MRC.ini",
                    "MJW2.ini",
                    "MSD.ini"
                };


                for (int i = 0; i < dlls.Length; i++)
                {
                    lang_ini_file = new C_Global.CIniFile(LANGUAGE_DIR + dlls[i]);

                    config.Add(dlls[i].Split(new char[] { '.' })[0], lang_ini_file);
                }

                //config.ReadConfigValue("MAIN","Main_UI_Menu_SystemManage")

                IntiUI();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }