1 //修改栏目订单的颜色
2 private void btnfunColor_Click(object sender, EventArgs e)
3 {
4 ColorDialog fontcolor = new ColorDialog();
5 if (fontcolor.ShowDialog() == DialogResult.OK)
6 {
7 strColors[Convert.ToInt32(cmbFunInfo.SelectedValue)] = fontcolor.Color;
8 int argb = fontcolor.Color.ToArgb();
9 Color.FromArgb(argb);
10 //写入文件
11 Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
12 AppSettingsSection app = config.AppSettings;
13 app.Settings.Add(cmbFunInfo.SelectedValue.ToString(), argb.ToString());
14 config.Save(ConfigurationSaveMode.Modified);
15 }
16 }
请发表评论