Example #1
0
        /// <summary>
        /// リカバリー用コンストラクタ
        /// </summary>
        /// <param name="track">リカバリーデータ</param>
        /// <param name="filePath">リカバリー元のファイル</param>
        public TrackItemSummary(bykIFv1.TrackItem track, string filePath)
        {
            track.Normalize();

            PointCount = track.Items.Count;
            From       = track.Items[0].Time;
            TimeSpan span = System.TimeZoneInfo.Local.GetUtcOffset(From);

            From = From.Add(span);

            To   = track.Items[PointCount - 1].Time;
            span = System.TimeZoneInfo.Local.GetUtcOffset(To);
            To   = To.Add(span);

            Description = track.Description;

            _name           = track.Name;
            _trackItemProxy = new TrackItemCacheLoaded(track, filePath);

            _saveFileName = filePath;
        }
Example #2
0
        public TrackItemSummary(bykIFv1.TrackItem track)
        {
            track.Normalize();

            ID = GenerateID();

            PointCount = track.Items.Count;
            From       = track.Items[0].Time;
            TimeSpan span = System.TimeZoneInfo.Local.GetUtcOffset(From);

            From = From.Add(span);

            To   = track.Items[PointCount - 1].Time;
            span = System.TimeZoneInfo.Local.GetUtcOffset(To);
            To   = To.Add(span);

            Description = track.Description;

            _name           = track.Name;
            _trackItemProxy = new TrackItemCacheNotYetSaved(track);

            _saveFileName = string.Empty;
        }