示例#1
0
 /// <summary>
 /// Initializes the <see cref="Common"/> class.
 /// </summary>
 static Common()
 {
     LinkStyle = new Common(false);
       LinkStyle.Font = new Font(FontFamily.GenericSerif, 10, FontStyle.Underline);
       LinkStyle.ForeColor = Color.Blue;
       LinkStyle.isReadOnly = true;
 }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Common"/> class.
        /// </summary>
        /// <remarks>
        /// Copy Constructor.  This method duplicates all the reference field (Image, Font, StringFormat) creating a new instance.
        /// </remarks>
        /// <param name="source">The source.</param>
        /// <param name="isReadOnly">if set to <c>true</c> is read only.</param>
        public Common(Common source, bool isReadOnly)
            : base(source, isReadOnly)
        {
            // Duplicate the reference fields
              Image l_tmpImage = null;
              if (source.cellImage != null)
              {
            l_tmpImage = ImageClone(source.cellImage);
              }

              this.selectionBackColor = source.selectionBackColor;
              this.selectionForeColor = source.selectionForeColor;
              this.focusBackColor = source.focusBackColor;
              this.focusForeColor = source.focusForeColor;
              this.cellImage = l_tmpImage;
              this.imageAlignment = source.imageAlignment;
              this.doImageStretch = source.ImageStretch;
              this.doAlignTextToImage = source.doAlignTextToImage;
              this.focusBorder = source.focusBorder;
              this.selectionBorder = source.selectionBorder;

              ExpandedCell = false;
        }