private void CheckBoxChanged(object sender, RoutedEventArgs e) { var value = RootCheckBox.IsChecked == true; if (_setting.GetValue() is bool currentValue && value != currentValue) { _setting.SetValue(value); } }
protected override void ChangePropertyTo(NewLineSetting newValue) { switch (newValue) { case NewLineSetting.Newline: _setting.SetValue("\n"); break; case NewLineSetting.CarrageReturn: _setting.SetValue("\r"); break; case NewLineSetting.CarrageReturnNewline: _setting.SetValue("\r\n"); break; case NewLineSetting.NotSet: default: break; } }
protected override void ChangePropertyTo(IndentationSizeSetting newValue) { switch (newValue) { case IndentationSizeSetting._1: _setting.SetValue(1); break; case IndentationSizeSetting._2: _setting.SetValue(2); break; case IndentationSizeSetting._3: _setting.SetValue(3); break; case IndentationSizeSetting._4: _setting.SetValue(4); break; case IndentationSizeSetting._5: _setting.SetValue(5); break; case IndentationSizeSetting._6: _setting.SetValue(6); break; case IndentationSizeSetting._7: _setting.SetValue(7); break; case IndentationSizeSetting._8: _setting.SetValue(8); break; default: break; } }
protected override void ChangePropertyTo(BinaryOperatorSpacingOptions newValue) { _setting.SetValue(newValue); }
protected override void ChangePropertyTo(TabSizeSettings newValue) => _setting.SetValue((int)newValue);
protected override void ChangePropertyTo(LabelPositionOptions newValue) { _setting.SetValue(newValue); }