//------------------------------------------------------------------------------
// <copyright file=”*.cs” company=”EhLib Team”>
//     Copyright (c) 2017 Dmitry V. Bolshakov   
// </copyright>
//------------------------------------------------------------------------------

using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Globalization;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

namespace EhLib
{

  [DataAxisGridPropBarDesignTimeVisibleAttribute(true)]
  public class DataGridDateTimeColumn : DataGridMonoCellColumn
  {
    public DataGridDateTimeColumn()
    {

    }

    #region Properties
    [Browsable(false)]
    public new DataAxisGridDateTimeDataCell DataCell
    {
      get { return (DataAxisGridDateTimeDataCell)base.DataCell; }
    }

    [DefaultValue("d")]
    public string DateFormatString
    {
      get { return DataCell.DateFormatString; }
      set { DataCell.DateFormatString = value; }
    }

    [DefaultValue("t")]
    public string TimeFormatString
    {
      get { return DataCell.TimeFormatString; }
      set { DataCell.TimeFormatString = value; }
    }

    [DefaultValue(true)]
    public bool HideTimeWhenZero
    {
      get { return DataCell.HideTimeWhenZero; }
      set { DataCell.HideTimeWhenZero = value; }
    }

    [DefaultValue(" ")]
    public string DateTimePartSeparator
    {
      get { return DataCell.DateTimePartSeparator; }
      set { DataCell.DateTimePartSeparator = value; }
    }
    #endregion

    #region methods
    protected override DataAxisGridDataCellMan CreateTemplateCell()
    {
      return new DataAxisGridDateTimeDataCell();
    }
    #endregion

  }

}
