public void OpenSetting() { List <System.Windows.Forms.InputLanguage> list = new List <System.Windows.Forms.InputLanguage>(); foreach (System.Windows.Forms.InputLanguage val in System.Windows.Forms.InputLanguage.InstalledInputLanguages) { list.Add(val); } ((IfrmSetting)iBaseView["FrmSetting"]).languageList = list; ((IfrmSetting)iBaseView["FrmSetting"]).inputMethod_CH = CustomConfigManager.GetInputMethod(EN_CH.CH); ((IfrmSetting)iBaseView["FrmSetting"]).inputMethod_EN = CustomConfigManager.GetInputMethod(EN_CH.EN); //打印机 ManagementObjectSearcher query; ManagementObjectCollection queryCollection; string _classname = "SELECT * FROM Win32_Printer"; query = new ManagementObjectSearcher(_classname); queryCollection = query.Get(); ((IfrmSetting)iBaseView["FrmSetting"]).loadPrinter(queryCollection, CustomConfigManager.GetPrinter(0), CustomConfigManager.GetPrinter(1), CustomConfigManager.GetPrinter(2)); //消息 ((IfrmSetting)iBaseView["FrmSetting"]).runacceptMessage = CustomConfigManager.GetrunacceptMessage() == 1 ? true : false; ((IfrmSetting)iBaseView["FrmSetting"]).displayWay = CustomConfigManager.GetDisplayWay() == 1 ? true : false; ((IfrmSetting)iBaseView["FrmSetting"]).setbackgroundImage = CustomConfigManager.GetBackgroundImage(); ((IfrmSetting)iBaseView["FrmSetting"]).mainStyle = CustomConfigManager.GetMainStyle(); ((System.Windows.Forms.Form)iBaseView["FrmSetting"]).ShowDialog(); }
void _control_Enter(object sender, EventArgs e) { Control ctl = (Control)sender; FormItem item = itemlist.Find(x => x.controlItem.Equals(ctl)); int index = CustomConfigManager.GetInputMethod(item.inputMethod); InputLanguage currentLanguage = InputLanguage.InstalledInputLanguages[index]; InputLanguage.CurrentInputLanguage = currentLanguage; }