/// <summary> /// TimelineItem-构造函数(初始化) /// </summary> public TimelineItem(int value, EnumDateTime type) { this.DataSource = new Collection <IDateTime>(); this.Type = type; this.Value = value; this.Text = string.Concat(value, this.Type.GetDescription()); }
/// <summary> /// FileXTimelineItem-构造函数(初始化) /// </summary> public FileXTimelineItem(int value, EnumDateTime type) { this.CreationFiles = new List <IFileX>(); this.LastAccessFiles = new List <IFileX>(); this.LastWriteFiles = new List <IFileX>(); this.Type = type; this.Value = value; }
private FileXTimelineItem AddChildItem(int value, EnumDateTime type) { if (this.Items.IsInvalid()) { this.Items = new List <BaseTimelineItem>(); } var citem = this.Items.FirstOrDefault(s => s.Value == value); if (citem == null) { citem = new FileXTimelineItem(value, type); this.Items.Add(citem); this.Items = this.Items.OrderBy(s => s.Value).ToList(); } return(citem as FileXTimelineItem); }