示例#1
0
        /// <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));
        }
示例#2
0
 Font IORMFontAndColorService.GetFont(ORMDesignerColorCategory fontCategory)
 {
     return(GetFont(fontCategory));
 }
示例#3
0
		/// <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();
		}
示例#4
0
		Font IORMFontAndColorService.GetFont(ORMDesignerColorCategory fontCategory)
		{
			return GetFont(fontCategory);
		}
示例#5
0
		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;
		}