Esempio n. 1
0
        private void ComBoxSysLanguage_SelectedIndexChanged(object sender, EventArgs e)
        {
            string language = MultiLanguage.GetLanguage();

            switch (ComBoxSysLanguage.SelectedIndex)
            {
            case 0:
                language = "zh-CN";
                break;

            case 1:
                language = "en-US";
                break;

            default:
                break;
            }

            MultiLanguage.SetLanguage(language);

            //改变所有打开窗体的语言
            foreach (Form form in Application.OpenForms)
            {
                ChangeOpenedFormLanguage(form);
            }
        }
Esempio n. 2
0
        public static void MessageBoxShow(string[] StrMessage)
        {
            int Language = (int)LanguageId.Language_CN;

            if (MultiLanguage.GetLanguage() == "en-US")
            {
                Language = (int)LanguageId.Language_EN;
            }

            MessageBox.Show(StrMessage[Language], StationName[Language], MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
Esempio n. 3
0
        private void SystemSeting_Load(object sender, EventArgs e)
        {
            CGroupBoxSysLanguage.Visible = true;  //隐藏掉系统语言的设置

            tabControlSystemSeting.Width  = this.Width - tabControlSystemSeting.Location.X;
            tabControlSystemSeting.Height = this.Height - tabControlSystemSeting.Location.Y;

            //根据默认的属性配置来设置当前语言项
            if (MultiLanguage.GetLanguage() == "zh-CN")
            {
                ComBoxSysLanguage.SelectedIndex = 0;
            }
            else if (MultiLanguage.GetLanguage() == "en-US")
            {
                ComBoxSysLanguage.SelectedIndex = 1;
            }
        }
Esempio n. 4
0
        private void SystemSeting_Load(object sender, EventArgs e)
        {
            tabControlSystemSeting.Width  = this.Width - tabControlSystemSeting.Location.X;
            tabControlSystemSeting.Height = this.Height - tabControlSystemSeting.Location.Y;

            CTextBoxSysSetRobotIP.Text = Profile.m_Config.RobotIp;

            //根据默认的属性配置来设置当前语言项
            if (MultiLanguage.GetLanguage() == "zh-CN")
            {
                ComBoxSysLanguage.SelectedIndex = 0;
            }
            else if (MultiLanguage.GetLanguage() == "en-US")
            {
                ComBoxSysLanguage.SelectedIndex = 1;
            }
        }
Esempio n. 5
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(MultiLanguage.GetLanguage());

            Application.Run(new MainForm());
        }