/// <summary> /// 获取配置信息 /// </summary> private void GetSystemInfo() { this.lblCurrentVersion.Text = BaseSystemInfo.Version; string fileName = "http://files.cnblogs.com/jirigala/Config.xml"; string selectPath = "//appSettings/add"; string key = "Version"; this.lblNewVersion.Text = UserConfigHelper.GetValue(fileName, selectPath, key); }
/// <summary> /// 设置控件状态 /// </summary> public override void SetControlState() { if (UserConfigHelper.Exists()) { DefaultPassword = UserConfigHelper.GetValue("DefaultPassword"); } this.btnSetDefaultPassword.Visible = !string.IsNullOrEmpty(DefaultPassword); // 密码强度检查 this.lblConfirmPasswordReq.Visible = BaseSystemInfo.CheckPasswordStrength; this.lblNewPasswordReq.Visible = BaseSystemInfo.CheckPasswordStrength; // this.btnDeletePassword.Visible = !BaseSystemInfo.CheckPasswordStrength; this.btnSetAsUserCode.Visible = this.UserInfo.IsAdministrator; this.btnSetAsUserName.Visible = this.UserInfo.IsAdministrator; }
/// <summary> /// 获取服务器上的配置信息 /// </summary> /// <param name="userInfo">用户</param> /// <param name="key">配置项主键</param> /// <returns>配置内容</returns> public string GetServiceConfig(BaseUserInfo userInfo, string key) { return(UserConfigHelper.GetValue(key)); }