|
一応、出来たっぽいです。。。。
これであってますかね?
namespace ApplicationTest001
{
public partial class Form1 : Form
{
private int Form1BackColor;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (colorDialog1.ShowDialog() == DialogResult.OK)
{
Form1BackColor = colorDialog1.Color.ToArgb();
BackColor = colorDialog1.Color;
}
}
private void Form1_Load(object sender, EventArgs e)
{
textBox1.Text = Properties.Settings.Default.textBox1;
Form1BackColor = Properties.Settings.Default.Form1BackColor;
ColorSave();
}
private void ColorSave()
{
colorDialog1.CustomColors = Properties.Settings.Default.ColorSettings.Split(new[] { ',' }, 16).Select(int.Parse).ToArray();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.textBox1 = this.textBox1.Text;
Properties.Settings.Default.ColorSettings = string.Join(",", colorDialog1.CustomColors);
Properties.Settings.Default.Save();
}
}
}
|