Beispiel #1
0
        /// <summary>
        /// 通过[日程id]二分快速查表
        /// </summary>
        /// <param name="id">日程id</param>
        /// <returns></returns>
        public static ScheduleDataBase Query(this List <ScheduleDataBase> sorted, uint id)
        {
            var key = new ScheduleDataBase()
            {
                id = id
            };
            var comparer = new Comparer1();
            var index    = sorted.BinarySearch(key, comparer);

            return(index >= 0 ? sorted[index] : default(ScheduleDataBase));
        }
        public User_sUpdateService(FeederDataBase feederDataBase, TagsDataBase tagsDataBase, ScheduleDataBase scheduleDataBase, EventDataBase eventDataBase)
        {
            this.feederDataBase   = feederDataBase;
            this.tagsDataBase     = tagsDataBase;
            this.scheduleDataBase = scheduleDataBase;
            this.eventDataBase    = eventDataBase;

            lastVersionOfEvents   = null;
            lastVersionOfFeeders  = null;
            lastVersionOfSchedule = null;
            lastVersionOfTags     = null;

            SelectedUser     = 0;
            SelectedFeeder   = 0;
            SelectedSchedule = 0;

            thread = new Thread(CheckUpdate);
        }