static SharpDevelopTextEditorProperties() { Properties properties2 = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties())); fontContainer = new FontContainer(FontContainer.ParseFont(properties2.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()))); properties2.PropertyChanged += new PropertyChangedEventHandler(CheckFontChange); }
void CheckFontChange(object sender, PropertyChangedEventArgs e) { if (e.Key == "DefaultFont") { fontContainer.DefaultFont = FontContainer.ParseFont(e.NewValue.ToString()); } }
public DefaultTextEditorProperties() { properties = ((IProperties)propertyService.GetProperty("NetFocus.DataStructure.TextEditor.Document.DefaultDocumentProperties", new DefaultProperties())); FontContainer.DefaultFont = FontContainer.ParseFont(properties.GetProperty("DefaultFont", new Font("Courier New", 10).ToString())); properties.PropertyChanged += new PropertyEventHandler(CheckFontChange); }