private void InitForm() { #region 初始化界面资源 tbTitle.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Title"); btnSave.Content = PubHelper.p_LangOper.GetStringBundle("Pub_Btn_Save"); btnCancel.Content = PubHelper.p_LangOper.GetStringBundle("Pub_Btn_Cancel"); tbSellGoodsType.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_SellType"); tbVendBoxCode.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_VendBox"); tbShippPort.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_ShippPort"); tbUpDownSellModel.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_SellModel");// 出货指令 rdbUpDownSellModel_ZhiJie.Content = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_SellModel_ZJ"); rdbUpDownSellModel_Pra.Content = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_SellModel_Pra"); tbUpDownIsQueryElectStatus.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_GuangDian"); rdbUpDownIsQueryElectStatus_Yes.Content = PubHelper.p_LangOper.GetStringBundle("Pub_Device_Run"); rdbUpDownIsQueryElectStatus_No.Content = PubHelper.p_LangOper.GetStringBundle("Pub_Device_Close"); tbLeftSpace_Title.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_LeftSpace"); tbMiddleSpace_Title.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_MiddleSpace"); tbRightSpace_Title.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_Cfg_RightSpace"); for (int i = 1; i < 11; i++) { cmbShippPort.Items.Add("COM" + i.ToString()); } #endregion #region 加载数据 int intVendBoxIndex = PubHelper.p_BusinOper.AsileOper.GetVendBoxIndex(PubHelper.p_VendBoxCode); // 柜号 tbVendCode_Value.Text = DictionaryHelper.Dictionary_VendBoxName(PubHelper.p_VendBoxCode); // 出货方式 tbSellGoodsType_Value.Text = DictionaryHelper.Dictionary_SellGoodsType(PubHelper.p_VendBoxCode); // 驱动板串口 cmbShippPort.Text = "COM" + PubHelper.p_BusinOper.AsileOper.VendBoxList[intVendBoxIndex].ShippPort; // 出货指令 if (PubHelper.p_BusinOper.AsileOper.VendBoxList[intVendBoxIndex].UpDownSellModel == "0") { // 直接升降 rdbUpDownSellModel_ZhiJie.IsChecked = true; } else { rdbUpDownSellModel_Pra.IsChecked = true; } // 光电检测 if (PubHelper.p_BusinOper.AsileOper.VendBoxList[intVendBoxIndex].UpDownIsQueryElectStatus == Business.Enum.BusinessEnum.ControlSwitch.Run) { // 开启光电检测 rdbUpDownIsQueryElectStatus_Yes.IsChecked = true; } else { rdbUpDownIsQueryElectStatus_No.IsChecked = true; } tbLeftSpace_Value.Text = PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Left.ToString(); tbMiddleSpace_Value.Text = PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Center.ToString(); tbRightSpace_Value.Text = PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Right.ToString(); #endregion }