IndentSettings.xaml.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  1. using System.Windows;
  2. namespace MPE
  3. {
  4. public partial class IndentSettings : Window
  5. {
  6. Properties.Settings param = Properties.Settings.Default;
  7. public IndentSettings()
  8. {
  9. InitializeComponent();
  10. IFAutoIndentCB.IsChecked = param.indentBools[0] == '1';
  11. ELSEAutoIndentCB.IsChecked = param.indentBools[1] == '1';
  12. }
  13. void IFAutoIndentCB_Click(object sender, RoutedEventArgs e)
  14. {
  15. param.indentBools = param.indentBools.Remove(0, 1); param.indentBools = param.indentBools.Insert(0, IFAutoIndentCB.IsChecked == true ? "1" : "0");
  16. param.Save();
  17. }
  18. void ELSEAutoIndentCB_Click(object sender, RoutedEventArgs e)
  19. {
  20. param.indentBools = param.indentBools.Remove(1, 1); param.indentBools = param.indentBools.Insert(1, ELSEAutoIndentCB.IsChecked == true ? "1" : "0");
  21. param.Save();
  22. }
  23. void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) => DragMove();
  24. }
  25. }