public Window Add(Window other) { return new Window( MinimumX + other.MinimumX, MaximumX + other.MaximumX, MinimumY + other.MinimumY, MaximumY + other.MaximumY); }
protected override void OnMouseDown(object sender, MouseEventArgs e) { base.OnMouseDown(sender, e); _dragging = true; _initialLocation = e.Location; _initialWindow = AttachedGraph.Window; _lastWindow = _initialWindow; }
public LineBuilder(Expression expr, Window window, double xScale, double yScale, double increment) { Expression = expr; Window = window; XScale = xScale; YScale = yScale; Increment = increment; _workingPointList = new List<PointD>(); _workingSegmentList = new List<IList<PointD>>(); }
/// <summary> /// Initializes a new instance of the Graph class. /// </summary> public Graph() { _drawHelper = new GraphDrawingHelper(this); _integralDrawHelper = new IntegralDrawingHelper(this); _resolution = 1; _window = Window.Standard; Calculator = new Calculator(); _zoom = new ZoomMouseAdapter(this); _zoom.Zoom += delegate(object sender, GenericEventArgs<Window> e) { Window = e.Data; RestoreDefaultAdapter(); var handler = WindowChanged; if (handler != null) { handler(this, EventArgs.Empty); } }; _xRange = new XRangeMouseAdapter(this); _xRange.XRangeCreated += delegate(object sender, XRangeCreatedEventArgs e) { RestoreDefaultAdapter(); var handler = XRangeCreated; if (handler != null) { handler(this, e); } }; _dragging = new DraggingMouseAdapter(this); _current = _dragging; // Prevents flickering DoubleBuffered = true; ResizeRedraw = true; }
public bool Equals(Window other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.MinimumX.Equals(MinimumX) && other.MaximumX.Equals(MaximumX) && other.MinimumY.Equals(MinimumY) && other.MaximumY.Equals(MaximumY); }