protected override void OnClosing(CancelEventArgs e) { //自动保存所有设置 XmlEncoder.XmlOutput(MainFolder, Versions, "record.xml"); base.OnClosing(e); }