/// <summary>
    /// Initializes a new instance of the <see cref="DefaultTextEditorProperties"/> class.
    /// </summary>
    public DefaultTextEditorProperties()
    {
      if (DefaultFont == null)
        DefaultFont = new Font("Courier New", 10);

      this.fontContainer = new FontContainer(DefaultFont);
    }
    /// <summary>
    /// Initializes a new instance of the <see cref="DefaultTextEditorProperties"/> class.
    /// </summary>
    public DefaultTextEditorProperties()
    {
      if (_defaultFont == null)
        _defaultFont = new Font("Courier New", 10);

      _fontContainer = new FontContainer(_defaultFont);
    }
        /// <summary>
        /// Gets the font.
        /// </summary>
        /// <param name="fontContainer">The font container.</param>
        /// <returns>The font.</returns>
        public Font GetFont(FontContainer fontContainer)
        {
            if (Bold)
            {
                return(Italic ? fontContainer.BoldItalicFont : fontContainer.BoldFont);
            }

            return(Italic ? fontContainer.ItalicFont : fontContainer.RegularFont);
        }
예제 #4
0
 /// <summary>
 /// Gets the font.
 /// </summary>
 /// <param name="fontContainer">The font container.</param>
 /// <returns>Always <c>null</c>.</returns>
 public override Font GetFont(FontContainer fontContainer)
 {
     return(null);
 }
예제 #5
0
 /// <summary>
 /// Gets the font.
 /// </summary>
 /// <param name="fontContainer">The font container.</param>
 /// <returns>The font.</returns>
 public virtual Font GetFont(FontContainer fontContainer)
 {
     return(_color.GetFont(fontContainer));
 }
    /// <summary>
    /// Gets the font.
    /// </summary>
    /// <param name="fontContainer">The font container.</param>
    /// <returns>The font.</returns>
    public Font GetFont(FontContainer fontContainer)
    {
      if (Bold)
        return Italic ? fontContainer.BoldItalicFont : fontContainer.BoldFont;

      return Italic ? fontContainer.ItalicFont : fontContainer.RegularFont;
    }
예제 #7
0
 /// <summary>
 /// Gets the font.
 /// </summary>
 /// <param name="fontContainer">The font container.</param>
 /// <returns>Always <see langword="null"/>.</returns>
 public override Font GetFont(FontContainer fontContainer)
 {
   return null;
 }
예제 #8
0
 /// <summary>
 /// Gets the font.
 /// </summary>
 /// <param name="fontContainer">The font container.</param>
 /// <returns>The font.</returns>
 public virtual Font GetFont(FontContainer fontContainer)
 {
   return _color.GetFont(fontContainer);
 }