public bool CheckForNecessaryResets(MemberInfo member, object objectInstance, object settingValue) { if (settingValue == null) { return(true); } var dict = (XmlDictionary <string, EditorControlThemeNode>)settingValue; if (dict.Count == 0) { return(true); } foreach (var kvp in dict.ToList()) { if (kvp.Value != null && kvp.Value.Theme != null) { DefaultValueInitializer.DoNeccessaryResets(kvp.Value); continue; } var initNode = new EditorControlThemeNode(); dict[kvp.Key] = initNode; DefaultValueInitializer.Init(initNode); } return(false); }
public bool CheckForNecessaryResets(MemberInfo member, object settingsNode, object propertyValue) { if (propertyValue == null) { return(true); } var dict = (XmlDictionary <string, CompilerConfigurationNode>)propertyValue; if (dict.Count == 0) { return(true); } foreach (var kvp in dict.ToList()) { if (kvp.Value != null && kvp.Value.OpenSimCompilerSettings != null) { DefaultValueInitializer.DoNeccessaryResets(kvp.Value); continue; } var initNode = new CompilerConfigurationNode(); dict[kvp.Key] = initNode; DefaultValueInitializer.Init(initNode); } return(false); }
private void ResetCompletionBrushColorBox(UIElement colorBox) { var bindingExpression = BindingOperations.GetBindingExpression((FrameworkElement)colorBox, ColorPicker.SelectedColorProperty); if (bindingExpression == null) { return; } var propNames = bindingExpression.ParentBinding.Path.Path.Split('.'); var context = propNames[1]; if (context == "CompletionWindowItemBrushes") { var propName = propNames[propNames.Length - 3]; var deflt = (XmlSolidBrush) DefaultValueInitializer.GetDefaultValue(EditorControlTheme.CompletionWindowItemBrushes, propName); var property = EditorControlTheme.CompletionWindowItemBrushes.GetType() .GetProperty(propName); property.SetValue(EditorControlTheme.CompletionWindowItemBrushes, deflt); } else { var propName = propNames[propNames.Length - 2]; DefaultValueInitializer.SetToDefault(EditorControlTheme, propName); } }
public object GetDefaultValue(MemberInfo member, object objectInstance) { var d = new XmlDictionary <string, EditorControlThemeNode>(); d.Add("Default", DefaultValueInitializer.Init(new EditorControlThemeNode())); return(d); }
public object GetDefaultValue(MemberInfo member, object objectInstance) { var d = new XmlDictionary <string, FormatterSettingsNode>(); d.Add("Default", DefaultValueInitializer.Init(new FormatterSettingsNode())); return(d); }
private void ResetSelectionColorBox(UIElement colorBox) { var bindingExpression = BindingOperations.GetBindingExpression((FrameworkElement)colorBox, ColorPicker.SelectedColorProperty); var propNames = bindingExpression.ParentBinding.Path.Path.Split('.'); var propName = propNames[propNames.Length - 2]; DefaultValueInitializer.SetToDefault(EditorControlTheme, propName); }
public bool CheckForNecessaryResets(MemberInfo member, object objectInstance, object settingValue) { if (settingValue == null) { return(true); } DefaultValueInitializer.DoNeccessaryResets((LSLEditorControlTheme)settingValue); return(false); }
public bool CheckForNecessaryResets(MemberInfo member, object objectInstance, object settingValue) { if (settingValue == null) { return(true); } DefaultValueInitializer.DoNeccessaryResets((LSLOpenSimCompilerSettings)settingValue); return(false); }
public void AddCompilerConfiguration(string configurationName) { if (string.IsNullOrWhiteSpace(configurationName)) { throw new ArgumentException("Compiler configuration name cannot be null or whitespace.", "configurationName"); } if (CompilerConfigurations.ContainsKey(configurationName)) { throw new ArgumentException( string.Format("Compiler configuration named {0} already exist.", configurationName), "configurationName"); } CompilerConfigurations.Add(configurationName, DefaultValueInitializer.Init(new CompilerConfigurationNode())); }
public void AddEditorControlTheme(string themeName) { if (string.IsNullOrWhiteSpace(themeName)) { throw new ArgumentException("Editor theme name cannot be null or whitespace.", "themeName"); } if (EditorControlThemes.ContainsKey(themeName)) { throw new ArgumentException( string.Format("Editor theme named {0} already exist.", themeName), "themeName"); } EditorControlThemes.Add(themeName, DefaultValueInitializer.Init(new EditorControlThemeNode())); }
private void ResetHighlightingColorBox(UIElement colorBox) { var bindingExpression = BindingOperations.GetBindingExpression((FrameworkElement)colorBox, ColorPicker.SelectedColorProperty); if (bindingExpression == null) { return; } var propNames = bindingExpression.ParentBinding.Path.Path.Split('.'); var propName = propNames[propNames.Length - 2]; var context = propNames[1]; if (context == "HighlightingColors") { DefaultValueInitializer.SetToDefault(EditorControlTheme.HighlightingColors, propName); } else { DefaultValueInitializer.SetToDefault(EditorControlTheme, propName); } }