private void BtnSave_OnClick(object sender, RoutedEventArgs e) { bool isAutoRun = (bool)CbAutoRun.IsChecked; bool r = RegeditRW.SetIsAutoRun(isAutoRun); if (r == false) { MessageBox.Show("保存失败"); } else { MessageBox.Show("保存成功"); } }
private void SettingWindow_OnLoaded(object sender, RoutedEventArgs e) { bool isAutoRun = RegeditRW.ReadIsAutoRun(); CbAutoRun.IsChecked = isAutoRun; }