1.每次变更都保存
Properties.Settings.Default.PropertyChanged += Default_PropertyChanged; private void Default_PropertyChanged(object sender, PropertyChangedEventArgs e) { Properties.Settings.Default.Save(); }
2. 退出时保存
Application.ApplicationExit += new EventHandler(Application_ApplicationExit); void Application_ApplicationExit(object sender, EventArgs e) { Settings.Default.Save(); }
时间: 2024-12-27 20:11:01