private void InitForm() { #region 加载标签 tbTitle.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert"); btnCancel.Content = PubHelper.p_LangOper.GetStringBundle("Pub_Btn_Cancel"); btnSave.Content = PubHelper.p_LangOper.GetStringBundle("Pub_Btn_Save"); btnImport.Content = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_Import"); btnPriew.Content = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_Priview"); tbAdvUploadType.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_UploadType"); tbNowAdvListID.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_NowAdvListID"); tbUploadAdvListID.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_UploadAdvListID"); tbAdvertSwitch.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_Switch"); ////tbImgShowTime.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_ImgShowTime"); tbPlayOutTime.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_PlayOutTime"); string strRun = PubHelper.p_LangOper.GetStringBundle("Pub_Run"); string strStop = PubHelper.p_LangOper.GetStringBundle("Pub_Stop"); rdbAdvertSwitch_Run.Content = strRun; rdbAdvertSwitch_Stop.Content = strStop; tbTipInfo_ImgType.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_FormatInfo_Img"); tbTipInfo_VideoType.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_FormatInfo_Video"); tbVideoSound.Text = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Advert_Volume"); string strMin = PubHelper.p_LangOper.GetStringBundle("Pub_Minute"); // 分钟 string strSecond = PubHelper.p_LangOper.GetStringBundle("Pub_Second"); // 秒 ////for (int i = 5; i < 121; i++) ////{ //// cmbImgShowTime.Items.Add(i.ToString() + strSecond); ////} for (int i = 1; i < 31; i++) { cmbPlayOutTime.Items.Add(i.ToString() + strMin); } ControlPriew(); #endregion #region 加载数据 if (PubHelper.p_BusinOper.ConfigInfo.AdvertPlaySwitch == Business.Enum.BusinessEnum.ControlSwitch.Run) { // 开启 rdbAdvertSwitch_Run.IsChecked = true; ControlSwitch(true); } else { rdbAdvertSwitch_Stop.IsChecked = true; ControlSwitch(false); } ////rdbAdvertSwitch_Run.IsEnabled = rdbAdvertSwitch_Stop.IsEnabled = false; tbNowAdvListID_Value.Text = PubHelper.p_BusinOper.ConfigInfo.NowAdvertPlayID; if (PubHelper.p_BusinOper.ConfigInfo.UpdateAdvertListID == PubHelper.p_BusinOper.ConfigInfo.NowAdvertPlayID) { tbUploadAdvListID_Value.Text = string.Empty; } else { tbUploadAdvListID_Value.Text = PubHelper.p_BusinOper.ConfigInfo.UpdateAdvertListID; } tbAdvUploadType_Value.Text = DictionaryHelper.Dictionary_AdvUploadType(PubHelper.p_BusinOper.ConfigInfo.AdvertUploadType); ////cmbImgShowTime.Text = PubHelper.p_BusinOper.SysCfgOper.GetSysCfgValue("AdvertImgShowTime") + strSecond; cmbPlayOutTime.Text = PubHelper.p_BusinOper.SysCfgOper.GetSysCfgValue("AdvertPlayOutTime") + strMin; string strAdvertVolume = PubHelper.p_BusinOper.SysCfgOper.GetSysCfgValue("AdvertVolume"); sidSound.Value = Convert.ToDouble(strAdvertVolume); ////tbSoundNum.Text = strAdvertVolume; #endregion if (PubHelper.p_BusinOper.ConfigInfo.AdvertUploadType != "1") { // 允许本地导入 btnImport.IsEnabled = true; } else { // 不允许本地导入 btnImport.IsEnabled = false; } m_IsInit = false; }