Example #1
0
        /// <summary>Create <see cref="DateColumnExtender"/>.</summary>
        /// <param name="column">Host <see cref="DateColumn"/>.</param>
        public DateColumnExtender(DateColumn column)
        {
            Verify.Argument.IsNotNull(column, "column");

            _column = column;

            InitializeComponent();

            _lblDateFormat.Text		= Resources.StrDateFormat.AddColon();
            _lblExample.Text		= Resources.StrExample.AddColon();

            _radUnixTimestamp.Text	= Resources.StrUNIXTimestamp;
            _radRelative.Text		= Resources.StrRelative;
            _radSystemDefault.Text	= Resources.StrDefaultFormat;
            _radRFC2822.Text		= Resources.StrRFC2822;
            _radISO8601.Text		= Resources.StrISO8601;

            var date = DateTime.Now;
            _lblUnixTimestamp.Text	= Utility.FormatDate(date, DateFormat.UnixTimestamp);
            _lblRelative.Text		= Utility.FormatDate(date, DateFormat.Relative);
            _lblSystemDefault.Text	= Utility.FormatDate(date, DateFormat.SystemDefault);
            _lblRFC2822.Text		= Utility.FormatDate(date, DateFormat.RFC2822);
            _lblISO8601.Text		= Utility.FormatDate(date, DateFormat.ISO8601);

            DateFormat = column.DateFormat;

            SubscribeToColumnEvents();
        }
Example #2
0
        /// <summary>Create <see cref="DateColumnExtender"/>.</summary>
        /// <param name="column">Host <see cref="DateColumn"/>.</param>
        public DateColumnExtender(DateColumn column)
        {
            Verify.Argument.IsNotNull(column, nameof(column));

            _column = column;

            InitializeComponent();

            _lblDateFormat.Text = Resources.StrDateFormat.AddColon();
            _lblExample.Text    = Resources.StrExample.AddColon();

            _radUnixTimestamp.Text = Resources.StrUNIXTimestamp;
            _radRelative.Text      = Resources.StrRelative;
            _radSystemDefault.Text = Resources.StrDefaultFormat;
            _radRFC2822.Text       = Resources.StrRFC2822;
            _radISO8601.Text       = Resources.StrISO8601;

            var date = DateTime.Now;

            _lblUnixTimestamp.Text = Utility.FormatDate(date, DateFormat.UnixTimestamp);
            _lblRelative.Text      = Utility.FormatDate(date, DateFormat.Relative);
            _lblSystemDefault.Text = Utility.FormatDate(date, DateFormat.SystemDefault);
            _lblRFC2822.Text       = Utility.FormatDate(date, DateFormat.RFC2822);
            _lblISO8601.Text       = Utility.FormatDate(date, DateFormat.ISO8601);

            DateFormat = column.DateFormat;

            SubscribeToColumnEvents();
        }