Exemple #1
0
        public override void Render(IRenderContext rc)
        {
            if (rc == null)
            {
                throw new ArgumentNullException(nameof(rc));
            }

            if (!Lines.Any() || Lines.All(a => !a.Any()))
            {
                return;
            }

            VerifyAxes();

            OxyRect clippingRect = GetClippingRect();

            rc.SetClip(clippingRect);

            // Transform all points to screen coordinates
            foreach (IEnumerable <DataPoint> line in Lines)
            {
                int n0   = line.Count();
                var pts0 = new ScreenPoint[n0];
                TransformToScreenCoordinates(n0, pts0, line);

                rc.DrawLine(pts0, Color, StrokeThickness, Dashes?.ToArray() ?? LineStyle.GetDashArray());
            }

            rc.ResetClip();
        }
 static bool Check(ImmutableArray <int?> field)
 {
     return(Lines.All(line => Check(field, line)));
 }
        public bool HaveDataToInvoce()
        {
            var result = Lines.All(l => l.Amount.HasValue) && Lines.All(l => l.NdsAmount.HasValue);

            return(result);
        }