public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (_topLeft is null || _bottomRight is null) { return; } if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { _topLeft.DrawShape(dc, renderer, selection); _bottomRight.DrawShape(dc, renderer, selection); } else { if (selection.SelectedShapes.Contains(_topLeft)) { _topLeft.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_bottomRight)) { _bottomRight.DrawShape(dc, renderer, selection); } } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { foreach (var connector in _connectors) { connector.DrawShape(dc, renderer, selection); } } else { foreach (var connector in _connectors) { if (selection.SelectedShapes.Contains(connector)) { connector.DrawShape(dc, renderer, selection); } } } }
public override void Move(ISelection?selection, decimal dx, decimal dy) { foreach (var connector in _connectors) { connector.Move(selection, dx, dy); } }
public override void DrawShape(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (State.HasFlag(ShapeStateFlags.Visible)) { renderer?.DrawRectangle(dc, this, Style); } }
public override void Deselect(ISelection?selection) { base.Deselect(selection); _topLeft?.Deselect(selection); _bottomRight?.Deselect(selection); }
public override void Deselect(ISelection?selection) { base.Deselect(selection); _start?.Deselect(selection); _end?.Deselect(selection); }
public override void Move(ISelection?selection, decimal dx, decimal dy) { if (_point1 is null || _point2 is null || _point3 is null || _point4 is null) { return; } if (!_point1.State.HasFlag(ShapeStateFlags.Connector)) { _point1.Move(selection, dx, dy); } if (!_point2.State.HasFlag(ShapeStateFlags.Connector)) { _point2.Move(selection, dx, dy); } if (!_point3.State.HasFlag(ShapeStateFlags.Connector)) { _point3.Move(selection, dx, dy); } if (!_point4.State.HasFlag(ShapeStateFlags.Connector)) { _point4.Move(selection, dx, dy); } }
public override void Move(ISelection?selection, decimal dx, decimal dy) { foreach (var point in GetPathPoints()) { point.Move(selection, dx, dy); } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (_start is null || _end is null) { return; } if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { _start.DrawShape(dc, renderer, selection); _end.DrawShape(dc, renderer, selection); } else { if (selection.SelectedShapes.Contains(_start)) { _start.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_end)) { _end.DrawShape(dc, renderer, selection); } } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { foreach (var point in GetPathPoints()) { point.DrawShape(dc, renderer, selection); } } else { foreach (var point in GetPathPoints()) { if (selection.SelectedShapes.Contains(point)) { point.DrawShape(dc, renderer, selection); } } } }
public override void DrawShape(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (!State.HasFlag(ShapeStateFlags.Visible)) { return; } var isSelected = selection?.SelectedShapes is not null && selection.SelectedShapes.Count > 0 && selection.SelectedShapes.Contains(this); if (renderer?.State is not { } state) { return; } var style = isSelected ? state.SelectedPointStyle : state.PointStyle; if (style is null) { return; } var size = state.PointSize; if (size <= 0.0) { return; } renderer.DrawPoint(dc, this, style); }
public override void Deselect(ISelection?selection) { base.Deselect(selection); _point1?.Deselect(selection); _point2?.Deselect(selection); _point3?.Deselect(selection); }
public override void Deselect(ISelection?selection) { base.Deselect(selection); foreach (var point in GetPathPoints()) { point.Deselect(selection); } }
public override void Select(ISelection?selection) { base.Select(selection); _point1?.Select(selection); _point2?.Select(selection); _point3?.Select(selection); _point4?.Select(selection); }
public override void Deselect(ISelection?selection) { base.Deselect(selection); foreach (var connector in _connectors) { connector.Deselect(selection); } }
public ResolverNode( ISelection first, ISelection?firstParent = null, ExecutionStrategy?strategy = null) : base(strategy ?? QueryPlanBuilder.GetStrategyFromSelection(first)) { First = first; FirstParent = firstParent; Selections.Add(first); }
public override void Move(ISelection?selection, decimal dx, decimal dy) { foreach (var shape in _shapes) { if (!shape.State.HasFlag(ShapeStateFlags.Connector)) { shape.Move(selection, dx, dy); } } base.Move(selection, dx, dy); }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (State.HasFlag(ShapeStateFlags.Visible)) { foreach (var shape in _shapes) { shape.DrawPoints(dc, renderer, selection); } } base.DrawPoints(dc, renderer, selection); }
public override void Move(ISelection?selection, decimal dx, decimal dy) { if (_start is null || _end is null) { return; } if (!_start.State.HasFlag(ShapeStateFlags.Connector)) { _start.Move(selection, dx, dy); } if (!_end.State.HasFlag(ShapeStateFlags.Connector)) { _end.Move(selection, dx, dy); } }
public override void Move(ISelection?selection, decimal dx, decimal dy) { if (_topLeft is null || _bottomRight is null) { return; } if (!_topLeft.State.HasFlag(ShapeStateFlags.Connector)) { _topLeft.Move(selection, dx, dy); } if (!_bottomRight.State.HasFlag(ShapeStateFlags.Connector)) { _bottomRight.Move(selection, dx, dy); } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (_point1 is null || _point2 is null || _point3 is null || _point4 is null) { return; } if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { _point1.DrawShape(dc, renderer, selection); _point2.DrawShape(dc, renderer, selection); _point3.DrawShape(dc, renderer, selection); _point4.DrawShape(dc, renderer, selection); } else { if (selection.SelectedShapes.Contains(_point1)) { _point1.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_point2)) { _point2.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_point3)) { _point3.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_point4)) { _point4.DrawShape(dc, renderer, selection); } } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { }
public override void Move(ISelection?selection, decimal dx, decimal dy) { X = (double)((decimal)_x + dx); Y = (double)((decimal)_y + dy); }