Beispiel #1
0
        /// <summary>
        /// 保存配置信息
        /// </summary>
        private void SaveConfig()
        {
            List <Config> list = new List <Config>();
            Config        config;

            foreach (Control control in this.ControlList)
            {
                if (control.Tag != null)
                {
                    if (control.Tag is Config)
                    {
                        config = control.Tag as Config;
                    }
                    else
                    {
                        config         = new Config();
                        config.ConName = control.Tag.ToString();
                        config.ConType = control.GetType().Name;
                    }
                    config.ConValue = GetConValue(control);
                    list.Add(config);
                }
            }
            dal.BatchUpdate(list);
        }