예제 #1
0
        public ColumnStyle(ColumnStyleType type)
        {
            _columnStyleType = type;

            SetDefaultCellBorder();
            SetDefaultBackgroundBrush();
            SetDefaultTextBrush();
            SetDefaultTextFont();
        }
예제 #2
0
 public static BrushX GetDefaultBackgroundBrush(ColumnStyleType type)
 {
     if (type == ColumnStyleType.DataCell)
     {
         return((BrushX)_defaultNormalBackgroundBrush.Clone());
     }
     else
     {
         return((BrushX)_defaultHeaderBackgroundBrush.Clone());
     }
 }
예제 #3
0
 public static BrushX GetDefaultTextBrush(ColumnStyleType type)
 {
     if (type == ColumnStyleType.DataCell || type == ColumnStyleType.PropertyCell)
     {
         return((BrushX)_defaultNormalTextBrush.Clone());
     }
     else
     {
         return(new BrushX(SystemColors.ControlText));
     }
 }
예제 #4
0
 /// <summary>
 /// Get a clone of the default cell border.
 /// </summary>
 /// <returns></returns>
 public static PenX GetDefaultCellBorder(ColumnStyleType type)
 {
     if (type == ColumnStyleType.DataCell || type == ColumnStyleType.PropertyCell)
     {
         return((PenX)_defaultCellPen.Clone());
     }
     else
     {
         return(new PenX(SystemColors.ControlDarkDark, 1));
     }
 }
예제 #5
0
        public ColumnStyle(ColumnStyle s)
        {
            _columnStyleType = s._columnStyleType;
            _columnSize      = s._columnSize;

            _isCellPenCustom = s._isCellPenCustom;
            ChildCopyToMember(ref _cellPen, s._cellPen);
            _textFormat = (StringFormat)s._textFormat.Clone();
            _textFont   = s._textFont;

            _isTextBrushCustom = s._isTextBrushCustom;
            ChildCopyToMember(ref _textBrush, s._textBrush);

            _isBackgroundBrushCustom = s._isBackgroundBrushCustom;
            ChildCopyToMember(ref _backgroundBrush, s._backgroundBrush);
        }
예제 #6
0
        public ColumnStyle(ColumnStyle s)
        {
            _columnStyleType = s._columnStyleType;
            m_Size           = s.m_Size;

            _isCellPenCustom = s._isCellPenCustom;
            m_CellPen        = (PenX)s.m_CellPen.Clone();
            m_TextFormat     = (StringFormat)s.m_TextFormat.Clone();
            m_TextFont       = (Font)s.m_TextFont.Clone();

            _isTextBrushCustom = s._isTextBrushCustom;
            m_TextBrush        = (BrushX)s.m_TextBrush.Clone();

            _isBackgroundBrushCustom = s._isBackgroundBrushCustom;
            m_BackgroundBrush        = (BrushX)s.m_BackgroundBrush.Clone();
        }
예제 #7
0
        public void ChangeTypeTo(ColumnStyleType type)
        {
            _columnStyleType = type;

            if (!_isCellPenCustom)
            {
                SetDefaultCellBorder();
            }

            if (!_isTextBrushCustom)
            {
                SetDefaultTextBrush();
            }

            if (!_isBackgroundBrushCustom)
            {
                SetDefaultBackgroundBrush();
            }

            SetDefaultTextFont();
        }
예제 #8
0
        public ColumnStyle(ColumnStyleType type)
        {
            _cellPen = new PenX(GdiColorHelper.ToNamedColor(SystemColors.InactiveBorder), 1)
            {
                ParentObject = this
            };
            _textBrush = new BrushX(GdiColorHelper.ToNamedColor(SystemColors.WindowText))
            {
                ParentObject = this
            };
            _backgroundBrush = new BrushX(GdiColorHelper.ToNamedColor(SystemColors.Window))
            {
                ParentObject = this
            };

            _columnStyleType = type;

            SetDefaultCellBorder();
            SetDefaultBackgroundBrush();
            SetDefaultTextBrush();
            SetDefaultTextFont();
        }
예제 #9
0
		public ColumnStyle(ColumnStyle s)
		{
			_columnStyleType = s._columnStyleType;
			_columnSize = s._columnSize;

			_isCellPenCustom = s._isCellPenCustom;
			ChildCopyToMember(ref _cellPen, s._cellPen);
			_textFormat = (StringFormat)s._textFormat.Clone();
			_textFont = s._textFont;

			_isTextBrushCustom = s._isTextBrushCustom;
			ChildCopyToMember(ref _textBrush, s._textBrush);

			_isBackgroundBrushCustom = s._isBackgroundBrushCustom;
			ChildCopyToMember(ref _backgroundBrush, s._backgroundBrush);
		}
예제 #10
0
		public void ChangeTypeTo(ColumnStyleType type)
		{
			_columnStyleType = type;

			if (!_isCellPenCustom)
				SetDefaultCellBorder();

			if (!_isTextBrushCustom)
				SetDefaultTextBrush();

			if (!_isBackgroundBrushCustom)
				SetDefaultBackgroundBrush();

			SetDefaultTextFont();
		}
예제 #11
0
		public ColumnStyle(ColumnStyleType type)
		{
			_cellPen = new PenX(GdiColorHelper.ToNamedColor(SystemColors.InactiveBorder), 1) { ParentObject = this };
			_textBrush = new BrushX(GdiColorHelper.ToNamedColor(SystemColors.WindowText)) { ParentObject = this };
			_backgroundBrush = new BrushX(GdiColorHelper.ToNamedColor(SystemColors.Window)) { ParentObject = this };

			_columnStyleType = type;

			SetDefaultCellBorder();
			SetDefaultBackgroundBrush();
			SetDefaultTextBrush();
			SetDefaultTextFont();
		}
예제 #12
0
 public static Font GetDefaultTextFont(ColumnStyleType type)
 {
   return (Font)_defaultTextFont.Clone();
 }
예제 #13
0
    public ColumnStyle(ColumnStyle s)
    {
      _columnStyleType = s._columnStyleType;
      m_Size = s.m_Size;

      _isCellPenCustom = s._isCellPenCustom;
      m_CellPen = (PenX)s.m_CellPen.Clone();
      m_TextFormat = (StringFormat)s.m_TextFormat.Clone();
      m_TextFont = (Font)s.m_TextFont.Clone();
      
      _isTextBrushCustom = s._isTextBrushCustom;
      m_TextBrush = (BrushX)s.m_TextBrush.Clone();

      _isBackgroundBrushCustom = s._isBackgroundBrushCustom;
      m_BackgroundBrush = (BrushX)s.m_BackgroundBrush.Clone();
    }
예제 #14
0
		public static BrushX GetDefaultBackgroundBrush(ColumnStyleType type)
		{
			if (type == ColumnStyleType.DataCell)
				return (BrushX)_defaultNormalBackgroundBrush.Clone();
			else
				return (BrushX)_defaultHeaderBackgroundBrush.Clone();
		}
예제 #15
0
 public static FontX GetDefaultTextFont(ColumnStyleType type)
 {
     return(_defaultTextFont);
 }
예제 #16
0
		/// <summary>
		/// Get a clone of the default cell border.
		/// </summary>
		/// <returns></returns>
		public static PenX GetDefaultCellBorder(ColumnStyleType type)
		{
			if (type == ColumnStyleType.DataCell || type == ColumnStyleType.PropertyCell)
				return (PenX)_defaultCellPen.Clone();
			else
				return new PenX(GdiColorHelper.ToNamedColor(SystemColors.ControlDarkDark), 1);
		}
예제 #17
0
		public static BrushX GetDefaultTextBrush(ColumnStyleType type)
		{
			if (type == ColumnStyleType.DataCell || type == ColumnStyleType.PropertyCell)
				return (BrushX)_defaultNormalTextBrush.Clone();
			else
				return new BrushX(GdiColorHelper.ToNamedColor(SystemColors.ControlText));
		}
예제 #18
0
 public static Font GetDefaultTextFont(ColumnStyleType type)
 {
     return((Font)_defaultTextFont.Clone());
 }
예제 #19
0
		public static FontX GetDefaultTextFont(ColumnStyleType type)
		{
			return _defaultTextFont;
		}
예제 #20
0
    public ColumnStyle(ColumnStyleType type)
    {
      _columnStyleType = type;

      SetDefaultCellBorder();
      SetDefaultBackgroundBrush();
      SetDefaultTextBrush();
      SetDefaultTextFont();
      }