Esempio n. 1
0
        /// <summary>
        /// 更新语言资源
        /// </summary>
        private void UpdateLanguage()
        {
            try
            {
                if (File.Exists(CommonInfo.LangTypeFileName))
                {
                    File.Open(CommonInfo.LangTypeFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
                    langType = File.ReadAllText(CommonInfo.LangTypeFileName);
                    OutputDebugInfoStr(false, "获取语言资源类型OK,类型为:" + langType);
                }
            }
            catch (Exception ex)
            {
                langType = "zh-CN";
                MonitorAllConfig.Instance().WriteLogToFile("ExistCatch:获取语言资源类型异常:" + ex.ToString());
                OutputDebugInfoStr(false, "获取语言资源类型异常:" + ex.Message);
            }

            CommonInfo.ProtocalLangFileName = CommonInfo.AppLangPath + langType + "\\Protocal." + langType + ".resources";
            CommonInfo.LanFileName          = CommonInfo.AppLangPath + langType + "\\Frm_MonitorDisplay." + langType + ".resources";
            Nova.Monitoring.UI.MonitorFromDisplay.CommonUI.SetLanguage(langType);
            MultiLanguageUtils.ReadLanguageResource(CommonInfo.LanFileName, "Frm_MonitorMain", out LangHashTable);
            toolStripMenuItem_OpenMain.Text            = GetLangControlText("toolStripMenuItem_OpenMain", "打开用户界面(&O)");
            ToolStripMenuItem_Exit.Text                = GetLangControlText("ToolStripMenuItem_Exit", "退出(&Q)");
            toolStripMenuItem_OpenBrightAllConfig.Text = GetLangControlText("toolStripMenuItem_OpenBrightAllConfig", "亮度高级配置");
            toolStripMenuItem_ReReadScreen.Text        = GetLangControlText("toolStripMenuItem_ReReadScreen", "重读屏体");
            //notifyIcon.Text = GetLangControlText("notifyIcon", "监控终端平台");
            MultiLanguageUtils.ReadLanguageResource(CommonInfo.LanFileName, "Form_ErrorNotice", out _errorFrmHashTable);
            ProtocalLangParser = new ProtocalLanguageParser(CommonInfo.ProtocalLangFileName);
            //MultiLanguageUtils.ReadLanguageResource(CommonInfo.LanFileName, "Frm_MonitorStatusDisplayInfo", out LangHashTable);
            //MultiLanguageUtils.ReadLanguageResource(CommonInfo.ProtocalLangFileName, "ProtocolEnum_Interface", out ProtocalHashTable);
            CustomMessageBox.LangFileName = CommonInfo.LanFileName;
            Hashtable lang;

            MultiLanguageUtils.ReadLanguageResource(CommonInfo.LanFileName, "EMailNotify_String", out lang);
            MonitorAllConfig.Instance().EMailLangHsTable = lang;
            MonitorAllConfig.Instance().ScreenName       = GetLangControlText("Screen", "屏");
            MonitorAllConfig.Instance().WriteLogToFile("ScreenName Language:" + MonitorAllConfig.Instance().ScreenName);
            Font oldFont = _softwareFont;

            if (langType.ToLower() == STR_LANG_ZHCN.ToLower())
            {
                _softwareFont = _zhchFont;
            }
            else if (langType.ToLower() == STR_LANG_KOKR.ToLower())
            {
                _softwareFont = _kokrFont;
            }
            else
            {
                _softwareFont = _enFont;
            }

            if (MonitorFromDisplay.Frm_MonitorDisplayMain.IsOpen)
            {
                MonitorFromDisplay.Frm_MonitorDisplayMain.Instance(false).UpdateLanguage(langType, CommonInfo.ProtocalLangFileName);
            }

            UpdateFont(_softwareFont);
        }
 /// <summary>
 /// 更新语言资源
 /// </summary>
 /// <param name="langResFile">语言资源路径</param>
 private void UpdateLang(string langResFile)
 {
     MultiLanguageUtils.UpdateLanguage(langResFile, "UC_BrightnessConfig", this);
     MultiLanguageUtils.ReadLanguageResource(langResFile, "UC_BrightnessConfig", out _langTable);
     HsLangTable = _langTable;
     InitialLangTable();
 }
        public bool UpdateLanguage(Hashtable hashtable)
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
            _hashtable = hashtable;

            return(true);
        }
 private void Frm_AdvanceSetting_Load(object sender, EventArgs e)
 {
     if (_oneLedInfos != null && _oneLedInfos.Count > 0)
     {
         label_Notice.Visible = false;
         tabControl_ScreenLayout.TabPages.Clear();
         string pageName  = "";
         int    pageIndex = 0;
         foreach (ILEDDisplayInfo led in _oneLedInfos)
         {
             if (led == null)
             {
                 continue;
             }
             pageName = _sn;//GetLangControlText("ScreenName", "屏") +
             AddOneScreenInf(_commPort, pageIndex, pageName, led);
             pageIndex++;
         }
     }
     else
     {
         label_Notice.Visible = true;
     }
     MultiLanguageUtils.UpdateLanguage(LanFileName, this);
 }
Esempio n. 5
0
        private void UpdateLanguage()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
            Hashtable _hashTable = null;

            MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "UC_CycleConfig_String", out _hashTable);
            HsLangTable = _hashTable;
        }
        private void UpdateLanguage()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
            Hashtable _hashTable = null;

            MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "UC_DataAlarmConfig_String", out _hashTable);
            HsLangTable = _hashTable;
            label_TempUnit_TextChanged(null, null);
        }
Esempio n. 7
0
        private void ApplyUILanguageTable()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.ScreenRegistrationLangPath, "Frm_RegisterScreen", this);
            MultiLanguageUtils.ReadLanguageResource(CommonUI.ScreenRegistrationLangPath, "Frm_RegisterScreen", out _languageTable);

            if (_languageTable == null || _languageTable.Count == 0)
            {
                return;
            }
        }
Esempio n. 8
0
        private void ApplyUILanguageTable()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.OpticalProbeConfigLangPath, this);
            MultiLanguageUtils.ReadLanguageResource(CommonUI.OpticalProbeConfigLangPath, "frm_AutoSection", out _languageTable);

            if (_languageTable == null || _languageTable.Count == 0)
            {
                return;
            }
        }
Esempio n. 9
0
        private void UpdateLanguage()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
            Hashtable _hashTable = null;

            MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "UC_PowerControlConfig_String", out _hashTable);
            HsLangTable = _hashTable;
            dataGridViewBaseEx_FuncCardPower.Columns[1].HeaderText = CommonUI.GetCustomMessage(_hashTable, "FuncAliaName", "设备别名");
            dataGridViewBaseEx_FuncCardPower.Columns[0].HeaderText = CommonUI.GetCustomMessage(_hashTable, "FuncLocation", "设备位置");
        }
        /// <summary>
        /// 载入语言资源
        /// </summary>
        /// <param name="langFileName"></param>
        /// <param name="proxyLangName"></param>
        /// <returns></returns>
        public bool UpdateLanguage(string langFileName)
        {
            LanFileName = langFileName;
            MultiLanguageUtils.UpdateLanguage(LanFileName, this);
            MultiLanguageUtils.ReadLanguageResource(LanFileName, "Frm_AdvanceSettingInfo", out LangHashTable);

            StaticValue.SenderName = Frm_FanPowerAdvanceSetting.GetLangControlText("SenderName", StaticValue.SenderName);
            StaticValue.PortName   = Frm_FanPowerAdvanceSetting.GetLangControlText("PortName", StaticValue.PortName);

            StaticValue.ScanBoardName = Frm_FanPowerAdvanceSetting.GetLangControlText("ScanBoardName", StaticValue.ScanBoardName);
            StaticValue.CountStr      = Frm_FanPowerAdvanceSetting.GetLangControlText("Count", StaticValue.CountStr);
            return(true);
        }
Esempio n. 11
0
        private void UpdateLanguage()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
            Hashtable _hashTable = null;

            MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "UC_EMailNotify_String", out _hashTable);
            HsLangTable = _hashTable;

            dataGridView_receiver.Columns["Name"].HeaderText =
                CommonUI.GetCustomMessage(HsLangTable, "ReceiverName", "姓名");
            dataGridView_receiver.Columns["EmailAddr"].HeaderText =
                CommonUI.GetCustomMessage(HsLangTable, "EmailAddr", "邮箱地址");
        }
        private void ApplyUILanguageTable()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.OpticalProbeConfigLangPath, this);
            MultiLanguageUtils.ReadLanguageResource(CommonUI.OpticalProbeConfigLangPath, "frm_OpticalProbeConfig", out _languageTable);

            if (_languageTable == null || _languageTable.Count == 0)
            {
                return;
            }

            foreach (DataGridViewColumn columnItem in brightnessDataGridView.Columns)
            {
                if (columnItem.CellType == typeof(DataGridViewButtonCell))
                {
                    string strText = CommonUI.GetCustomMessage(_languageTable, (columnItem.Name + "_Text").ToLower(), string.Empty);
                    (columnItem as DataGridViewButtonColumn).Text = strText;
                }
                string str = CommonUI.GetCustomMessage(_languageTable, columnItem.Name.ToLower(), string.Empty);
                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }
                columnItem.HeaderText = str;
            }
            foreach (DataGridViewColumn columnItem in opticalProbeDataGridView.Columns)
            {
                if (columnItem.CellType == typeof(DataGridViewButtonCell))
                {
                    string strText = CommonUI.GetCustomMessage(_languageTable, (columnItem.Name + "_Text").ToLower(), string.Empty);
                    (columnItem as DataGridViewButtonColumn).Text = strText;
                }
                string str = CommonUI.GetCustomMessage(_languageTable, columnItem.Name.ToLower(), string.Empty);
                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }
                columnItem.HeaderText = str;
            }

            if (_isTestStart)
            {
                crystalButton_BrightTest.Text = CommonUI.GetCustomMessage(_languageTable, "crystalButton_BrightTestStop", "停止测试");
            }
            else
            {
                crystalButton_BrightTest.Text = CommonUI.GetCustomMessage(_languageTable, "crystalButton_BrightTestStart", "光探头测试");
            }
        }
Esempio n. 13
0
        private void UpdateLanguage()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
            Hashtable _hashTable = null;

            MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "UC_CareServerConfig_String", out _hashTable);
            //dataGridViewBaseEx_Care.Columns[0].HeaderText = CommonUI.GetCustomMessage(_hashTable, "ScreenSN", "屏ID");
            //dataGridViewBaseEx_Care.Columns[1].HeaderText = CommonUI.GetCustomMessage(_hashTable, "SnAlia", "屏别名");
            //dataGridViewBaseEx_Care.Columns[2].HeaderText = CommonUI.GetCustomMessage(_hashTable, "Longitude", "经度");
            //dataGridViewBaseEx_Care.Columns[3].HeaderText = CommonUI.GetCustomMessage(_hashTable, "Latitude", "纬度");
            //dataGridViewBaseEx_Care.Columns[4].HeaderText = CommonUI.GetCustomMessage(_hashTable, "MapName", "地图");
            //dataGridViewBaseEx_Care.Columns[5].HeaderText = CommonUI.GetCustomMessage(_hashTable, "Width", "宽度");
            //dataGridViewBaseEx_Care.Columns[6].HeaderText = CommonUI.GetCustomMessage(_hashTable, "Height", "高度");
            //dataGridViewBaseEx_Care.Columns[7].HeaderText = CommonUI.GetCustomMessage(_hashTable, "CareStatus", "注册状态");
            //dataGridViewBaseEx_Care.Columns[8].HeaderText = CommonUI.GetCustomMessage(_hashTable, "ScreenMsg", "屏信息");
        }
Esempio n. 14
0
        private void UpdateLanguage()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
            Hashtable _hashTable = null;

            MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "UC_EMailNotifyLog_String", out _hashTable);
            HsLangTable         = _hashTable;
            _emailStatusFailed  = CommonUI.GetCustomMessage(HsLangTable, "StatusFailed", "失败");
            _emailStatusSended  = CommonUI.GetCustomMessage(HsLangTable, "StatusSended", "已发送");
            _emailStatusSucceed = CommonUI.GetCustomMessage(HsLangTable, "StatusSucceed", "成功");
            dataGridView_logShow.Columns["Column_NotifyTime"].HeaderText =
                CommonUI.GetCustomMessage(HsLangTable, "ColumnNotifyTime", "通知时间");
            dataGridView_logShow.Columns["Column_ReceiveName"].HeaderText =
                CommonUI.GetCustomMessage(HsLangTable, "ColumnReceiveName", "收信人");
            dataGridView_logShow.Columns["Column_Title"].HeaderText =
                CommonUI.GetCustomMessage(HsLangTable, "ColumnTitle", "标题");
            dataGridView_logShow.Columns["Column_MsgContent"].HeaderText =
                CommonUI.GetCustomMessage(HsLangTable, "ColumnMsgContent", "通知内容");
            dataGridView_logShow.Columns["Column_NotifyState"].HeaderText =
                CommonUI.GetCustomMessage(HsLangTable, "ColumnNotifyState", "发送状态");
        }
Esempio n. 15
0
        public void ApplyUILanguageTable()
        {
            MultiLanguageUtils.UpdateLanguage(CommonUI.ScreenRegistrationLangPath, this);
            MultiLanguageUtils.ReadLanguageResource(CommonUI.ScreenRegistrationLangPath, "Frm_RegistrationManager", out _languageTable);

            if (_languageTable == null || _languageTable.Count == 0)
            {
                return;
            }

            foreach (DataGridViewColumn columnItem in screenRegistationInfoDataGridView.Columns)
            {
                //if (columnItem.CellType == typeof(DataGridViewButtonCell))
                //{
                //    string strText = CommonUI.GetCustomMessage(_languageTable, (columnItem.Name + "_Text").ToLower(), string.Empty);
                //    (columnItem as DataGridViewButtonColumn).Text = strText;
                //}
                string str = CommonUI.GetCustomMessage(_languageTable, columnItem.Name, string.Empty);
                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }
                columnItem.HeaderText = str;
            }
            //foreach (DataGridViewColumn columnItem in screenRegistationInfoDataGridView.Columns)
            //{
            //    if (columnItem.CellType == typeof(DataGridViewButtonCell))
            //    {
            //        string strText = CommonUI.GetCustomMessage(_languageTable, (columnItem.Name + "_Text").ToLower(), string.Empty);
            //        (columnItem as DataGridViewButtonColumn).Text = strText;
            //    }
            //    string str = CommonUI.GetCustomMessage(_languageTable, columnItem.Name.ToLower(), string.Empty);
            //    if (string.IsNullOrEmpty(str))
            //    {
            //        continue;
            //    }
            //    columnItem.HeaderText = str;
            //}
        }
        public bool UpdateLanguage(string langFileName, string proxyLangName)
        {
            MultiLanguageUtils.UpdateLanguage(langFileName, this);

            return(true);
        }
 /// <summary>
 /// 更新语言资源
 /// </summary>
 /// <param name="langResFile">语言资源路径</param>
 private void UpdateLang(string langResFile)
 {
     MultiLanguageUtils.UpdateLanguage(langResFile, this);
     MultiLanguageUtils.ReadLanguageResource(langResFile, "frm_WHControlConfig_Editor_String", out _langTable);
 }
Esempio n. 18
0
 /// <summary>
 /// 更新语言资源
 /// </summary>
 /// <param name="langResFile">语言资源路径</param>
 private void UpdateLang(string langResFile)
 {
     MultiLanguageUtils.UpdateLanguage(langResFile, "UC_WHControlConfig", this);
     MultiLanguageUtils.ReadLanguageResource(langResFile, "UC_WHControlConfig_String", out _langTable);
     InitialLangTable();
 }
Esempio n. 19
0
 public void UpdateLanguage()
 {
     MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
     MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "Frm_MonitorConfigManager_String", out _hashTable);
 }
Esempio n. 20
0
 /// <summary>
 /// 更新语言资源
 /// </summary>
 /// <param name="langResFile">语言资源路径</param>
 private void UpdateLang(string langResFile)
 {
     MultiLanguageUtils.UpdateLanguage(langResFile, "UC_PowerManager", this);
 }
 /// <summary>
 /// 更新语言资源
 /// </summary>
 /// <param name="langResFile">语言资源路径</param>
 private void UpdateLang(string langResFile)
 {
     MultiLanguageUtils.UpdateLanguage(langResFile, this);
     MultiLanguageUtils.ReadLanguageResource(langResFile, "frm_BrightnessConfig_String", out _langTable);
 }
 public void UpdateLanguage(string langType, string proxyLangName)
 {
     CommonUI.SetLanguage(langType);
     MultiLanguageUtils.UpdateLanguage(CommonUI.LanguageName, this);
     MultiLanguageUtils.ReadLanguageResource(CommonUI.LanguageName, "Frm_SmartBrightness_String", out _hashtable);
 }
Esempio n. 23
0
 /// <summary>
 /// ÔØÈëÓïÑÔ×ÊÔ´
 /// </summary>
 /// <param name="langFileName"></param>
 /// <param name="proxyLangName"></param>
 /// <returns></returns>
 private void UpdateLanguage(string langFileName)
 {
     MultiLanguageUtils.UpdateLanguage(langFileName, this);
     checkBox_IsConnect.Text += _typeStr;
 }
 /// <summary>
 /// 更新语言资源
 /// </summary>
 /// <param name="langResFile">语言资源路径</param>
 private void UpdateLang(string langResFile)
 {
     MultiLanguageUtils.UpdateLanguage(langResFile, "UC_WHControlConfig_Tem", this);
 }
Esempio n. 25
0
 private void ApplyUILanguageTable()
 {
     MultiLanguageUtils.UpdateLanguage(CommonUI.OpticalProbeConfigLangPath, this);
     MultiLanguageUtils.ReadLanguageResource(CommonUI.OpticalProbeConfigLangPath, "Frm_AddMappingItem", out _languageTable);
 }
 /// <summary>
 /// 更新语言资源
 /// </summary>
 /// <param name="langResFile">语言资源路径</param>
 public void UpdateLang(string langResFile)
 {
     MultiLanguageUtils.UpdateLanguage(langResFile, "UC_Brightness", this);
     MultiLanguageUtils.ReadLanguageResource(langResFile, "UC_Brightness_String", out _langTable);
     InitialLangTable();
 }