/// <summary> /// Implements <see cref="IORMFontAndColorService.GetFont"/> /// </summary> protected Font GetFont(ORMDesignerColorCategory fontCategory) { VerbalizationManager mgr; if (fontCategory == ORMDesignerColorCategory.Verbalizer && null != (mgr = myVerbalizationManager)) { return(new Font(mgr.FontFamilyName, mgr.FontSize / 72, FontStyle.Regular)); } return(new Font(new FontFamily("Times New Roman"), 10, FontStyle.Regular)); }
Font IORMFontAndColorService.GetFont(ORMDesignerColorCategory fontCategory) { return(GetFont(fontCategory)); }
/// <summary> /// Retrieve font information. A new Font object is generated /// on each call and must be disposed of properly by the caller. /// Implements IORMFontAndColorService.GetFont /// </summary> /// <param name="fontCategory">Identifies the color category for the font to retrieve</param> /// <returns>A new font object</returns> protected Font GetFont(ORMDesignerColorCategory fontCategory) { return CategoryFromDesignerFont(fontCategory).GetFont(); }
Font IORMFontAndColorService.GetFont(ORMDesignerColorCategory fontCategory) { return GetFont(fontCategory); }
private SettingsCategory CategoryFromDesignerFont(ORMDesignerColorCategory designerColorCategory) { SettingsCategory retVal = null; switch (designerColorCategory) { case ORMDesignerColorCategory.Editor: retVal = myEditorColors; if (retVal == null) { retVal = myEditorColors = new EditorColors(myServiceProvider); } break; case ORMDesignerColorCategory.Verbalizer: retVal = myVerbalizerColors; if (retVal == null) { retVal = myVerbalizerColors = new VerbalizerColors(myServiceProvider); } break; } Debug.Assert(retVal != null); // Unknown font return retVal; }