public ExtendedTextEditorOptions(ExtendedTextEditorOptions options)
            : base(options)
        {
            // get all the fields in the class
            var fields =
                typeof (ExtendedTextEditorOptions).GetFields(BindingFlags.NonPublic | BindingFlags.Public |
                                                             BindingFlags.Instance);

            // copy each value over to 'this'
            foreach (var fi in fields)
            {
                if (!fi.IsNotSerialized)
                    fi.SetValue(this, fi.GetValue(options));
            }
        }
 public void ResetDefault()
 {
     SqlEditorOptions = new ExtendedTextEditorOptions();
     NotifyOfPropertyChange(()=> SqlEditorOptions);
 }
 public SqlEditorSettingsViewModel()
 {
     SqlEditorOptions = new ExtendedTextEditorOptions(Settings.Default.TextEditor_SqlEditorOptions);
 }
 public CodeEditorSettingsViewModel()
 {
     CodeEditorOptions = new ExtendedTextEditorOptions(Settings.Default.TextEditor_CodeEditorOptions);
 }
 public ExtendedTextEditorOptions CopyFrom(ExtendedTextEditorOptions options)
 {
     var fields =
         typeof (ExtendedTextEditorOptions).GetProperties(BindingFlags.Instance | BindingFlags.Public |
                                                          BindingFlags.SetProperty);
     foreach (var field in fields)
     {
         var value = field.GetValue(options);
         if (field.CanWrite)
             field.SetValue(this, value);
     }
     return options;
 }