private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
string AppValue = "0";
if (this.checkBox1.Checked)
AppValue = "1";
AppConfig.SetValue("s1", AppValue);
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
object obj = registryKey.GetValue("爱流量");
if (obj != null && obj.ToString().Trim() == Application.ExecutablePath.ToString().Trim())
return;
registryKey.SetValue("爱流量", (object)Application.ExecutablePath.ToString());
}