public override bool Equals(object obj) { if (!(obj is PriceRectangle)) { return(false); } PriceRectangle rect = (PriceRectangle)obj; return(this.priceLeft == rect.priceLeft && this.priceRight == rect.priceRight && this.priceTop == rect.priceTop && this.priceBottom == rect.priceBottom); }
private PriceRectangle GetPriceRectangle() { if (priceRectangle == null) { priceRectangle = GetPriceRectangleInternal(); return(priceRectangle); } IKLineData klineData = DataProvider.GetKLineData(); if (priceRectangle.StartIndex == GetStartIndex() && priceRectangle.EndIndex == DataProvider.EndIndex) { return(priceRectangle); } priceRectangle = GetPriceRectangleInternal(); return(priceRectangle); }
public void SetRect(Rectangle drawRect, PriceRectangle priceRect) { bool isDrawRectChange = this.drawRect != drawRect; if (isDrawRectChange) { this.drawRect = drawRect; } bool isPriceRectChange = this.priceRect != priceRect; if (isPriceRectChange) { this.priceRect = priceRect; } if (isDrawRectChange || isPriceRectChange) { RecalcScale(); } }
public PriceGraphicMapping(Rectangle drawRect, PriceRectangle priceRect) { SetRect(drawRect, priceRect); }