Пример #1
0
 private void btn_save_Click(object sender, EventArgs e)
 {
     //todo 记录配置信息到配置文件中
     ConfigureAppConfig.AppSettingsSave(ConfigureAppConfig.API_SERVER_URL, bt_server_url.Text);
     ConfigureAppConfig.AppSettingsSave(ConfigureAppConfig.API_M_CODE, tb_m_code.Text);
     ConfigureAppConfig.AppSettingsSave(ConfigureAppConfig.API_CLIENT_PUB_SIGN_KEY, rtb_sign_pub_key.Text);
     if (MessageBox.Show("重新启动程序以应用新配置", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         Application.Restart();
     }
 }