예제 #1
0
        //добавление элемента из архива
        //public void AddBefore(MomentValue dot)
        //{
        //    if (dot.Undef % 2 != 0) dot.ToMomentReal().Mean = Dots.ParamsCount != 0 ? Dots.Last().ToMomentReal().Mean : 0;
        //    Dots.Insert(0, dot);
        //}
        //public void AddBefore(List<MomentValue> dots)
        //{
        //    if (dots[0].Undef % 2 != 0) dots.Insert(0, new MomentReal(dots[0].Time, 0, -1, 0, 0));
        //    for (int index = dots.ParamsCount-1; index >= 0; index--)
        //    {
        //        var momentValue = dots[index];
        //        if (momentValue.Undef % 2 != 0) momentValue.ToMomentReal().Mean = dots[index + 1].ToMomentReal().Mean;
        //        Dots.Insert(0, momentValue);
        //    }
        //}

        //добавление элемента
        public void AddValues(MomentValue dot)
        {
            if (!IsUpdated)
            {
                IsUpdated            = true;
                NumberOfFirstWaiting = Dots.Count;
            }
            //if (dot.Nd % 2 != 0) dot.ToMomentReal().Mean = Dots.Count != 0 ? Dots.Last().ToMomentReal().Mean : 0;
            Dots.Add(dot);
        }
예제 #2
0
 public bool Equals(MomentValue other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(this == other);
 }
예제 #3
0
 public override void AddDot(MomentValue dot)
 {
     AddDot(dot.ToMomentReal());
 }
예제 #4
0
 public abstract void AddDot(MomentValue dot);
예제 #5
0
 public MomentValue(MomentValue val)
 {
     DataType = DataType.Value;
     Time     = val.Time;
     Nd       = val.Nd;
 }
예제 #6
0
 public override void AddDot(MomentValue dot)
 {
     AddDot(dot.ToMomentBoolean());
 }