private void lklblAddGlobal_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FormAddKeyVal formKv = new FormAddKeyVal("新增全局配置节点"); if (formKv.ShowDialog() == DialogResult.OK) { Dictionary <string, string> kvs = formKv.KeyValue; if (kvs.Count > 0) { List <ConfigData> lstConfigs = XmlSerializion.DeSerializion <List <ConfigData> >(Global_Xml) ?? new List <ConfigData>(); foreach (KeyValuePair <string, string> kv in kvs) { ConfigData configData = new ConfigData() { ConfigPath = Global_Xml, KeyVal = kv.Key, ValueVal = kv.Value, TypeVal = ConfigType.appSettings }; lstConfigs.Add(configData); AddGlobalUI(configData); } XmlSerializion.Seralize(lstConfigs, Global_Xml); } } }
private void btnAddFilter_Click(object sender, EventArgs e) { FormAddKeyVal form = new FormAddKeyVal("新增筛选文件"); if (form.ShowDialog() == DialogResult.OK) { cklsbFilter.Items.Add(form.Value); cklsbFilter.SetItemChecked(cklsbFilter.Items.Count - 1, true); } }