| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraTab; |
| | | using System.Text.RegularExpressions; |
| | | using System.Xml; |
| | | |
| | | namespace Gs.DevApp.ToolBox |
| | | { |
| | |
| | | string dd = Regex.Replace(propertyName, @"_([a-z])", m => m.Groups[1].Value.ToUpper()); |
| | | return dd; |
| | | } |
| | | public static void UpdateAppConfig(string key, string newValue) |
| | | { |
| | | string configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; |
| | | XmlDocument xmlDoc = new XmlDocument(); |
| | | xmlDoc.Load(configFile); |
| | | |
| | | XmlNode node = xmlDoc.SelectSingleNode($"//appSettings//add[@key='{key}']"); |
| | | if (node != null) |
| | | { |
| | | XmlAttribute attribute = node as XmlAttribute; |
| | | attribute.Value = newValue; |
| | | xmlDoc.Save(configFile); |
| | | } |
| | | } |
| | | public class CboItemEntity |
| | | { |
| | | private object _text = 0; |
| | | private object _Value = ""; |
| | | /// <summary> |
| | | /// 显示值 |
| | | /// </summary> |
| | | public object Text |
| | | { |
| | | get { return this._text; } |
| | | set { this._text = value; } |
| | | } |
| | | /// <summary> |
| | | /// 对象值 |
| | | /// </summary> |
| | | public object Value |
| | | { |
| | | get { return this._Value; } |
| | | set { this._Value = value; } |
| | | } |
| | | |
| | | public override string ToString() |
| | | { |
| | | return this.Text.ToString(); |
| | | } |
| | | } |
| | | } |
| | | } |