private void TableConfigCtrl_FormClosing(object sender, FormClosingEventArgs e) { if (TableSetting.Modified) { TableSetting.Modified = false; DialogResult result = MessageBox.Show("是否保存设置?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (result == DialogResult.OK) { TableSetting.SaveSettings(this.FileName); this.ShowMessage("表【{0}】配置保存成功!", TableSetting.TableName); } } }