示例#1
0
        private ArtifactType FillContractionData(PeriGen.Patterns.Engine.Data.Contraction item)
        {
            var toRet = new Contraction()
            {
                Category = Resource.IDS_CONTRACTION,
                Id       = item.Id,
                PeakTime = item.PeakTime.ToLocalTime()
            };

            return(toRet);
        }
示例#2
0
        public static String WriteContractionDAT(DetectionArtifact item, DateTime AbsoluteStart)
        {
            Contraction   ctrItem = item as Contraction;
            StringBuilder value   = new StringBuilder(255);

            value.Append("CTR|");
            value.Append(((int)((item.StartTime - AbsoluteStart).TotalSeconds)).ToString(CultureInfo.InvariantCulture));
            value.Append("|");
            value.Append(((int)((ctrItem.PeakTime - AbsoluteStart).TotalSeconds)).ToString(CultureInfo.InvariantCulture));
            value.Append("|");
            value.Append(((int)((item.EndTime - AbsoluteStart).TotalSeconds)).ToString(CultureInfo.InvariantCulture));
            value.Append("|");
            value.Append("y"); // Is final
            value.Append("|");
            value.Append("n"); // Is Strikeout
            value.Append("|");
            value.Append(item.Id.ToString(CultureInfo.InvariantCulture));

            return(value.ToString());
        }