#nullable enable using System; namespace UVC.UIToolkit { /// /// 날짜+시간 속성 데이터 클래스입니다. /// UI는 UTKDateTimePropertyItemView에서 담당합니다. /// public class UTKDateTimePropertyItem : UTKPropertyItemBase { #region Fields private string _dateTimeFormat = "yyyy-MM-dd HH:mm"; #endregion #region Properties /// 속성 타입 public override UTKPropertyType PropertyType => UTKPropertyType.DateTime; /// 날짜시간 표시 형식 public string DateTimeFormat { get => _dateTimeFormat; set => _dateTimeFormat = value ?? "yyyy-MM-dd HH:mm"; } #endregion #region Constructor /// /// 날짜+시간 속성을 생성합니다. /// /// 고유 ID /// 표시 이름 /// 초기 값 (default이면 현재 시간) /// 읽기 전용 여부 public UTKDateTimePropertyItem(string id, string name, DateTime initialValue = default, bool isReadOnly = false) : base(id, name, initialValue == default ? DateTime.Now : initialValue) { IsReadOnly = isReadOnly; } #endregion } }