Ejemplo n.º 1
0
        /// <summary>
        /// построение видимых участков графика и определение наличия аппроксимации
        /// </summary>
        protected void UpdateData()
        {
            CommonData.RenderedGraphics.Clear();
            IsAppearApproximation = false;
            CalculationHeightGraphic();
            Point locGraphic = this.Field.Location;

            foreach (SourceGraphic srcGraphic in CommonData.SourceGraphics)
            {
                bool            flagApproximation = false;
                GeometryGraphic renderedGraphic   = GeometryGraphicConstructor.Construct(srcGraphic,
                                                                                         new Rect(locGraphic, new Size(this.Field.Width, HeightGraphic)), CommonData.TimeInPoint,
                                                                                         CommonData.LeftTime, CommonData.RightTime);
                GeometryGraphic renderedGraphicApproximated = GeometryGraphicConstructor.Approximation(renderedGraphic, ref flagApproximation, 5);
                //GeometryGraphic renderedGraphicApproximated = GeometryGraphicConstructor.ConstructWithApproximation(srcGraphic,
                //    new Rect(locGraphic, new Size(this.Field.Width, HeightGraphic)), CommonData.TimeInPoint,
                //    CommonData.LeftTime, CommonData.RightTime, 5, out flagApproximation);
                if (flagApproximation)
                {
                    IsAppearApproximation = true;
                }
                CommonData.RenderedGraphics.Add(renderedGraphicApproximated);
                locGraphic.Y += (HeightGraphic + HeightBetweenGraphics);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// построение видимых участков графика и определение наличия аппроксимации
 /// </summary>
 protected void UpdateData()
 {
     CommonData.RenderedGraphics.Clear();
     IsAppearApproximation = false;
     foreach (SourceGraphic srcGraphic in CommonData.SourceGraphics)
     {
         bool            flagApproximation = false;
         GeometryGraphic renderedGraphic   = GeometryGraphicConstructor.Construct(srcGraphic, this.Field, CommonData.TimeInPoint,
                                                                                  CommonData.LeftTime, CommonData.RightTime);
         GeometryGraphic renderedGraphicApproximated = GeometryGraphicConstructor.Approximation(renderedGraphic, ref flagApproximation, 5);
         if (flagApproximation)
         {
             IsAppearApproximation = true;
         }
         CommonData.RenderedGraphics.Add(renderedGraphicApproximated);
     }
 }